This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes proble with preparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "proble with preparedStatement" Watch "proble with preparedStatement" New topic
Author

proble with preparedStatement

Kishore Vallabhajosyula
Greenhorn

Joined: Mar 07, 2007
Posts: 2
Hi All,

I am facing a problem with preparedStatement.executeUpdate(). My requirement is that I will execute an update query first and I need to log the result of executing query. My expectation is that, when no records are updated zero will be returned. But all the times it returns the number of rows matched. I tried even getUpdateCount(). Solution should work with both mysql and oracle.

Please advice.

Thanks,
Kishore.
Aditya Kumar
Ranch Hand

Joined: Oct 31, 2006
Posts: 50
Can you please show us the code? It helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: proble with preparedStatement
 
Similar Threads
Batch processing
Career selection J2ee vs. Net
adding a section and subsection dynamically
How to close all child windows from parent window
Data Type Conversion(urgent)