ok, we will add this, I was not sure it can be usefull.
Do we need to call "getMoreResults()" before or affter "getResultSet". As I
understand documentation
we must call "getResultSet" first (I have never used it in practice).
----- Original Message -----
From: "george stewart" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 8:57 PM
Subject: Re: [dbutils] query with results
> "Juozas Baliuka" <[EMAIL PROTECTED]> writes:
>
> > Do you know some use case for this ?
> >
> > As I understand it must look like this:
> >
> > ResultSet last = null;
> > try{
> > if (pstmt.execute()) {//it can be update or select
> > do{
> > last = pstmt.getResultSet();
> > rsh.handle(last);
> > }while(pstmt.getMoreResults()); //closes resultset and
> > retrieves next;
> > }
> > }finally{
> > close(last);
> > }
> >
> >
>
> One commonly used case is for retrieving a identity for databases which
support that.
>
> For sql server, "SELECT @@identity" would follow you insert statement.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]