ODBC API, SQL_C_DATE - how to retrieve field data? 
Author Message
 ODBC API, SQL_C_DATE - how to retrieve field data?

I have a problem retrieving data from access97 date/time field. The line I
use is:

SQLBindCol( mystmt,  1, SQL_C_DATE, &dsDate, 0, &cbdsDate );


DATE_STRUCT dsDate;            
SDWORD cbdsDate;

I get "data truncated" message. What's wrong? I also tried to use
to SQL_C_CHAR type but it returned same error ("data truncated"). Other
data fields are retrieved just ok (of course when I don't try to retrieve

Writing date/time value to the field goes ok with:

SQLBindParameter(hStmt, 1, SQL_PARAM_INPUT, SQL_C_DATE,
                        SQL_DATE, 0, 0, &dsDate, 0, &cbdsDate);

Can you help me out?

Thank you,
Damir Colak

Sun, 29 Oct 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Retrieving auto inc fields with ODBC

2. Retrieving field descriptions using ODBC and VC++

3. Retrieving auto inc field using ODBC classes

4. retrieving data field from when binding a Datagrid to a dataset

5. Retrieving data from an Image field

6. ODBC API, MSAccess97 and LongBinary fields

7. Using LONG fields thru ODBC API Calls

8. Trailing nulls removed when retrieving SQL varbinary data through MFC/ODBC

9. I want to use COM for retrieving data from ODBC

10. Oracle and ODBC API - Data Transfers

11. Some problem connectting data source with ODBC API

12. Some problem connecting data source with ODBC API


Powered by phpBB® Forum Software