• 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: 2620
14
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!