Running Your Application with Microsoft SQL Server

AcuSQL offers a special runtime DLL (Windows) or shared object (UNIX) for running the product with Microsoft SQL Server. Note that the pre-compiler is unchanged. To pre-compile COBOL programs with embedded SQL, use the procedures found in Pre-compiler Function and Use.

Windows:

The new runtime DLL is named asqlsrvr.dll. You can use this DLL in two ways:

  • Rename the DLL to esqllib.dll for the runtime to use this DLL when attempting to execute any AcuSQL commands.
  • Give the DLL a name of your choice, and set the configuration variable ACUSQL_RUNTIME_DLL to the name you have chosen. Keep the name as asqlsrvr.dll and setting ACUSQL_RUNTIME_DLL to asqlsrvr.dll.

When getting runtime version information, in order to list the versions of the AcuSQL runtime DLLs, the runtime attempts to find and load all AcuSQL DLLs that it knows about. Currently these are esqllib.dll and asqlsrvr.dll. This is why changing the name of the DLL is not recommended.

UNIX:

Set ACUSQL_RUNTIME_DLL to asqlsrvr, which will pick up the appropriate runtime shared object.

ACUSQL_RUNTIME_DLL must be set in the configuration file; this variable cannot be set from the COBOL program. In addition, note that the value of ACUSQL_RUNTIME_DLL cannot be changed from the COBOL program once an AcuSQL command has been executed. In other words, it is not possible to use both esqllib.dll and asqlsrvr.dll in the same run unit.

When connecting to a server, the runtime DLL for the AcuSQL interface to SQL Server environments takes the name of the server, not the name of a datasource. Username and password information is used as described in Environment Variables.

The following statements are not supported by AcuSQL interface to Microsoft SQL Server:

All other statements are supported.