Subject Re: [firebird-python] fdb: conversion error from string (datetime value)
Author mariuz
On Thu, Sep 27, 2012 at 12:49:15PM +0300, mariuz wrote:
> On Wed, Sep 26, 2012 at 03:10:07PM -0700, Maximiliano Robaina wrote:
> > Hi (again),
> >
> > Testing django-firebird I caught this error:
> >
> > Error while executing SQL statement:\n- SQLCODE: -303\n- Incompatible column/host variable data type\n- Dynamic SQL Error\n- SQL error code = -303\n- conversion error from string "2012-10-10 16:34:30.072356"', -303, 335544569)
> >
> > (BTW, I can found what -303 is)
> >
> >
> > The sql statement is:
> >
> > INSERT INTO "DJANGO_SESSION" ("SESSION_KEY", "SESSION_DATA", "EXPIRE_DATE")
> > VALUES ('239a187593169b5b12cac16fbb19032c', 'ZTliNzMyZTU4MWZkODI0ODg4ZTM5MzQ3Yzk4YzdlYmQ4ODkzNWE0ODqAAn1xAS4=', '2012-10-10 16:34:30.072356')
> >
> > Then, I run this sql on FlameRobin and I get a different error code:
> > SQL Message : -413
> > Overflow occurred during data type conversion.
> >
> > Engine Code    : 335544334
> > Engine Message :
> > conversion error from string "2012-10-10 16:34:30.072356"
> >
> >
> >
> > So, two questions:
> >
> > 1. What is the real error code -413 or -303?
> >
> > 2. What is the best approach to resolve this? Replaces 6 digits microseconds to 4 digits allowed in Firebird?
>
> You need to do the conversion from 6 to 4 like in
> the kinterbase driver for django
>
>
> 6 digits microseconds are not implemented in Firebird yet
>
> I will open a bug/feature request

Bug is open in the core tracker , please vote for it

http://tracker.firebirdsql.org/browse/CORE-3939