[Zope-DB] Insert DATE filed in Firebird with sqlvar

Valmir Pimenta valmir at leme.com.br
Thu Nov 20 15:17:23 EST 2003

Hi all,

I'am a novice with Zope and to be honest, not very confortble with
programming too, since i quit doing programs for living a long time ago,
and things change a lot in this area with time... 

I've browsed this list and found this subject came by so many times that
i'am amazed it is not covered in zope book yet. Anyway since i could not
find the answer in a idiot proof maner anywhere, here it goes...

Currently i'am trying to make a simple insert form in a SQL Table and i
can´t figure how to insert a DATE field from a form into the Database.
I´ve seen in the list that i should use the string type, but it seens
that there is some kind of type casting problem between the Database and
the DA.

I currently use Firebird 1.0.3 with the gvibDA 0.9.6 and when i use this

    insert into MEDIAITM
        <dtml-sqlvar cd_media    type="int">,
        <dtml-sqlvar dt_purchase type="string">

I get this nasty message...

Error, Products.gvibDA.gvib.gvibExceptions.DataError: - conversion error
from string ""

And this is the generated SQL...

     insert into MEDIAITM

If someone could please put some light in my path...

Thanks anyway.

Valmir Pimenta

More information about the Zope-DB mailing list