How many statements can be created with one connection

Showing Answers 1 - 2 of 2 Answers

Chaka

  • Jun 12th, 2011
 

As many as you want, as long as it's one-at-a-time and you reset the Statement object after each usage:

Statement st=con.createStatement(SQL_String1)
ResultSet rs=st.executeQuery();
//process rs here
st.close();
st=null;
st=con.createStatement(SQL_String2)
etc
etc

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions