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... #141
See Also: Dr.Bob's Delphi Papers and Columns

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

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

First of all, in the C:\Program Files\Advantage 10.10\TDataSet directory, create a new subdirectory called DelphiXE2, and create a Win32 subdirectory inside (right now, I only want to make this work for Win32).
From the C:\Program Files\Advantage 10.10\TDataSet\DelphiXE subdirectory, copy the Win32\Source files over to the DelphiXE2\Win32 directory (not in a source subdirectory).

C:\Program Files\Advantage 10.10\TDataSet\DelphiXE2\Win32 now contains two .dpr files (adsdxedstudio.dpk and adsdxestudio.dpk).

Edit the file, and after

  {$IFDEF VER220}

add the following extra lines for Delphi XE:

  {$IFDEF VER230}

And also change the error line:

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


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

The two .dproj files contain references to RAD Studio\8.0 (= XE), so just delete these two .dproj files and instead use the .dpk files.

The two .dpk files have "XE" in their name, and we should rename them to "XE2", so that's adsdXE2dstudio.dpk and adsdXEstudio.dpk (change the filename, but also the first line, as well as the requires part of the adsdXE2dstudio.dpk).
The adsdXEstudio.dpk is the run-time package (that needs to be compiled first), while adsdXE2dstudio.dpk is the design-time package that needs the run-time package (and that will install the components in the Tools Palette).
You may also want to rename the two .res files, and I reckon also the .hpp files, although I've not tested it with C++Builer XE2 at all.

In the requires list of adsdXE2dstudio, make sure to change the reference to adsdXEstudio to adsdXE2studio.

You will then get a compiler error:

  adsdata.pas, line 636:
  "Declaration of 'DataEvent' differs from previous declaration.
Which is about the following line:

      procedure DataEvent( Event: TDataEvent; Info: Longint ); override;

Where the Longint needs to be changed to NativeInt. So it should be:

      procedure DataEvent( Event: TDataEvent; Info: NativeInt ); override;

After this single modification, build the two .dpk files, and install adsdXEdstudio.bpl to get the new components in Delphi XE2: TAdsBatchMove, TAdsConnection, TAdsDictionary, TAdsEvent, TAdsQuery, TAdsSettings, TAdsStoredProc, and TAdsTable.

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

This webpage © 2011 by Bob Swart (aka Dr.Bob - All Rights Reserved.