Detlef:
ADS ver. 6.x is quite old, should be about 4 or 5 years old, the newest version is 8.1, in fact version 6.x is not longer supported and has been discontinued.
What you need:
1) The ADS needed DLL files, you have to place them in the same directory where you EXE file is:
ADSLOC32.DLL: this is a full featured ADS LOCAL Server, supports all the ADS features except two: Is not Client/Server aware, and it doesn't support transactions. You can use it in your personal computer or in LAN enviroments up to 5 users. You are free to distribuite it with your application.
ACE32.DLL: this file contains ALL the ADS functions, you will need this file to create a LIB file to link into your EXE, keep reading.
AXWCS32.DLL: this is the "client" for ADS, no matter which server you use (LOCAL, REMOTE or INTERNET) you will need this file to exist in order to connect to the server.
These are free DLLs that you can distribuite along with your application.
Where to get them ?. They are free, and they are included in the Advantage Data Architech (ARC) which is a free tool, kind of DBU, very useful by the way, you can browse DBFCDX, DBFNTX or ADS tables with it, you can also create "data dictionaries" and use SQL to retireve data from your DBF files, you can download it from:
www.advantagedatabase.com or, for fast:
www.google.d2g.com/ads/ver7/arc32.exe.
I'm refering you to version 7.1 since the ARC is more "understandable" than in version 8.1, however, version 7 DLLs will work perfectly in 8.1.
2) Source Code.
Once you get the DLLs, you have to make some changes in your source code, add this lines at the beging of your source code:
- Code: Select all Expand view
//Requesting the ADSRDD
REQUEST ADS
RDDSETDEFAULT("ADS")
//setting up server type
// 1 = Local Server (no client / server)
// 2 = Remote Server
// 3 = Local + Remot
// 4 = Internet Server
// 5 = Local + Internet
// 6 = Remote+Internet
// 7 = Local + Remote + Internet , best choice
AdsSetServerType(7)
//setting up the file types
// 1 = DBFNTX
// 2 = DBFCDX
// 3 = ADSADI
AdsSetFileType(2)
And basically You are done !!!!!, all the stuff regarding data access remains the same, USE, APPEND, REPLACE all the rest works as usual (commands and functions) thanks to the RDD technology.
There are some extra functions that you may need to call, but basically this all what you need.
3) Compiling and linking:
You will to link 2 libraries into your (x)HB application: RDDADS.LIB and ACE32.LIB.
ACE32.LIB comes from ACE32.DLL, you will need to create the LIB from the DLL, you have to use the program IMPLIB.EXE to do the job (IMPLIB comes with the Borland C++ compiler in the bin directory), sintax:
IMPLIB ACE32.LIB ACE32.DLL
And you are done !!! you have created the LIB from the DLL.
No comes the not-too-easy part, to create the RDDADS.LIB
You can get the RDDADS.LIB from (x)Harbour contributions, it comes in source "C" code, it's highly probably that you may need to rebuild it, but you will find bat files to do the job where the source code is.
Once created the LIBs, just link them to your program, and done !!!!
You are ready to ADS.
Feel free to contact me for further information