Subject Re: [IBO] (unknown)
Author Helen Borrie
At 03:55 PM 28-01-02 +0000, you wrote:
>Hi All!
>I am working on a form where I need to get the value of the generator
>and put it in a variable to display in an edit box on the form. I am
>using the generator as a receipt number and want to allow the user to
>change the receipt number(receipt number is not the key to the
>file). They can then edit the number and I can set the generator to
>the new value.
>The problem is that my sql code is saying the my generator is not

That message means the generator is not defined! Did you create the generator using a tool that double-quotes identifiers? In that case, the name of the generator will be case-sensitive. You'll need to query the system tables or view the metadata through a tool to check the correct case of everything.

>UPDATE Form SET Variable = GEN_ID(Generator_GEN,0) WHERE FILEKEY = 1

By the way, when you fix this problem, the next one will likely be key violations on the unique constraint on your invoice number. Your approach here isn't multi-user-safe...


All for Open and Open for All
Firebird Open SQL Database ยท