![]() | ![]() |
Home |
|
|
|
| Chapter 4: ODBC Programming |
|
| ODBC without the driver manager |
ODBC applications do not generally link directly to the ODBC driver. Instead, they link to the ODBC driver manager, which in turn handles the driver or drivers that may be required.
On Windows operating systems, the driver manager is supplied by Microsoft. On other operating systems, other vendors do supply ODBC driver managers; for example, Intersolv and Visigenic supply ODBC driver managers for UNIX. However, driver managers are less generally available than on Windows operating systems.
It is also possible to develop applications that link directly to the ODBC driver. This is particularly useful on operating systems such as UNIX, where your end users may not have access to an ODBC driver manager.
You develop an application that uses the ODBC driver directly by carrying out the following steps:
Use the supplied import library as usual.
For descriptions of the import libraries, see Compiling and linking an ODBC application .
Specify the DRIVER= parameter in the szConnStrIn argument to the SQLDriverConnect function. For example:
szConnStrIn = "driver=ospath/dbodbc6.dll;dbf=c:\asademo.db"
where ospath is the operating system subdirectory of your Adaptive Server Anywhere installation directory.
|
|