This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Update resturns zero rows updated without throwing errors.
ajay
Greenhorn
Joined: Dec 15, 2004
Posts: 6
posted
0
In one of our application code, we are performing executeUpdate on a prepared statement object. This is done in a loop on a large number of records, say 20000. On some occasions, the update fails to update the table with relevant information and returns without throwing any errors.
We need to know the reason why it is not updating the table even though the query is right?
Also, under what conditions does the update return zero rows ?
Steps taken :
1. Create and populate the preapred statement with values.
2. Lock the particular row for update.
3. executeUpdate on this prepared statement object.
There aren't may rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Please read Bear's post more closely: In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Please fix your display name soon, accounts with invalid display names get deleted, often without warning.
The where clause is right and ... Still it fails consistently.
Well then something is wrong, so post your code (like Shailesh suggested) so that we can debug it for you.
By the way, I am currently looking for new employment -- since my current position is only temporary. Perhaps if I solve your problem for you, your employer would consider employing me (instead of you)? Just kidding