SQL to C: Date
SQL_TYPE_DATE
The following table shows the ODBC C data types to which date SQL data may be
converted. For an explanation of the columns and terms in the table, see
C type identifier |
Test |
*TargetValuePtr | *StrLen_or
_IndPtr | SQL-
STATE |
SQL_C_CHAR | BufferLength > Character byte length
11 <= BufferLength <= Character byte length BufferLength < 11 | Data
Truncated data Undefined | 10
Length of data in bytes Undefined | n/a
01004 22003 |
SQL_C_BINARY | Byte length of data <= BufferLength
Byte length of data > BufferLength | Data
Undefined | Length of data in bytes
Undefined | n/a
22003 |
SQL_C_TYPE_DATE | None [a]
| Data
| 6 [c]
| n/a
|
SQL_C_TYPE_ TIMESTAMP | None [a]
| Data [b]
| 16 [c]
| n/a
|
[a] The value of BufferLength is ignored for this conversion. The driver assumes that the size of *TargetValuePtr is the size of the C data type. [b] The time fields of the timestamp structure are set to zero. [c] This is the size of the corresponding C data type. |
|
|
|