• Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpSession Attributes  RSS feed

 
Geetu Bahl
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have the problem in the following few lines of code

String attrib = null;
attrib = (String)session.getAttribute("mybook");

Now i need to use this attrib in a where clause of a SQL query. But when i use,it gives me an exception

java.sql.SQLException: ORA-00904:: invalid identifier

Basically in this code, user makes a serach and the i am trying to display the selected items to the user if they are available in the database.

So to make appropriate selection i need to get the value which user searched for and use it in the where clause.But it is giving exception

Please guide ???

Thanks
Geetu
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seeing the exception, it appears that problem is with SQL query u are using. Can you show me the code?
 
Geetu Bahl
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey

Thanks Sanjeev.I figured out and now the code is compiling fine.

Thanks
Geetu
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Geetu"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!