Hello,
I have this Firebird 3.x Table:
CREATE TABLE MyTable (
ID SMALLINT GENERATED BY DEFAULT AS IDENTITY,
...
);
I want to use it with a TIBCTable. I insert a new record, post it, select another record, go back to the newly inserted record. If I want to edit this record than this error is shown:
Refresh failed. Found 0 records.
DBMonitor says:
SELECT NULL FROM myTable
WHERE
ID IS NULL AND ...
FOR UPDATE WITH LOCK
Why ID is null? How to get the generated ID from the AutoInc (IDENTITY) field back to the TIBCTable/record?
If played arround 1 hour, but I can't make it work. Which properties must be set with which values?
I have:
MyIBCTableID.Required = false (otherwise posting is not possible)
MyIBCTableID.AutoGenerateValue = arAutoInc
MyIBCTable.Options.ReturnParams = true
MyIBCTable.Options.DefaultValues = true
MyIBCTable.IndexFieldNames = ID
MyIBCTable.KeyFieldNames = ID
MyIBCTable.LockMode = lmLockImmediate
Thank you!
TIBCTable with Firebird AutoInc (IDENTITY) field isn't working
-
- Posts: 10
- Joined: Mon 18 Jun 2018 06:40
Re: TIBCTable with Firebird AutoInc (IDENTITY) field isn't working
Hello,
You can use the DMLRefresh property to implement the behavior you described : https://www.devart.com/unidac/docs/deva ... efresh.htm
wbr, Oleg
Devart Team
You can use the DMLRefresh property to implement the behavior you described : https://www.devart.com/unidac/docs/deva ... efresh.htm
Code: Select all
MyIBCTable.DMLRefresh := True;
Devart Team
-
- Posts: 10
- Joined: Mon 18 Jun 2018 06:40
Re: TIBCTable with Firebird AutoInc (IDENTITY) field isn't working
Thanks, that works!
Re: TIBCTable with Firebird AutoInc (IDENTITY) field isn't working
Hello,
Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.
wbr, Oleg
Devart Team
Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.
wbr, Oleg
Devart Team