Hi, I´ve emailed the list but my problem doesnt seem to have catch much attention. I guess a re-phrasing might help.. It´s pretty simple (I´m using myODBC 3.51 and VC++ 6.0 ) : how do I declare and bind variables/parameters for a TIMESTAMP column?
Here´s what I´ve done so far: I declare my "starttime" var: SQLTIMESTAMP starttime = (SQLTIMESTAMP)(LPCTSTR)"20020705195302"; Prepare my statement: retcode = SQLPrepare(hstmt,(unsigned char*)"SELECT * FROM datav WHERE date_time = ?", SQL_NTS); And bind the parameter: retcode = SQLBindParameter(hstmt,1,SQL_PARAM_INPUT, SQL_C_TIMESTAMP, SQL_TIMESTAMP, 0,0, (void*)starttime, 14, NULL); The application crashes. I tried setting my starttime var to SQLCHAR and SQLINTEGER, with the proper column binding, but it wont work either. Directly executing the statement works, but I my starttime var will change very frequently. Is there any hope for me & TIMESTAMP, or should I alter my table and use a integer column with "TIMESTAMP-style" values... Thanks in advance, and sorry for sending the same problem twice to the list, Mateus Begossi --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php