Advantage Developer Zone


Accessing Advantage Over A Wide Area Network

Friday, January 26, 2007

Database applications are typically ran inside the firewall of a Local Area Network (LAN). However, sometimes it is necessary to connect to data through a Wide Area Network (WAN) connection, such as a dedicated connection between offices or the Internet. When connecting to other networks, there are almost always firewalls for network security. These firewalls need to be configured to allow Advantage communication.

Advantage Communication Layer

Advantage has a robust communication layer that utilizes many mechanisms for discovering Advantage Servers. These discovery mechanisms include mailslots, NetBIOS, and multicast. All of the discovery mechanisms are run concurrently to make the discovery process as quick and as efficient as possible. Advantage uses the first successful discovery response to determine the address of the server. Once the Advantage Database Server is confirmed on the specified computer, the communication layer establishes a connection.

Discovery can be bypassed by specifying an IP address and port number for a particular server. When bypassing discovery, the Advantage communication layer connects directly to the Advantage Database Server using the specified IP address and port, and attempts to open a connection.

Both of these mechanisms may have problems in a WAN configuration. The Advantage discovery methods are generally restricted over a WAN connection; therefore, specifying an IP address and port is recommended method for WAN connections. Firewalls, which are also commonly used with a WAN connection, restrict traffic to specified ports and must be configured to allow traffic on the configured port for Advantage. 

WAN Considerations

There are many different types of wide area network configurations. In many cases these networks are configured via a Virtual Private Network (VPN). These have the benefit of providing a secure connection between sites through standard internet connections. This keeps the costs low and provides secure connectivity between locations. Additional encryption is not necessary in this situation since it is provided by the VPN. This type of connection must be configured to allow Advantage traffic through a specified port.

Wide area networks can also be configured as a direct connection between locations. In this setup a point to point connection is configured, usually by a telecommunications company, between sites. This type of network is secure since it only routes traffic between the two locations preventing any other access to the network. Advantage should run across this type of network without any special configuration. However, some routers may prevent broadcast traffic between the two points.

Advantage can establish a secure connection between remote locations through basic internet connections. Using an Advantage Internet connection provides both encryption and compression. This requires configuring an internet port and opening that port on the firewalls at both locations. 


Traditionally, Advantage has used UDP/IP for communication. The Advantage communication layer handles the error detection necessary for this protocol and is able to highly optimize the data transmission. Prior to the release of Advantage 8.1, only the Java (JDBC) client could use TCP/IP to communicate with Advantage. Beginning with Advantage v8.1, TCP/IP support has been added to all of the 32-bit clients.

Many network administrators are reluctant to allow UDP/IP traffic between networks. Since this was necessary for Advantage communication prior to 8.1, it may have been a major hurdle to overcome. Now, the Advantage client can be configured to use TCP/IP communication, which many network administrators are more comfortable with.

Because the Advantage UDP communication is more efficient than TCP, it is the default communication protocol in an IP (non-IPX) environment. However, the impact of using TCP/IP is minimal in most cases and should not affect most client applications. 

Configuring the Client Server

By default the Advantage Database Server uses port 6262 for UDP and TCP/IP communication. This port is configurable by using the Advantage Configuration Utility. To change the default port for LAN ( REMOTE ) connections change the LAN Port setting. You must specify an Internet Port if you will be connecting to Advantage across a standard Internet connection. The specified Internet Port must be opened on your firewall to allow communication. The client must be configured to use an Internet connection and you must connect to an Advantage Data Dictionary.

After configuring the port(s) on the server, you must specify the communication type on the client. This can be done in the ADS.INI file or by specifying a communication type within your client application. The default is for the client to use UDP or IPX when available. If a protocol is specified, the client will only attempt communication using that protocol.
The communication type can be specified in the ADS.INI file by setting the appropriate flag. There are three options: USE_TCP_IP, USE_IPX, and USE_UDP_IP. To use one of these protocols, simply set the value equal to 1. Only one of the protocols can be set to 1 within a single ADS.INI file. The syntax for TCP/IP communications is below:

; Force TCP Communication



The communication type can be specified in the connection string for the OLE DB, ADO.NET, ODBC, PHP, DBI and BDP.NET clients. This is set using the CommType within the connection string. Valid options are UDP_IP, TCP_IP and IPX. An example ADO.NET connection string for TCP communication is below:

Data Source=\\Server\Data\MyDictionary.ADD;ServerType=REMOTE; CommType=TCP_IP

The communication type can be specified on the TAdsConnection component with the CommunicationType property. The valid options are ctAdsDefault, ctAdsUDPIP, ctAdsIPX, and ctAdsTCPIP. For information about configuring the communication type with other clients, refer to the Advantage online help files.

Performance and Security Options

Communication compression is available on both Advantage Internet and Advantage Remote connections. This feature can benefit performance over slow connections or when transferring large amounts of data. The performance gain depends on many factors including the processing power of the client and server, how compressible the data is, and the connection speed.

Advantage 8.0 added some additional security measures including communication encryption. Encrypted communication has been available through an Advantage Internet Connection, but now, with Advantage 8.1, it is available through an Advantage Remote Connection.

Communication encryption is controlled by settings in the Advantage Data Dictionary to which the client connects. Communication compression is configured on both the client and the server. The default is to compress communication over an Advantage Internet Connection. At the client, the compression setting can be defined as “Internet”, “Always”, or “Never” either in the ads.ini configuration file or as a connection option. An equivalent setting at the server with the same three values can also be set in the configuration settings. The chart below shows the possible combinations and the resulting compression for each configuration.


With the release of Advantage Database Server 8.1, connections over a Wide Area Network have become easier. TCP support adds an additional option which network administrators may choose over the standard UDP communication. The additional communication options of compression and encryption can also be used for more security and improved performance.