From: | Barry Lind <blind(at)xythos(dot)com> |
---|---|
To: | Felipe Schnack <felipes(at)ritterdosreis(dot)br> |
Cc: | pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: PreparedStatement.close() |
Date: | 2003-01-08 23:27:33 |
Message-ID: | 3E1CB3E5.3010301@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Felipe,
In a browse of the code I don't see what is wrong with the code. The
close method in AbstractJdbc1Statement has the following code:
if (m_useServerPrepare && m_statementName != null)
{ ((AbstractJdbc1Connection)connection).ExecSQL("DEALLOCATE " +
m_statementName);
}
and m_statementName is only ever assigned a value if the prepared
statement is actually executed (it is assigned in the execute method).
So I don't understand how what you are describing is possible.
Can you provide a simple test case that demonstrates the problem?
thanks,
--Barry
Felipe Schnack wrote:
> I have a class with lots of preparedstatements, all server-side
> prepared.
> In a very specific situation, a preparestatement was created, but the
> query was never actually executed (read: executeUpdate() or query() were
> never invoked). Then, when I tried to close the statement an error was
> thrown: "STATEMENT JDBC_STATEMENT_13 NOT FOUND". Obviously this happens
> because the statement was never prepared :-)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Shraibman | 2003-01-08 23:31:07 | Character Encoding WAS: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8() |
Previous Message | Barry Lind | 2003-01-08 23:19:23 | Re: synchronized code |