• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using PreparedStatement  RSS feed

 
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
 
Bartender
Posts: 2633
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you try: stmt.executeUpdate();
 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!