Monday, November 1, 2010

FAQs – October 2010

Distributing Advantage Client DLLs

The Advantage client engine is required by nearly every client and must be distributed with your application. You must include the ACE32.dll with all Windows 32-bit applications with the exception of Java clients. The Advantage JDBC driver includes all of the necessary client code within the driver itself. Windows 64-bit applications require the 64-bit version of ACE which is available for both version 9 and 10. In version 10 this dll has been renamed to ACE64.dll, with version 9 it is still named ACE32.dll. The 64-bit version of the Advantage client dlls are included with the ACESDK.

You must also include the Advantage Local Server files or Advantage Communication dll for remote server applications. The Advantage Local Server dll is named ADSLOC32.dll, version 10 includes a 64-bit version ADSLOC64.dll. You can also optionally include a configuration file ADSLocal.cfg. When using the remote server you will need to include the Advantage Communication Layer AXCWS32.dll or AXCWS64.dll for 64-bit in version 10.

For information about distributing specific clients see the help file.

Triggers on DBF Tables

You can assign triggers to DBFs when they are added to an Advantage Data Dictionary. These triggers will be executed as long as the table is opened through a data dictionary connection. DBFs that are associated with a data dictionary can still be opened as a free table. When the DBF is opened as a free table any associated triggers will not be fired.

Additionally triggers may not fire on a DBF opened through a data dictionary if the table is currently opened as a free table. More information can be found in this knowledge base article.

10038 Errors On Startup

When Advantage starts up it binds to two ports, one for LAN communication and one for Internet communication. The default port for LAN use is 6262 and the Internet port is disabled by default. If Advantage cannot bind to the specified ports it may cause 10038, Attempt to send a message through a socket failed, error. This can be caused if the LAN and Internet ports are set to the same value or by a corrupt protocol stack. It can also be caused by virtual sockets created by anti-virus programs. See this Knowledge Base article for additional information.

Getting Date/Time Values from the Server

There are several ways to get current date/time values from the Advantage server. There are several date/time functions available in the SQL engine. For the current timestamp use the NOW() function, CURDATE() or CURRENT_DATE() for the current date and CURTIME or CURRENT_TIME for the current time. Many of these can also be used as default values for data dictionary bound tables.

Additionally the AdsConnection object in .NET has a ServerTime property which contains the timestamp of the server. The TAdsConnection component in Delphi has a GetServerTime method which returns a tDateTime value.