This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: ORA-01722: invalid number

 
sac gupta
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my Query is
stmt.executeUpdate("update AUTH set PASS='"+new1+"' where UID='"+uid+"'");

whert table defines as
create table AUTH(ID varchar2(15),PASS varchar2(15) ,primary key (ID))

I am facing problem
java.sql.SQLException: ORA-01722: invalid number

Pls help me as soon as possible email id sachin17sep@gmail.com
 
Binu Sen
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your table does not have any column called UID....
 
stu derby
Ranch Hand
Posts: 333
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Binu Sen:
Your table does not have any column called UID....


And if it did, and it was a numeric column, then your SQL is wrong. Don't put quote characters around numeric data, just around character data.

Better yet, use PreparedStatement instead, it's what the grown-up JDBC programmers use (mostly).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic