| Author |
insert and preparedStatement
|
miguel lisboa
Ranch Hand
Joined: Feb 08, 2004
Posts: 1281
|
|
i'm using this code: but i get an error:
is it not possible to use my insert sql with '?' and preparedstatements? TiA
|
java amateur
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Of course it is possible. But (as the error message says) you cannot use the executeQuery() method to do that. You should use the executeUpdate() method instead.
|
 |
miguel lisboa
Ranch Hand
Joined: Feb 08, 2004
Posts: 1281
|
|
executeUpdate() is the one ;) thanks, Paul
|
 |
 |
|
|
subject: insert and preparedStatement
|
|
|