Subject Re: [firebird-python] fdb: Error converting datetime data
Author Pavel Cisar
Hi,

Dne 25.9.2012 18:37, Maximiliano Robaina napsal(a):
>
> u'2007-05-30 13:20:10' <-- repr of value

That's the problem. While FDB supports automatic conversion of input
parameters (other than CHAR/VARCHAR) from strings like KInterbasDB, it
works for StringType, but not UnicodeType.

It's apparently a bug in FDB. Quick fix: in _Tuple2XSQLDA find:

# Fill in value by type
if ((vartype != SQL_BLOB and
isinstance(value, (StringType)))
or vartype in [SQL_TEXT, SQL_VARYING]):

and replace -> isinstance(value, (StringType)))
with -> isinstance(value, (StringType, UnicodeTYpe)))

best regards
Pavel Cisar
IBPhoenix