As of today, Delphi’s latest edition 10.1 Berlin is not supported by SAP’s Advantage Database Server Delphi Client (V12). But there are a lot of ADS developers out there who want to use the latest version. As in the past, it’s quite easy to get the components available – Dr. Bob published an article a couple of years back on how to get it done in Delphi XE2: http://www.drbob42.com/examines/examine1.htm. Let’s use that article as the receipt.

Getting the source code


If you’ve installed the ADS Delphi components with an earlier version of Delphi, you do have the component’s sources available in program files(x86)\Advantage 12.0\TDataset. For all of those who don’t have the sources, there’s an easy way to get them. Download the trial version of ADS (32Bit edition) and extract the installers. Then clean your TEMP folder (%temp%) and launch the adsdelphi.exe installer. Click through the license agreement until the install process starts and prompts you with the Welcome screen.
ADS12Delphi installer
Welcome Screen

Now open Windows explorer and navigate to your temp directory. You should see a newly created folder that contains the MSI package file. Copy all of these files to a separate location and cancel the installer.
MSI package
MSI package

Open a command prompt and navigate to your copy of the MSI package. Launch following command line

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

During the installaion process you’ll get some errors about missing collation files, but that doesn’t matter. After the installation is finished, all required files can be found in C:\adsdelphi\files.
Now edit c:\adsdelphi\files\System32\adslocal.cfg and adjust your settings (e.g. ANSI_CHAR_SET and OEM_CHAR_SET to match your collation). After saving the config file, delete all BPI and BPL files – you don’t need them. Then copy the content of the System32 folder to Windows\System32 (on Win32 systems) or Windows\SysWOW64 (on Win64 systems).
Finally, copy the content of c:\adsdelphi\files\program files to your program files(x86).

Get your packages


In program files(x86)\Advantage 12.0\TDataset make a copy of the latest supported Delphi version and rename it to Delphi101Berlin. In the Delphi101Berlin folder, locate all copies of the versions.inc file (Win32, Win32\source, Win64, Win64\source) and replace them with this versions.inc (you need to remove the .txt extension).
Launch Delphi Berlin as Administrator, open the runtime project Win32\sources\adsdxe8studio.dproj and save the project as adsd101berlinstudio.dproj to the same location. Modify the DCP output directory to the local folder (.\).Then build the project. Now open the design time project adsdxe8dstudio.dproj and save it as adsd101berlindstudio.dproj. Modify the requires section so it points to your newly built adsd101berlinstudio.dcp instead of adsdxe8studio.dcp. Finally built and install the projekt.
Project Manager
Project Manager

Test it


Let’s close Delphi/RadStudio and launch it without adminstrative permissions. Create a new VCL project, add TAdsConnection, TAdsQuery, TDataSource, TDBGrid, and a TDBNavigator component. In your AdsConnection properties, set AdsServerTypes to stADS_LOCAL and ConnectPath to any location on your PC. Then set your AdsQuery’s AdsConnection property to your AdsConnection, RequestLive to True and click on the ellipsis (…) of the SQL property. This should open a SQL utility to edit and test SQL statements (that utility is launched from the AdsAdditionalDesigners.dll we’ve copied earlier from System32). Enter any valid SQL statement or SQL script and press the green play button.
SQL utility
SQL Utility

Click OK to close the utility. Then set your DataSource’s DataSet property to the AdsQuery, and the DBGrid’s and DBNavigator’s DataSource to your DataSource.
In FormCreate, connect your Database and open the Query:

procedure TForm1.FormCreate(Sender: TObject);
begin
  AdsConnection1.Connect;
  AdsQuery1.Open;
end;

Now compile and launch the project. If it launches without error messages, all went well and you can use ADS with Berlin.

Test Project
Test Project

Using ADS with Delphi 10.1 Berlin
Markiert in:        

