Subject Re: [IBO] TIBOQuery EditSQL with an anonymous sql block
Author Luis Solar
Hello Hellen,

At 12:13 AM 24/10/2003 -0300, you wrote:
>> :ItemId, :ProductId, :Value, :OrderId
>> , :ItemId /* return a value */
>You're getting the error actually because you have included the output
>parameter in the input parameter list. You don't do that. Execute
>Procedure takes only only input arguments. IBO sets *itself *up for the
>output parameters when it calls and processes Prepare().

Does the output parameter have to have the same name of the dataset's field
(suposing I modify some fields at server side)?

I supose you cannot use the returning_values clause at EditSQL,
InsertSQL,,,,etc ?

>>Is there a better way to return the new created identifier?
>Yes, certainly .
>Since you are *passing* the itemID in the stored procedure, use the client
>function Gen_ID (available on both the ib_connection and ibodataset
>objects) to get the identifier over to the client *before* you post the
>update. It has the same effect, plus one more benefit: you are not
>dependent on the completion of the post to know what the new itemID
>is. This means that, after the update, IBO already knows which record it
>has to refresh.

OK. I followed your advice and I had to change the identifier generation to
the client side, and put at server side only the insert/update sql
sentences. Everything is fine know :)

Where's gen_id function? I had to use a 'select gen_id(x,y) from
rdb$database' (dual).