Re: Sequence Numbers

Mark Matthews <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve wrote:
> I have a requirement where I need to use MySQl to store the last used
> number for various uses in another system. My only access to MySQL is
> Java, therefore JDBC. Using the MySQL connector, and the standard logic
> for sequence numbers, i.e.:
> 
> update ids set id_value = last_insert_id(id_value + 1) where id_name =
> "SOMEKEY";
> 
> Works great using the MySQL client program, but, when used as a
> statement in JDBC, it chokes on the last_insert_id, it says:
> 
> java.lang.Exception: com.fourd.jdbc.SQLParser::parseUPDATEList:
> Unexpected value - last_insert_id

Steve,

That exception is coming from somewhere in your middleware. It's not an
error issued by MySQL or our JDBC driver.

	-Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFK6wvtvXNTca6JD8RAuoVAKCM1lVz32OIR22muq0qFn7Ab31B5wCgpCX5
hXODPnJjCrs4otseS8mWbXw=
=/GAi
-----END PGP SIGNATURE-----

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.