SQLGetTypeInfo() returns incorrect information for date, time, and timestamp columns. The incorrect information is in columns 4 and 5, the literal prefix and literal suffix. For example, it says for dates, the literal prefix is "{d'" and the literal suffix is "'}". In fact, both should be a single tick mark. If a program obeyed this information, it would produce a date literal like this:
UPDATE foo SET my_date={d'2018-08-28'} WHERE tid=1
which results in a syntax error. The correct syntax is:
UPDATE foo SET my_date='2018-08-28' WHERE tid=1
The text was updated successfully, but these errors were encountered:
{d'2018-08-28'} works with SQL_NOSCAN_OFF because that is the escape format, and the ODBC driver translates it. SQLGetTypeInfo() should advertise what firebird expects natively, not the escape format.
Submitted by: Greg Wittmeyer (gammad)
SQLGetTypeInfo() returns incorrect information for date, time, and timestamp columns. The incorrect information is in columns 4 and 5, the literal prefix and literal suffix. For example, it says for dates, the literal prefix is "{d'" and the literal suffix is "'}". In fact, both should be a single tick mark. If a program obeyed this information, it would produce a date literal like this:
UPDATE foo SET my_date={d'2018-08-28'} WHERE tid=1
which results in a syntax error. The correct syntax is:
UPDATE foo SET my_date='2018-08-28' WHERE tid=1
The text was updated successfully, but these errors were encountered: