by reinaldocrespo » Tue May 22, 2012 5:22 pm
Hi Tim, and everyone else interested on this subject.
To use ADS ver x you need ACE32.dll version x as well as include files for that version. From ACE32.dll x you can build ACE32.lib version x (if necessary).
To build different rdd_ads.lib for each version it makes sense to have the needed files for each target build version on its own directory. For example:
c:\ads10\acesdk
c:\ads9\acesdk
c:\ads8\acesdk
...
You can obtain each acesdk from the advantage devzone as pointed earlier on this thread. To build rdd_ads.lib for each you only need to set HB_DIR_ADS environment variable to point to the correct acesdk subdirectory. After that simply execute the batch file that creates the lib.
For example to create rdd_ads.lib for ads 10 and xharbour 1.2.xxxx do this:
cd \xharbour_1.2.xxxx\contrib\rdd_ads
set HB_DIR_ADS = c:\ads10\acesdk
make_b32.bat
That's it. The developers of harbour have made the process a lot simpler than it used to be. That should work for any harbour or xharbour version. The only exception would be xhb.com. I have no idea how the commercial xhb.com works. But I'm sure they do and as a commercial product you should be able to get support.
You can now link the newly created .lib to your app and use any of the ace32 version 10 functions that have been ported to adsfuncs.c. Including all the new stored procedures and sql commands (such as MERGE! -I couldn't live without it). While you are at it, I highly recommend learning to use ADS data dictionary. It totally opens a whole new world for dbf -data security, extended field types, SQL, moving a lot of the business logic to the server side using referential integrity, data ranges, valid values, default values, triggers, stored procedures... Even for single user apps or apps used by very few users, it makes a huge difference.
If you are only using the local server, then simply upgrade to version 10 and distribute your newly linked app with version 10 ace32.dll and adslocal32.dll and take advantage of all that's new that is also available on the local server. In this case (local server), I see no need to build multiple versions, just go straight to the latest available version.
Hope that helps.
BTW -I encourage any N.America xharbour/harbour + ADS developer to make plans and come to Boise this next Oct for their next ADS summit. The product manager for ADS at Sybase has expressed interest in creating a summit just for harbour developers. He has even expressed the possibility of bringing Antonio to the summit. The problem is that I have never been able to find more than 3 developers committed to assisting. If enough of us show up, I'm sure we can capture their attention. IMHO, all they need to do is distribute each different version of rdd_ads.lib for each compiler and ads version. That alone would ease the hump of starting to use ADS with harbour.
Reinaldo.