[ January 03, 2006: Message edited by: Raghavan Chockalingam ]
Originally posted by Raghavan Chockalingam:
I am new to prepared statements and I am trying to insert a new record. But the return value is false,,,but when I had a look at the value in the table, a new record is inserted...why does it return false..how do you normally confirm that an insert/delete operation is successful?
My guess is that you're probably using the execute() method, which returns true if the SQL statement returns a ResultSet and false otherwise.
If you use the executeUpdate() method instead, it assumes that there's no ResultSet and returns the number of affected rows instead. That sounds more like what you want.
Am I on the mark?