Hello Javaranch!Can any one please inform me under what circumstances does the execute method return more than one resultset.(It is mentioned in the api for the execute ethod of PreparedStatement).If more than one resultset is returned how to handle them.kindly give the dcode snippet which does this. Thanking you in advance. Clkanth
Joined: Jun 08, 2000
Hi there, clkanth, I think the api is referring to handling more than one result, rather than more than one ResultSet. The execute method can support any sql including ones which alter multiple tables in the database, and will return true or false according to if the changes to the database were successful or not. The internal workings of this method allow (somehow, I have no idea how) verification of changes to each of these tables. This is what the api means by multiple results. By the time the method returns a boolean, it has combined the results (successes or failures of each part of the SQL) into either one big yes or one big no. That is my view of how the execute method works and may not be what is truly going on but from looking at the api spec that is what it looks like to me. hope that helps, Paul
Anxiety does not empty tomorrow of its sorrows, but only empties today of its strength. – Charles Spurgeon
Joined: Oct 03, 2000
Point#1 Executing more than on sql statement at the same time. Thus, you may have more than one ResultSet available to process at the same time. Point#2 I think the JDBC2.0 standard. Extended features... Allows a Stored Procedure to return more tha one result set. Very advanced stuff... Not for the faint of heart... Please correct me if i am wrong Any other opinions? ------------------ We learn more from our mistake's than fom our success's.