update a date on a MySQL table
From: alexjcasol (alexjcasol_at_tiscalinet.it)
Date: 07/21/04
- Next message: Murray: "Re: update a date on a MySQL table"
- Previous message: Tony Morris: "Re: Inserting String into a database that contains the single quote character"
- Next in thread: Murray: "Re: update a date on a MySQL table"
- Reply: Murray: "Re: update a date on a MySQL table"
- Reply: Luke Webber: "Re: update a date on a MySQL table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 21 Jul 2004 06:56:24 -0400
Hi all,
I'm trying to update a date field in a MySQL database, using the following
code:
Statement stmt =
connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery("select * from TabellaProva");
rs.moveToInsertRow();
rs.updateString("Field1", Value1);
rs.updateString("Field2", Value2);
rs.updateInt("Number", 101);
rs.updateDate("DataOrdine", (java.sql.Date)MyDate);
rs.insertRow();
where MyDate is a pure Date value.
If I omit the row with the updateDate statement everything works fine, but
if I include that row I recive a SQL error with no text.
Thank you
alexjcasol
- Next message: Murray: "Re: update a date on a MySQL table"
- Previous message: Tony Morris: "Re: Inserting String into a database that contains the single quote character"
- Next in thread: Murray: "Re: update a date on a MySQL table"
- Reply: Murray: "Re: update a date on a MySQL table"
- Reply: Luke Webber: "Re: update a date on a MySQL table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|