The information in this article applies to:
SUMMARYWhen processing a parameterized query involving a datetime field, the Microsoft SQL Server 7.0 Driver version 3.70.06.23 will return the following error message(s):
MORE INFORMATION
The driver will pass parameterized statements to the server, creating input variables based on its knowledge of the parameter. Previous versions of the Microsoft SQL Server ODBC driver would take the value of the variable and insert it into the statement that it was executing, not having to create a variable to pass it to the server. In making the decision on what type of datatype to use to create the parameter, the 3.70.06.23 driver looks at the ColumnSize argument in the SQLBindParameter call. In past drivers, it was not unusual to pass in the size of the TIMESTAMP_STRUCT being passed to the driver. That worked without any problem since the driver took the data from the struct and passed it to the server. Now, the 3.70.06.23 driver looks at the size parameter and uses it to determine which datatype to use for the parameter, smalldatetime or datetime. Smalldatetime has a length of 16, datetime a length of 23 on the server. The struct has a length of 16, so when the driver sees a ColumnSize argument of 16 it assumes it is going to a 16 byte field, and creates a smalldatetime parameter. When it actually gets the data to pass to the server, it sees that it is passing a full datetime value to a smalldatetime variable and truncates the seconds and fractions and then it displays the informative message regarding Fractional truncation. REFERENCESSQL 7.0 Books OnLine, search on: "odbccmpt.exe" Additional query words:
Keywords : kbSQLServ700 |
Last Reviewed: December 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |