I'm very new to jdbc and sql and I cannot see what is wrong with the sql statement above - it does not error and it does not update the mysql database.
Can anyone see anything wrong with sql.
Any help will be greatly appreciated.
Cheers Joe.
stu derby
Ranch Hand
Joined: Dec 15, 2005
Posts: 333
posted
0
First, I'd write it like this:
Second, there of course needs to be a row that matches in your database.
Third, if you've set autocommit off (somewhere else), which you generally should do, you will need to commit your changes. [ May 01, 2006: Message edited by: stu derby ]
stu derby
Ranch Hand
Joined: Dec 15, 2005
Posts: 333
posted
0
Oh.. Now that I look at it more closely, I see that you're passing in a ResultSet.
ResultSets are always positioned BEFORE the first row, you have to call ResultSet.next() to advance the next row.
Also, while I don't think this is a problem you have, keep in mind that re-executing the same statement will close a previous ResultSet.