kniterbasdb and datetime

Laszlo Nagy gandalf at shopzeus.com
Thu Dec 13 06:45:20 EST 2007


  Hi All,

I connected to a FireBird 1.5 database this way:

import kinterbasdb
kinterbasdb.init(type_conv=200) # See 
http://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mxdatetime_required

Then I try to update the database:

sql = "UPDATE TABLE1 SET DATEFIELD=? where ID = ?"
params=[datetime.date(2007,11,01),2341]
cursor.execute(sql,params)

I get this error:

kinterbasdb.ProgrammingError: (-413, 'isc_dsql_execute: \n  conversion 
error from string "2007-11-01"')

What is wrong here?

Thanks,

    Laszlo




More information about the Python-list mailing list