Bug #31009 Wrong SQL_DESC_LITERAL_PREFIX for date-time types
Submitted: 13 Sep 2007 23:20 Modified: 12 Oct 2007 13:06
Reporter: Jim Winstead Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.20 OS:Any
Assigned to: Jim Winstead CPU Architecture:Any
Tags: SQL_DESC_LITERAL_PREFIX, SQLColAttribute

[13 Sep 2007 23:20] Jim Winstead
Description:
The wrong SQL_DESC_LITERAL_PREFIX (and SQL_DESC_LITERAL_SUFFIX) is returned for date-time types. They should both be "'", but it is currently returning "0x" and "" because it thinks the date-time types are binary data.

How to repeat:
Call SQLColAttribute(..., SQL_DESC_LITERAL_PREFIX, ...) on a field of any of the date-time types.

Suggested fix:
Ignore BINARY_FLAG on date-time types.
[13 Sep 2007 23:23] Jim Winstead
Report correct suffix and prefix for date-time types

Attachment: bug31009.patch (text/plain), 3.33 KiB.

[19 Sep 2007 12:49] Jim Winstead
Fixed in 3.51.21.
[12 Oct 2007 13:06] MC Brown
A note has been added to the 3.51.21 changelog: 

The wrong SQL_DESC_LITERAL_PREFIX would be returned for date/time types.