• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple query using servlets  RSS feed

 
Ann Toh
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
does anyone know how to write codes on multiple query in the servlets.
that is when the user key more than 1 sql queries, the servlet will need to execute all the queries and display a result.
eg. a user enter the following:
select * from company;
select companyid,companyname from company;

does anyone know how to write codes on prepared statement in the servlet.
eg. when user enter select * from company where companyname=::name and address=::address;
it will need to prompt out something for the user to enter for the 2 input fields.
Thanx in advance
 
ALaxmi Shankaran
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the help of Batch Execute it is possible
For more info http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/batchupdates.html
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!