Subject | Re: fdb: Error converting datetime data |
---|---|
Author | maxi_robaina |
Post date | 2012-09-27T12:26:37Z |
--- In firebird-python@yahoogroups.com, Pavel Cisar <pcisar@...> wrote:
Thanks.
---
Maxi.
>It works Ok.
> 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)))
Thanks.
---
Maxi.