SQL type | SQL/C type | C/C++ type | Comments |
SQL_BIT SQL_TINYINT SQL_SMALLINT SQL_INTEGER |
SQL_C_LONG |
long |
|
SQL_DOUBLE SQL_FLOAT SQL_NUMERIC SQL_DECIMAL SQL_REAL |
SQL_C_DOUBLE |
double |
iPrec field of the column of parameter describes number of digits after decimal point. |
SQL_DATE SQL_TYPE_DATE |
SQL_C_DATE |
CGOdbcStmt:: DATE |
Parameter can require to specify 23 as SQL size and 3 as precision. |
SQL_TIMESTAMP SQL_TYPE_TIMESTAMP |
SQL_C_TIMESTAMP |
CGOdbcStmt:: TIMESTAMP |
Parameter can require to specify 23 as SQL size and 3 as precision. |
SQL_CHAR SQL_VARCHAR |
SQL_C_CHAR |
char[n + 1] |
Size of the buffer should be greater than size of field to store zero-terminator. |
SQL_LONGVARCHAR |
SQL_C_CHAR |
char * |
LOB datatype. Cursor doesn't load/send values of LOB fields or parameter while these data are not requested.
MSSQL and Oracle doesn't require specification of size or sql size in parameters, but for
Visual FoxPro driver maximum number of characters in CLOB fields should be specified during binding. |
SQL_BINARY SQL_VARBINARY |
SQL_C_BINARY |
unsigned char[n] |
|
SQL_LONGVARBINARY |
SQL_C_BINARY |
unsigned char * void * |
LOB datatype. Cursor doesn't load/send values of LOB fields or parameter while these data are not requested. |