This is a discussion on wrong column size with SQLDescribeCol within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> To dynamically set the length of a variable (Code in C) to store data, i use the ODBC API ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| To dynamically set the length of a variable (Code in C) to store data, i use the ODBC API function SQLDescribeCol. When a smalldatetime column type from SQLServer is treat by SQLDescribeCol, the COLSIZE return by the function is 16 when YYYY-MM-DD HH:MM:SS contain 19 characters. This case overload my variable with a crashing result of my program. Is it a known problem and how can it be fixed? Thank you! |
| |||
| Hello, It seems to be driver related issue. I'd like to confirm that the data source is a SQL server database. If so, I suggest that you upgrade to the latest MDAC and check the issue again: MDAC Downloads http://msdn.microsoft.com/data/mdac/...s/default.aspx How to obtain the latest MDAC 2.8 service pack http://support.microsoft.com/default...b;en-us;884103 I hope the information is helpful. Sophie Guo Microsoft Online Partner Support Get Secure! - www.microsoft.com/security ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
| ||||
| Try to use SQLColAttributes API call with SQL_DESC_DISPLAY_SIZE parameter. m> To dynamically set the length of a variable (Code in C) to store m> data, i use the ODBC API function SQLDescribeCol. When a m> smalldatetime column type from SQLServer is treat by SQLDescribeCol, m> the COLSIZE return by the function is 16 when YYYY-MM-DD HH:MM:SS m> contain 19 characters. This case overload my variable with a crashing m> result of my program. Igor Shekalev, www.sqledit.com - powerful database tools |
| Thread Tools | |
| Display Modes | |
|
|