db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh" <drem...@gmail.com>
Subject Re: [DRDA] Question about DRDAStatement.initialize() method
Date Fri, 24 Feb 2006 18:16:17 GMT
On 2/24/06, Kathey Marsden <kmarsdenderby@sbcglobal.net> wrote:
> Deepa Remesh wrote:
> >On 2/24/06, Kathey Marsden <kmarsdenderby@sbcglobal.net> wrote:
> >
> >
> >I will add this comment, slightly modified, because we are now calling
> >only reset() instead of close in Database.newDrdaStatement. I am
> >rerunning tests after a minor change. Meantime, I will upload a draft
> >patch with comments from you and Knut.
> >
> >
> >
> My point though was that we should still keep close() and call both
> close() of the old statement  and reset() to reset the statement.   Just
> like reset was hidden when it was bundled in close.  The new code with
> only reset() hides the fact that the old statement is getting closed.
> So that is why I suggest something like
>         if (stmt != null) {
>              // close the old statement
>             stmt.close();
>              // reset the statement so we can reuse it for this new statement.
>             stmt.reset();
>             ...
Sorry, I did'nt get it when I first read your mail. I just want to
make sure I got it right this time:

* close() will close and dereference all the instance objects.
* reset() will reinitialize all the variables (with few exceptions as
noted in previous mails)

Is this what you suggest?


View raw message