24 Gedanken zu „Using ADS with Delphi 10.1 Berlin

  • Pingback: Advantage Delphi OData Client – Joachim Dürr softwareengineering

  • 28. August 2016 um 13:33
    Permalink

    Delphi package file is not installed along with the sources in ver 11.0 of Advantage Components. So you have to make a new one and add the PAS files in the source directory. But then there are compile time errors about missing files, solved by adding the missing libraries to the „Requires“ list of the project. Once those are resolved, and everything compiles, installing the BPL into the Delphi 10.1 Berlin IDE results in „Module not found“ error. Could you send your DPK file that you are using to install the components in Delphi 10.1 Berlin?

    Antworten
  • 29. August 2016 um 12:15
    Permalink

    i didn’t use ADS 11 components – I’ve used 12.0. But even with V11, the steps above should work the same. Get the source files from the installer, not the installed folders.
    After installation, the packages usually are located in the windows\system32 folder.

    Antworten
  • 12. September 2016 um 10:47
    Permalink

    Hi Joachim,
    This process doesn’t work with the current downloadable ads12EvaluationVersionWin32.zip file as it contains a ADS12EvaluationVersionWin32 folder, in which are the individual install .exe files like adsdelphi.exe.

    Ian

    Antworten
    • 12. September 2016 um 11:45
      Permalink

      Ian,
      that’s exactly the process I described above [quote] …and launch the adsdelphi.exe installer…[/quote]

      Antworten
      • 12. September 2016 um 12:09
        Permalink

        Yup did that but I didn’t go far enough with the install process.. I let it run through to the next install process and the files appeared.
        Apologies for any inconvenience.

        Antworten
  • Pingback: Delphi Starter – and ADS? – Joachim Dürr softwareengineering

  • 20. September 2016 um 16:29
    Permalink

    Many thanks – just what we needed!

    Antworten
  • 9. November 2016 um 22:30
    Permalink

    Hi

    How about embarcadero comes with an update of rad studio Berlin.
    Do I have to install the ads server again?.
    And I like to know , I got A trial licence for A month for the ads server .
    Is the dataarchitect enough or do I need the server also , for using rad studio.

    koos

    Antworten
    • 16. November 2016 um 10:17
      Permalink

      Hi,
      I’ve installed Update 2 yesterday. For the update you need to uninstall RADStudio first, but you can select an option to keep your settings. This preserves the components.
      As for the server: It’s only required for Client/Server edition. You can always use Local Server, which is included in all Windows and Linux installs (e.g. adsloc32.dll). Local Server is almost compatible, but doesn’t support transactions and some enterprise features (online maintenance, hot backup, replication, …).

      Antworten
  • 25. November 2016 um 21:17
    Permalink

    Thanks very much for all this. I’m trying to use these instructions to install the Advantage TDataSet v11.10 components to Delphi XE10.1 Berlin. I need to use the v11.10 components because we’re using Advantage Database Server version 11.

    I’ve followed the instructions listed above carefully, using the AdsDelphi.exe installer for v11.10 and adapting the components from the Delphi10SEATTLE folder, but when I get to trying to install the adsd101berlindstudio.bpl package, I get the error „Can’t load package C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\adsd101berlindstudio.bpl. The specified module could not be found.“ The .bpl file is definitely there in the specified Bpl folder, as is the adsd101berlinstudio.bpl. Suggestions?

    Antworten
      • 27. Februar 2017 um 23:07
        Permalink

        Seems to be a problem with Delphi 10.1 Update 2. No one has a fix for that?

        Antworten
        • 27. Februar 2017 um 23:12
          Permalink

          Sorry, I forgot to tell that I tried Advantage TDataSet v12.00.0001.

          Best regards
          Mammut

          Antworten
          • 4. März 2017 um 12:50
            Permalink

            Did you start the IDE as Administrator? And did you change the output file directory in the project options?

          • 5. März 2017 um 23:08
            Permalink

            AdsAdditionalDesigners.dll

          • 6. März 2017 um 23:55
            Permalink

            Hi Joachim, sorry, my text did not pass yesterday. So I tried different configs. Now its working.

            Missing admin rights was not the problem. I had luck with two things:
            1. Copy „AdsAdditionalDesigners.dll“ to „%windir%\syswow64“ and to „…\redistribute“
            2. Don’t use different path for „DCB“ and „Bpl“ like you recommended 🙂
            DCB = „.\“
            Bpl = empty

            My paths was wrong:
            DCB= „C:\Program Files (x86)\Advantage 12.0\TDataset\Delphi101Berlin\win32\Source\“
            Bpl= „C:\Program Files (x86)\Advantage 12.0\TDataset\Delphi101Berlin\win32\“

            Best regards
            Mammit

  • 23. Dezember 2016 um 19:53
    Permalink

    Joachim thanks for your very detailed explanation on the use of Advantage 11.10 under Delphi 10.1 Berlin.
    It’s a shame that this has to come from you and the supplier shows so little respect for the Advantage user.
    We are waiting months for support for Delphi 10.1.
    My question:
    The installation according to your instructions went fine but I have a little problem.
    If I create a new app with Advantage 11.10 under Delphi 10.1 it goes well for both 32 and 64 bit.
    I have an app that I use in Windows 10 Seattle that works well both 32 and 64 bit.
    When I transfer this app to Delphi 10.1 Berlin it works fine with the 32 bit version.
    However in the 64-bit version I get the error message „F2613 unit ‚adscnnct“ not found „.
    This is the first advantage unit in the uses list.
    What’s wrong?

    Sincerely,
    Frans Laenen

    Antworten
    • 23. Dezember 2016 um 19:55
      Permalink

      Frans, it sounds like a path issue.

      Antworten
      • 24. Dezember 2016 um 11:35
        Permalink

        Thanks Joachim,

        So the 32bit uses the correct Path. To wich directory should 64bit point to?

        Regards,
        Frans

        Antworten
        • 4. März 2017 um 12:53
          Permalink

          sorry, took a while 🙁
          Create a new project (32Bit Windows) and take a look into the project options | directories it will list the path information for 32Bit Windows platform. If you now add an additional target (64 Bit), it will list different path information at the same place. You just need to add the correct path for the 64Bit target.

          Antworten
          • 5. März 2017 um 11:12
            Permalink

            Thanks Joachim,

            Now it’s ok.

            Best regards,
            Frans

  • Pingback: ADS and Delphi 10.2 Tokyo – Joachim Dürr softwareengineering

Schreibe einen Kommentar

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