Subject Re: fdb: Error converting datetime data
Author maxi_robaina
--- In firebird-python@yahoogroups.com, Pavel Cisar <pcisar@...> wrote:
>
> 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)))


It works Ok.

Thanks.


---
Maxi.