FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ads questions (rene)
Posts: 107
Joined: Tue Apr 11, 2006 04:36 PM
ads questions (rene)
Posted: Mon Nov 06, 2006 02:35 AM

HI Rene , how are you? can you help me with ads? i have 3 questions:

1) how access files in ads server without map drive letters??
2) how use ais to access remotely programs?
3) i use dbfcdxax , how move to adt files?

i use xharbour+fwh+ads server

thanks

Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
Re: ads questions (rene)
Posted: Mon Nov 06, 2006 05:34 PM
Nop wrote:
1) how access files in ads server without map drive letters??


You can:

USE \\servername\sharedresource\folder\dbffile

How ever if you want to work with TCP IP address you have to create an ADS.INI file containing the follow:

[servername]
LAN_IP= xxx.xxx.xxx.xxx
LAN_PORT= 2000

AXWCS32.DLL will look for this INI file in order to connect to the ADS server.

Nop wrote:
2) how use ais to access remotely programs?


This is a little bit complicated to explain, these are the main clues.

1) You have to create a Data Dictionary in the server machine, enable the INTERNET ACCESS to such dictionary, and register at least one user, its password, and enable the internet access to the just created user. To the Data dictionary you have also to register your tables.

2) In your source code, before anything else you have to connect to the data dictionary using the ADSConnect60() function:

IF ADSConnect60("\\server\share\folder\file.add",7,"user", "password")

Where:

"\\server\share\folder\file.add" is the location of the dictionary over the internet. ADS will use the ADS.INI to try to resolve the internet address of the dictionary, in the section server you have to include these two lines:

[server]
INTERNET_IP=your public internet address or a domain name
INTERENT_PORT=2001 (or whatever port you configured in the Advantage Configuration utility)

For example in the samples you can download from: www.google.d2g.com/ads/demos/ you will see in the source code something similar to this:

IF ADSConnect60("\\googleserver\cursos\adsdemos\cibconwn\stc\internte.add",4,"demo","demo")

This means:

1.- The location of the dictionary IN THE LAN
2.- The server type (4 means AIS but you can try 7)
3.- User Name assigned in the datadictionary
4.- Password assigned

Again, the client DLL AXWCS32.DLL will use the ADS.INI to resolve the public internet access:

[googleserver]
LAN_IP=192.168.2.2
LAN_PORT=2001
INTERNET_IP=google.d2g.com
INTERNET_PORT=2000

Again, the parameters INTERNET* in the INI file will be used to resolve the name of the computer over the internet.

Nop wrote:
3) i use dbfcdxax , how move to adt files?


Just change the ADSSetFileType(3) and all the files will be ADT, how ever you have to migrate the old DBFCDX files to turn them into ADT

REQUEST ADS
RDDSETDEFAULT("ADS)
ADSSetServerType(7)
ADSSetFileType(7) // ADT Tables

USE oldfile VIA "DBFCDX"
COPY TO newfile

And you are done

i use xharbour+fwh+ads server
Saludos

R.F.
Posts: 107
Joined: Tue Apr 11, 2006 04:36 PM
ads questions (rene)
Posted: Mon Nov 06, 2006 09:17 PM

Rene, very thanks again.

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
ads questions (rene)
Posted: Tue Nov 07, 2006 02:33 AM

Hi,

What are the advantages of switching to adt vs dbf/cdx?

Reinaldo.

Posts: 107
Joined: Tue Apr 11, 2006 04:36 PM
more one thing
Posted: Tue Nov 07, 2006 08:36 AM

Rene, and if i need use adt and dbfcdx files toguether , in same program? whats the initial configuration??

thanks again

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
ads questions (rene)
Posted: Tue Nov 07, 2006 01:22 PM

NOP;

There is no problem using some tables as DBF/NTX, others as DBF/CDX, and others as ADT/ADI with ADS. You simply specify the RDD used with each.

I've found out that the best way to use ADS is with a Data Dictionary. That way you can even execute SQL statements against you data. And you can keep access to the dbfs restricted to your application away from users on the network browsing the network drive. It works. It is fast. It is secure.

Reinaldo.

Continue the discussion