Subject | Re: [firebird-support] Generator error |
---|---|
Author | Martijn Tonies |
Post date | 2010-04-02T08:11:28Z |
Hi,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
> Apr 2, 2010 4:08:24 PM org.apache.catalina.core.StandardWrapperValveDoes the generator already exist?
> invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544351.
> unsuccessful metadata update
> DEFINE GENERATOR failed
> attempt to store duplicate value (visible to active transactions) in
> unique index "RDB$INDEX_11"
>
>
> My java code is below. And the error is above. Does anyone know why I am
> getting this error?
>
>
> Statement statement = connection.createStatement();
> String command = "CREATE SEQUENCE gen_forms";
> statement.executeQuery(command);
> Statement statement4 = connection.createStatement();With regards,
> String command4 = "SELECT NEXT VALUE FOR gen_forms as GEN_ID FROM
> RDB$DATABASE";
> ResultSet rs4 = statement4.executeQuery(command4);
> id = rs4.getInt("GEN_ID");
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com