• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

For Oracle 8i, PreparedStatement Query fails for Key.

 
CGI Tokyo
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m using Oracle 8i with JDBC Thin Driver. I use PreparedStatement to do a Table Update, there is a key Criteria for the Update. Though the Record is present in DB (for that key), the Update gives shows 0 Records updated and Table is not updated. If I pad the Key with spaces for the column length (eg if the key column is 20 characters long, and key is msgID, I pad it with 14 spaces), the Query works!!! If there any solution to this problem without Padding?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"CGI Tokyo",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name.
This account will be closed, please re-register and select a new name which meets the requirements.
Thanks.
Dave
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is the column datatype CHAR or VARCHAR? regarding the query,does it work when left padded or right padded with blanks?
...you'll have to change your name first though.
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic