FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Free tables and Advantage Internet Server (AIS)
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
Free tables and Advantage Internet Server (AIS)
Posted: Wed Nov 11, 2009 03:51 PM
Hello!

Currently I use free Advantage Database Local DLL files for accessing DBF-s from our applications. Now I wish to access them via Internet (ADSL). I installed the latest ADS 9.10.0.9 and changed the line SET SERVER LOCAL to SET SERVER REMOTE and tested our simple application and it was working OK. In the next step I created Advantage Data Dictionary file (C:\AAPL\ADSTEST.ADD) using the latest Advantage Data Architect and changed the line SET SERVER REMOTE to AdsSetServerType(ADS_AIS_SERVER). I also added the following code:

xRDDPath := 'c:\aapl\'
cDict:='adstest.add'
G_Msg('Povezovanje preko interneta ... ' + xRDDPath + cDict)
if AdsConnect60( xRDDPath + cDict, ADS_AIS_SERVER, "ADSSYS")
   ...


I also shared volume C: as ADS91 with full access and changed ADS.INI on client machine:

[MASTERM1]
INTERNET_IP=192.168.1.101
INTERNET_PORT=50101

[DRIVES]
C:=\\MASTERM1\ADS91


In Data Dictionary I enabled "Internet Access" on security tab and allowed non-password users... User ADSSYS was also set to have internet access ...
I temporarily disabled firewall ...

Now the function AdsConnect60 returns .T. so it seems that connection is working OK, but when our app tries to open DBF (we use full path for example: C:\AAPL\ADST\DAT\PRVA.DBF), we receive an error.
BTW, I would like to use free tables because tipically our app opens DBFs in tree different subfolders inside C:\AAPL.

How do you open DBF via AIS?

Thanks, Roman

P.S. Here is quote from ADS help file:
To use the new Internet functionality you will need to create a data dictionary. The Internet server will use the data dictionary to validate users. Free Tables (tables not in a Data Dictionary) can be opened through an Internet connection. To deny a user’s rights to a table, the table needs to be added to the Data Dictionary and the user’s rights removed from the table.
© I'm not patented!
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Thu Nov 12, 2009 12:37 AM

AIS is not supported with LOCALSERVER. You have to buy the product to use it. You can get details at Advantage website.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Thu Nov 12, 2009 02:16 AM
Hi,

I hope this helps.

1. No need to share 'C:' or any folder.
2. create adsserver.ini and put to path with 'error and assert log path' usualy 'C:' partition
on your adsserver.ini contains:
Code (fw): Select all Collapse
    [ServerAliases]
     yourdataDD = c:\yourdatafolder     //the location of your remote .add and tables

3. on your ads.ini (client side)
Code (fw): Select all Collapse
    [Settings]
    ADS_SERVER_TYPE = 6         //this is AIS and REMOTE  (4 + 2)
    COMPRESSION = Always


4. If AdsConnect60(\\<ip address>:<port>\yourdataDD\your.ADD, ADS_AIS_SERVER, 'adssys',,,@hADS ) == .T. //means connected to your .add
5. open table as usual 'use table' //where table is added to your .add

note: don't forget to enable internet access to your .add user or to 'adssys'


Enjoy the server side alias of ADS. no need to share folder. Secured and Fast.


Regards,
Fraxzi
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Tue Nov 17, 2009 11:28 AM
Hello!

Thanks for hint about adsserver.ini - that's very useful.
My ADSSERVER.INI
[ServerAliases]
C_AAPL = C:\AAPL


I've added the table to the .ADD and I was able to open it and write to it via Internet :-)
(my ADD "path" is now "\\192.168.1.16:52216\c_aapl\")

use druga
G_Msg(DRUGA->PRVA_ID)
DRUGA->PRVA_OPIS := AllTrim(DRUGA->PRVA_OPIS)+" T"
G_Msg(DRUGA->PRVA_OPIS)


But it would be great if I could open DBF tables via AIS without adding them to the .ADD.
I've tried with

use "\\192.168.1.16:52216\c_aapl\ads91\dat\prva.dbf" alias PRVA1


but it returns error ADSCDX/5132: AE_INVALID_OBJECT_NAME (The specified database object name is not valid.)

BTW, is it possible to add and remove tables from .ADD programmaticaly via Harbour/FWH?

Thanks, Roman
© I'm not patented!
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Tue Nov 17, 2009 11:37 AM
Hello!

TimStone wrote:AIS is not supported with LOCALSERVER. You have to buy the product to use it. You can get details at Advantage website.


I'm using 30-day trial of ADS 9.1: http://marketing.ianywhere.com/forms/ADS91-30-Day

Regards, Roman
© I'm not patented!
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Tue Nov 17, 2009 03:27 PM
One more question: How can I use AdsOpenTable in Harbour/FWH?
I can find this function both in rddads.lib and ace32.lib, but when I try to link it with my app, I
receive an error: Unresolved external '_HB_FUN_ADSOPENTABLE'. It seems that it is not implemented (yet) ...

Thanks, Roman
© I'm not patented!
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Thu Nov 19, 2009 04:05 AM
Yes you can add table to .ADD programaticaly.

1. delete the existing alias from your .ADD using :
Code (fw): Select all Collapse
 AdsDDRemoveTable( 'your alias',,,hADSHandle )   //=>lSuccess, but return doesn't matter.


2. add your table (assuming the table is in your C:\AAPL )
Code (fw): Select all Collapse
AdsDDAddTable( 'your alias', 'table path'+'table',, hADSHandle )  //=> lSuccess


3. Open it simple as this:
Code (fw): Select all Collapse
 use table alias youralias shared



Good Luck!
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Thu Nov 19, 2009 05:50 PM
Hello!

fraxzi wrote:Yes you can add table to .ADD programaticaly.

1. delete the existing alias from your .ADD using :
Code (fw): Select all Collapse
 AdsDDRemoveTable( 'your alias',,,hADSHandle )   //=>lSuccess, but return doesn't matter.


2. add your table (assuming the table is in your C:\AAPL )
Code (fw): Select all Collapse
AdsDDAddTable( 'your alias', 'table path'+'table',, hADSHandle )  //=> lSuccess


3. Open it simple as this:
Code (fw): Select all Collapse
 use table alias youralias shared



Thanks.

Good Luck!


Hmm. Now my test app is running on the internet. When I access the ADS via my Internet provider, the
application is running OK (because PING reply time < 1ms).

But when I connect from client via different ISP, the app is too slow, because PING reply time is
between 16 and 18 ms ...

BTW, what are your average PING response times ?

Thanks, Roman
© I'm not patented!
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Free tables and Advantage Internet Server (AIS)
Posted: Sat Nov 21, 2009 02:41 AM

Hi Roman,

Ping response time is unpredictable on ADSL.. (depending on the bandwidth)

on 2Mbit:

less than or equal to 200ms is considered fast.

Regards,
Fraxzi

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion