executeUpdate returns an int indicating the number of rows affected
by the query. It does not return a ResultSet.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
By doing exactly what ypu are doing, but storing the result of the
executeUpdate in an int rather than a ResultSet. You can then check
that the integer is not 0 if you want to make sure that something was
inserted. After you have made this change, try your program again.
If nothing is being inserted, you will at least, probably get a better
error message than the one you are getting now. This error message
is being thrown during compileation. Up to this point, nothing has been
executed.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494