Subject | Re: [firebird-python] fdb: Error converting datetime data |
---|---|
Author | Pavel Cisar |
Post date | 2012-09-26T08:16:25Z |
Hi,
Dne 25.9.2012 18:37, Maximiliano Robaina napsal(a):
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
Dne 25.9.2012 18:37, Maximiliano Robaina napsal(a):
>That's the problem. While FDB supports automatic conversion of input
> u'2007-05-30 13:20:10' <-- repr of value
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