Determines whether a specific datatype conversion is available within DB-Library.
BOOL dbwillconvert (
INT srctype,
INT desttype );
where
TRUE if the datatype conversion is supported; FALSE otherwise.
When dbconvert is asked to perform a conversion that it doesn't support, it calls a user-supplied error handler (if any) and returns -1.
The dbconvert function can convert data stored in any of the SQL Server datatypes (not all conversions are allowable):
| SQL Server datatype | Program variable type |
|---|---|
| SQLCHAR | DBCHAR |
| SQLTEXT | DBCHAR |
| SQLBINARY | DBBINARY |
| SQLIMAGE | DBBINARY |
| SQLINT1 | DBTINYINT |
| SQLINT2 | DBSMALLINT |
| SQLINT4 | DBINT |
| SQLFLT8 | DBFLT8 |
| SQLBIT | DBBIT |
| SQLMONEY | DBMONEY |
| SQLDATETIME | DBDATETIME |
| SQLDATETIM4 | DBDATETIM4 |
| SQLMONEY4 | DBMONEY4 |
| SQLFLT4 | DBFLT4 |
| SQLDECIMAL | DBDECIMAL |
| SQLNUMERIC | DBNUMERIC |
For more information on datatype conversions, see dbconvert.
dbaltbind, dbbind, dbconvert; DB-Library Options