Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Dr.Bob's Delphi Notes Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
 Dr.Bob Examines... #129
See Also: Dr.Bob's Delphi Papers and Columns

ADS in Delphi XE
Advantage Database Server (ADS) TDataSet descendant for ADS v10 is available for Delphi 2007 and Delphi 2010 - for example - but not yet for Delphi XE. However, it's not hard to create the Delphi XE edition.

I assume you have ADS v10 and the latest TDataSet descendants installed (at least the Delphi 2010 version).

First of all, in the C:\Program Files\Advantage 10.0\TDataSet directory, create a new subdirectory called DelphiXE, and create a Win32 subdirectory inside. From the C:\Program Files\Advantage 10.0\TDataSet\Delphi2010 subdirectory, copy the Win32\Source files over to the DelphiXE\Win32 directory (not in a source subdirectory).

C:\Program Files\Advantage 10.0\TDataSet\DelphiXE\Win32 now contains two .dpr files (adsd2010dstudio.dpk and adsd2010studio.dpk).

Edit the Versions.inc file, and after

{$IFDEF VER210}
  {$DEFINE ADSDELPHI2010}
{$ENDIF}

add the following extra lines for Delphi XE:

{$IFDEF VER220}
  {$DEFINE ADSDELPHIXE}
{$ENDIF}

And also change the error line:

This version of Delphi/C++Builder is not yet supported!

to:

{$DEFINE ADSDELPHIXE_OR_NEWER}
{$IFNDEF ADSDELPHIXE}
  This version of Delphi/C++Builder is not yet supported!
{$ENDIF}

The two .dproj files contain references to RAD Studio\6.0 as well as RAD Studio\7.0 (an oversight?), so I just delete these two .dproj files and instead use the .dpk files.

The two .dpk files have "2010" in their name, and we should rename them to "XE", so that's adsdXEdstudio.dpk and adsdXEstudio.dpk (change the filename, but also the first line, as well as the requires part of the adsdXEdstudio.dpk).'
You may also want to rename the two .res files.

Build the two .dpk files, and install adsdXEdstudio.bpl to get the new components in Delphi XE: TAdsBatchMove, TAdsConnection, TAdsDictionary, TAdsEvent, TAdsQuery, TAdsSettings, TAdsStoredProc, and TAdsTable.

Summary
In this article, I've demonstrated how we can recompile and install the ADS TDataSet component packages for Delphi and RAD Studio XE.


This webpage © 2010 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.