Re: PreparedStatement.close()
| От | Barry Lind |
|---|---|
| Тема | Re: PreparedStatement.close() |
| Дата | |
| Msg-id | 3E1CB3E5.3010301@xythos.com обсуждение исходный текст |
| Ответ на | PreparedStatement.close() (Felipe Schnack <felipes@ritterdosreis.br>) |
| Список | 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 :-)
>
В списке pgsql-jdbc по дате отправления: