• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using PreparedStatement

 
Tim Francisco
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Not sure what I am missing here but its driving me crazy. Its a simple PreparedStatement test program I am trying to test that I keeps failing. Here're the codes:


The exception is


I would appreciate if someone could help me figure out what's not right here.
Thanks.
T
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you try: stmt.executeUpdate();
 
kv ruby
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you check the data type of value in DB?
if it is not integr then you will have to insert values in single quotes.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic