Advantage Developer Zone


Specifying Advantage Server Types in Delphi/C++Builder Applications

Friday, July 14, 2006

The easiest way to specify which Advantage server type to use is to set the AdsServerTypes property in the TAdsConnection component. This property allows you to specify which Advantage server type(s) to use when obtaining an Advantage server connection. To add a TAdsConnection component to your form and select Advantage server types:

  1. Click on the Advantage tab in the Delphi/C++Builder Component Palette.
  2. Select the TAdsConnection component.
  3. Select the AdsServerTypes property.

Multiple AdsServerTypes sub-properties exist. stADS_REMOTE refers to the Advantage Database Server, stADS_AIS refers to the Advantage Internet Server, and stADS_LOCAL refers to the Advantage Local Server. If multiple AdsServerTypes sub-properties are set to True, the application will attempt to connect to Advantage servers in the following order: stADS_REMOTE first (if set to True), stADS_AIS next (if set to True), and stADS_LOCAL last (if set to True). If either the stADS_REMOTE connect or the stADS_AIS connect is successful, the stADS_LOCAL connect will never be attempted.