dbsetlversion
Sets the DB-Library client behavior to version 4.2 or 6.0 and later behavior in a LOGINREC structure.
Syntax
RETCODE DBSETLVERSION (
PLOGINREC ploginrec,
BYTE version)
Arguments
ploginrec
A pointer to a LOGINREC structure, which is passed as a parameter to dbopen. You can get one of these pointers by calling dblogin.
version
The DB-Library client behavior to use. Must be either DBVER60 to set DB-Library 6.0 behavior or DBVER42 to set DB-Library 4.2 behavior.
Returns
SUCCEED or FAIL.
Remarks
If this function is not called, the default is DB-Library 4.2 behavior.
Using the DBVER60 value means that Microsoft® SQL Server™ 2000 treats the connection as a DB-Library 6.0 client in every way. SQL Server:
- Returns decimal and numeric data values.
- Returns complete column information (including identity column information) to DB-Library and dbcolinfo.
Using the DBVER42 value (or not calling DBSETLVERSION for the LOGINREC) means that SQL Server treats the connection as a DB-Library 4.2 client. SQL Server:
- Converts decimal and numeric data values to float before returning them to the client.
- Returns limited, version 4.2 column information (not including identity column information) to DB-Library and dbcolinfo.
Note that using DBVER60 is not required to use SQL Server version 6.0 and later server cursors.