On Tue, 6 Dec 2005, Damon Anderson wrote:
> So did some searching on the forums, lists, etc.. Changed it to this:
> try
> {
> ppS = dd.createPPStatement();
> ppS.setQueryString(
> "INSERT INTO sandwich_side (name) VALUES ('pickles');" +
> "INSERT INTO sandwich ( name, sideid) VALUES('club',
> currval('sandwich_side_id_seq'));" +
> "SELECT currval('sandwich_side_id_seq')");
> ppS.initStatement(); //Prepares the statement.
> ppS.getPreparedStatement().execute();
> if( ppS.getPreparedStatement().getMoreResults())
> rs = ppS.getPreparedStatement().getResultSet();
What this is going to retrieve is two update counts and two ResultSets.
This means you need to call getMoreResults twice to get to the first
ResultSet.
Kris Jurka