Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet How to pass query as parameter?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Vinay
How to pass query as parameter?
0 Answer(s)      4 years and 6 months ago
Posted in : JSP-Servlet


Hi Friends,

I have a real tough time in finding the solution of a problem. I am here to find a real solution of my problem. Please help me solve this problem.
My Problem is:

I have 3 query..
String qry1="select id from table1";
String qry2="select name from table2";
String qry3="select age from table13";

string q=Insert into emp values(?,?,?);
int update=prep.executeUpdate(q);
prep.setString(1,qry1);
prep.setString(2,qry2);
prep.setString(3,qry3);
prep.executeUpdate();

In this, i am not able to pass the value of qry1,qry2,qry3...

Please help me to find the solution.

Its really urgent.......Please

Advertisement
View Answers

Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com