As described here, the Advantage Web Platform enables all kind of applications to access ADS data without the need of using the Advantage Client Engine. In Delphi, you can simply use an HTTPRequest to interact with ADS. But – as always – it’s much easier to use a set of components. Beginning with V12, Advantage ships a Delphi OData Client, a component set that uses Delphi’s REST client package to work with OData servers. The latest supported release for that component set is Delphi XE8. If you own a newer Delphi version, you have to extract the component source from the installer and compile the packages by yourself. This article shows how.
The procedure is almost the same that I’ve used to get the Advantage Delphi Client installed into Delphi 10.1 Berlin (see here for details).
First of all, you need to get the install files. Open Windows Explorer, type %temp% into the address line and hit enter. This will open the temporary folder. Empty this folder to get a better overview. Then launch DelphiOData.exe from your Advantage installer files.

Delphi OData Install Files
Delphi OData Installer Files

Once the installer starts, copy the content of the newly created (GUID) folder into „c:\tmp\delphiodata“. Then cancel the installation. Open a command prompt with administrative privileges and change directory into „c:\tmp\delphiodata“. Then run Windows installer on the command prompt using following options:

msiexec /a "Advantage DelphiOData Components v12.0.msi" /qb TARGETDIR=C:\delphiodata\files

Move the folder DelphiOData from „C:\delphiodata\files\program files\Advantage 12.0“ to „C:\Program Files (x86)\Advantage 12.0“. Within that folder, make a copy of DelphiODataXE8 and rename the copy to DelphiOData101Berlin. Then launch Delphi as Administrator.
Open „Program Files (x86)\Advantage 12.0\DelphiOData\DelphiOData101Berlin\Win32\Source\ODataAPIxe8.dproj“ and save the project as „ODataAPI101Berlin.dproj“. In the project options, configure DCP-Output directory to „.\“ (the current dir). Building the project will result in an error, since Berlin is not yet supported. So open the versions.inc and replace the content with this one: versions.inc
Next, do the same with „ODataAPIxe8d.dproj“. For this package, you need additional steps: remove „ODataAPIxe8.dcp“ from the required packages and replace it with „ODataAPI101Berlin.dcp“. Then compile and install the package. You will be prompted with some components being added to the component palette. Congratulations – you’re done.
To test the components, you can open one of the example project contained in „Program Files (x86)\Advantage 12.0\DelphiOData\Examples“.

Delphi OData Components
Delphi OData Components
Advantage Delphi OData Client
Markiert in:                     

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert