Code: Select all
UPDATE "AvailableNumbers" SET "Available" = 0
WHERE ("ObjectType" = :ObjectType) AND ("Available" = 1)
ORDER BY "Created"
ROWS 1
RETURNING "Number";
The TIBCSQL is first prepared, then filled with the input parameters, then executed once. The table is set up to return NULL in the parameter RET_Number (the table is empty).
Afterwards, the table is filled with some data by some different code and the statement is executed again. It will fail with error "Unknown data type of parameter RET_Number" in TGDSCommand.BindParams
This only happens, when NULL had been returned in the parameter before. There's no problems, when a parameter value had been returned by the previous execution of the statement