From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | yphillips(at)dlkconsulting(dot)co(dot)za |
Cc: | "'Pgsql-Jdbc(at)Postgresql(dot) " "Org' (E-mail)" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Stored Functions |
Date: | 2003-08-29 08:51:48 |
Message-ID: | 1062147108.1594.28.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
You need to call curval('sequencename') to get the last id
Dave
On Fri, 2003-08-29 at 04:29, Yolanda Phillips wrote:
> Good day,
>
> Thanks to Barry Lind's response, I am now able to successfully use stored
> functions with JDBC.
>
> However, I've searched the archives and the doc's, but unable to find a
> solution to the following:
>
> I'm wanting to do an insert, then if it was successfull the function should
> return the id. This id is using a sequence.nextval(). How do I return the
> new id?
>
> Help in the right direction will be appreciated.
>
>
> Sincerely,
>
>
> Yolanda Phillips
> Web Applications Developer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
--
Dave Cramer <Dave(at)micro-automation(dot)net>
From | Date | Subject | |
---|---|---|---|
Next Message | Johann Uhrmann | 2003-08-29 11:25:16 | Re: Callbacks for NOTIFY |
Previous Message | Anders Hermansen | 2003-08-29 08:51:19 | Re: Stored Functions |