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

Doubt in JDBC

 
ChakraPani Margani
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai to all members,
First of all thanks to Mr.Krishna Moorthy for sending the clarification to me.

while I running the program I got a RUN TIME Error.

The line at which I face problem is


rs=st.executeQuery("select * from uin where NUM="+UIN);


Here UIN is a string value.

NUM in the database is varchar2 type.

The exception is:Invalid column name..

please clarify my doubt.

Regards,
ChakraPani.M
 
Alice Corman
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Literal string values must be enclosed in single quotes. Otherwise, the database may assume the string is a column name. Try

Edit: added code tags


[ August 25, 2007: Message edited by: Alice Corman ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic