missing ODBC datatype -154 (=SQL_TIME)
Original Reporter info from Mantis: DtC17
-
Reporter name: Ditmar Van Belle
Original Reporter info from Mantis: DtC17
- Reporter name: Ditmar Van Belle
Description:
ODBCconn unit contains a list of datatypes, and how these correlate to a field. When using SQL Server Native Client 10.0 (MS SQL Server 2008), time is returned as datatype -154. This time can be parsed exactly as datatype SQL_TIME, except that it's not in the list and thus throws an "unsupported column type" exception.
Steps to reproduce:
Use SQL Server Native Client (included with the MS SQL Server distribution). When using the standard SQL Server ODBC connection, time and date fields are translated into WideString; so in order to obtain this datatype -154, you will need the Native Client.
Additional information:
The fix is only two lines long: add new datatype in ODBCSQL.inc and copy line 1082 [SQL_TYPE_TIME: begin FieldType:=ftTime; FieldSize:=0; end;] to handle it accordingly.
Mantis conversion info:
- Mantis ID: 24419
- OS: XP SP3
- OS Build: 5.1.2600
- Build: ?
- Platform: Win32
- Version: 2.6.0
- Fixed in version: 2.6.4
- Fixed in revision: 24941 (#d4210de8)
- Target version: 3.0.0