commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfredo Ledezma Melendez <alfredo.lede...@mail.telcel.com>
Subject [DbUtils] Handling null values during an update
Date Tue, 07 Jun 2005 22:31:34 GMT
Hello,

I've been using dbutils with mysql, postgresql, even with SQL Server
successfully for quite a long time. But now I'm facing a little problem with
Oracle9i (thin-driver and jdbc-odbc). I have a table with two fields of type
DATE; when I try to UPDATE a row using methos update from QueryRunner in this
table using null values, it throws the exception:
java.sql.SQLException: Invalid column type Query: UPDATE factura SET
fechaFacturacion = ?, fechaPedido = ? WHERE folioECAC = ? Parameters: [null,
null, 278]
However, using not null values it runs perfect. I've been looking in some forums
and they say the problem is that driver does not how to set null values for
those values of the table. Is there any workaround, somebody has solved this
problem before, should I use PreparedStatement instead of QueryRunner?

Any help would be really appreciated.

Best regards,
____________________________________________
Alfredo Ledezma Meléndez.
Gerencia de Sistemas CRM
Consultor Externo de Sistemas de Atención a Clientes
RadioMovil DIPSA, S. A. de C. V.
Ejército Nacional No. 488, Col. Anahuac, C.P. 11570
México D.F.




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message