Subject | Re: [firebird-support] urgend question |
---|---|
Author | mark@lawinegevaar.nl |
Post date | 2011-06-21T09:57:57Z |
This question should be asked on the Firebird-Java mailinglist.
But to give you a hint, look at getting the generatedkeys functionality of
JDBC:
http://download.oracle.com/javase/6/docs/api/java/sql/Connection.html#prepareStatement%28java.lang.String,%20int%29
and
http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html#getGeneratedKeys%28%29
Also be aware that Firebird supports INSERT .... RETURNING etc for DSQL as
well (which BTW is used in Jaybird). I haven't used it much, but I think
you will be able to get more help on using this on Firebird-Java.
Mark
On Tue, 21 Jun 2011 11:46:07 +0200, "Olaf Kluge" <olaf.kluge@...>
wrote:
But to give you a hint, look at getting the generatedkeys functionality of
JDBC:
http://download.oracle.com/javase/6/docs/api/java/sql/Connection.html#prepareStatement%28java.lang.String,%20int%29
and
http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html#getGeneratedKeys%28%29
Also be aware that Firebird supports INSERT .... RETURNING etc for DSQL as
well (which BTW is used in Jaybird). I haven't used it much, but I think
you will be able to get more help on using this on Firebird-Java.
Mark
On Tue, 21 Jun 2011 11:46:07 +0200, "Olaf Kluge" <olaf.kluge@...>
wrote:
> Hello,into
>
>
>
> we have a problem. Our partner would like to connect to our database
> firebird 2.5 cs. Over jdbc.
>
>
>
> It will be insert a record in a table and return the id from the primary
> index. In firebird trigger can be so:
>
>
>
> Insert into table(field 1, field2) values (data1, data2) returning ID
> :internalvariable.
>
>
>
> How can he get the returning id with a single statement in java (jdbc)
>
>
>
> Thank you very much.
>
>
>
> Best regards
>
>
>
> Olaf
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>