Subject | Re: [ib-support] conversion error from string |
---|---|
Author | Svein Erling Tysvær |
Post date | 2002-06-24T10:25:28Z |
Hi Carsten!
creating a primary key or any unique value in a multiuser environment is
asking for trouble! My guess is that the error occurs when two users
"simultaneously" (one transaction starts before the other is committed) is
trying to update the table. The reason you haven't seen it for other tables
is probably because these tables are less frequently added to. Change to
using before insert triggers which set id_rechnung to
GEN_ID(<your_generator_name>, 1) if no value for id_rechnung is set
explicitly.
Set
>I have an after insert trigger like this:I know nothing about your error message, but using this kind of code for
>BEGIN
>update t_rechnung set id_rechnung = (select max(id_rechnung) + 1 FROM
>t_rechnung) where
>NEW.id_rechnung = id_rechnung;
>END
creating a primary key or any unique value in a multiuser environment is
asking for trouble! My guess is that the error occurs when two users
"simultaneously" (one transaction starts before the other is committed) is
trying to update the table. The reason you haven't seen it for other tables
is probably because these tables are less frequently added to. Change to
using before insert triggers which set id_rechnung to
GEN_ID(<your_generator_name>, 1) if no value for id_rechnung is set
explicitly.
Set