aspose file tools*
The moose likes JDBC and the fly likes executeUpdate() returned is -1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "executeUpdate() returned is -1" Watch "executeUpdate() returned is -1" New topic
Author

executeUpdate() returned is -1

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

Please tell me executeUpdate() returned is -1 , what does this indicate ?


Save India From Corruption - Anna Hazare.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2503
    
    8

Ooch, the specs (java.sql.Statement) say:
Returns:
either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing

-1 is an undocumented return value? Please show your update statement.

OCUP UML fundamental and ITIL foundation
youtube channel
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


OR Do you mean getUpdateCount() ? which returns -1 when there no results.
 
Consider Paul's rocket mass heater.
 
subject: executeUpdate() returned is -1