Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using PreparedStatement  RSS feed

 
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: 2630
17
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!