Re: Getting a Mysql auto increment value back into my Java client GUI?



Lew wrote:
BoBi wrote:
ResultSet rs = pstmt.getGeneratedKeys();

If only you were using PostgreSQL, you could use their extension to the INSERT command:
[ RETURNING * | output_expression [ AS output_name ] [, ...] ]

But since we of course try to write database independent code, then
we will not use that even if our current database happen to
be PostgreSQL ...

The getGeneratedKeys method is database independent - it just require
a JDBC 3.0 compliant driver.

Arne
.



Relevant Pages

  • Re: Windows Ada database support.
    ... >>for example) promote the use of Object IDs (basically Row IDs). ... >>Still others don't support the concept at all (MySQL). ... >>within certain database design restrictions). ... PostgreSQL uses an API that opens/creates etc. and returns ...
    (comp.lang.ada)
  • Running queries on large data structure
    ... the money) that parses multiple large text files containing nested data ... data from the PostgreSQL database by different criteria. ... Networks ...
    (comp.lang.python)
  • Re: PHP + PostgreSQL
    ... >database from a program running on the same machine, ... ...again) hold the main rule of this techtables web apps. ... 2-3 - PostgreSQL ... you should have passwords on the various accounts. ...
    (Debian-User)
  • Re: Access and Postgresql
    ... end on the same machine that is hosting the Postgresql program. ... If you have a split Access database with back-end (tables, data, and ... relationships) on the server, and the front-end (queries, forms, reports, ... the fact is they are _hoping_ that it is some other software interfering ...
    (comp.databases.ms-access)
  • Re: Ever thought about using PostgreSQL? Ever wonder what it is all about?
    ... PostgreSQL uses the concept of a database cluster, ... more traditional sence and it's this more traditional mode that needs ...
    (borland.public.delphi.thirdpartytools.general)