From: | Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> |
---|---|
To: | "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Further getLastOID() woes |
Date: | 2003-09-01 15:05:13 |
Message-ID: | 20030901160513.A10691@bacon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 01/09/2003 15:28 Zak McGregor wrote:
> On Mon, 1 Sep 2003 06:27:20 -0400 (EDT)
> Kris Jurka <books(at)ejurka(dot)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(at)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 |
+------------------------------+---------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Zak McGregor | 2003-09-01 15:21:27 | Re: Further getLastOID() woes |
Previous Message | Dave Cramer | 2003-09-01 15:02:39 | Re: Further getLastOID() woes |