Subject conversion error from string
Author Carsten Schäfer
I'm using Firebirds 1.0.794 on Win2000 with ServicPack2 and the new Java Type 4 driver.
I have posted the following some time ago on the java-newsgroup,
but it seems to be a DB-error, because it is a GDS-Exception and I've seen this error with Interclient, too.

Sometimes i get the following exception when i call exceuteUpdate on a PreapredStatement:
java.sql.SQLException: GDS exception: org.firebirdsql.gds.GDSException: conversion error from string "1432"
at org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(
at org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(

There are some setString()-calls im my method, but i'm 100% sure that not with '1432'.
But my id-column(type integer) has an highest entry with 1432.
In my insert statement i do insert.setInt(1, -999) on this id column.
I have two indices on id_rechnung (1 descending(Primary key) and 1 ascending)
I have an after insert trigger like this:
update t_rechnung set id_rechnung = (select max(id_rechnung) + 1 FROM t_rechnung) where
NEW.id_rechnung = id_rechnung;

I only get this on the table t_rechnung, but I've other tables that looks analog to t_rechnung (with id-column and after insert trigger) where i never gets this exception.

If i close my application (and so close all connections to the db) and start it new than everything works fine again for some time.
This error is not reproducable, it happens every few weeks, but not for all of my costumers.

Some explanation ?