From: | João Paulo Caldas Ribeiro <jp(at)mobicomp(dot)com> |
---|---|
To: | Michael Paesold <mpaesold(at)gmx(dot)at> |
Cc: | "G(dot)Nagarajan" <gnagarajan(at)dkf(dot)de>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Pooling Prepared Statements |
Date: | 2002-08-29 21:24:42 |
Message-ID: | 3D6E911A.2020303@mobicomp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
You are right. It's 1 statement -> 1 resultset at a time.
As Dave said: "A ResultSet object is automatically closed when the
Statement object
that generated it is closed, re-executed, or used to retrieve the next
result from a sequence of multiple results. "
My mistake.
Thanks.
JP
Michael Paesold wrote:
>João Paulo Caldas Ribeiro wrote:
>
>
>
>>Hi!
>>
>>Im sorry but: 1 connection -> 1 resultset at time.
>>You can have many statement associated to a connection but when you
>>execute the statemente you can only have 1 resultset associated to the
>>connection at time.
>>You can execute 2 statement using the same connection but you have to:
>>
>>
>
>As far as I know, that is not correct. At least if the documentation is
>correct:
>
>"You can use a single Statement instance as many times as you want. You
>could create one as soon as you open the connection and use it for the
>connection's lifetime. But you have to remember that only one ResultSet can
>exist per Statement or PreparedStatement at a given time."
>(http://www.postgresql.org/idocs/index.php?jdbc-query.html)
>
>So it's not 1 connection -> 1 resultset at a time, but 1 statement -> 1
>resultset at a time. I would recommend reading the rest of the documention
>about JDBC (especially section 8.3.1)
>
>Regards,
>Michael Paesold
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly
>
>
>
>
--
----------------------------------------------------------------------------
MobiComp - Mobile Computing & Wireless Solutions
phone: +351 253 305 250 fax: +351 253 305 251
web: http://www.mobicomp.com
----------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | João Paulo Caldas Ribeiro | 2002-08-29 21:58:10 | Re: Pooling Prepared Statements |
Previous Message | Michael Paesold | 2002-08-29 20:32:16 | Re: Pooling Prepared Statements |