Re: Further getLastOID() woes

Поиск
Список
Период
Сортировка
От Paul Thomas
Тема Re: Further getLastOID() woes
Дата
Msg-id 20030901160513.A10691@bacon
обсуждение исходный текст
Ответ на Re: Further getLastOID() woes  (Zak McGregor <zak@mighty.co.za>)
Ответы Re: Further getLastOID() woes
Список pgsql-jdbc
On 01/09/2003 15:28 Zak McGregor wrote:
> On Mon, 1 Sep 2003 06:27:20 -0400 (EDT)
> Kris Jurka <books@ejurka.com> wrote:
>
> > You must either import org.postgresql.jdbc1 or include the full
> > package/class name in your cast.
>
> Thanks, but it isn't that. Anything else I can try?
>
> [zak@zak celerity]$ javac -classpath .:jdbc7.1-1.2.jar DBase.java
> DBase.java:81: cannot resolve symbol
> symbol  : class AbstractJdbc2Statement
> location: package postgresql
>             return
> ((org.postgresql.AbstractJdbc2Statement)(stmt)).getLastOID()
> ;
>

Looking at the sources for the 7.1 JDBC driver, it looks like you should
be saying something like:

return ((org.postgresql.jdbc1.Statement)(stmt).getInsertedOID();

Later drivers would seem to use the format you've just tried. I think the
later drivers will work OK with Postgres 7.1 (I assume that's what you're
using).

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Further getLastOID() woes
Следующее
От: Zak McGregor
Дата:
Сообщение: Re: Further getLastOID() woes