TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
Posted: Tue 13 Jun 2017 14:28
Hello,
when i post a new record into a table via TUniQuery.Post methode, expect i in the AfterPost event that the record is complete posted and refreshed so that i can read all field values, including the identity/autoinc field.
However, it seems the event fires too early. All fields which will be filled by the database are still not there. Only if i overwrite the DoAfterPost methode will i see all fields are properly filled.
So, the AfterPost event is useless. At least as the LastInsertId will not be filled from the component.
Over which explicit way can i get information about a newly posted record? Especially about the record no. or the value of an identity/autoinc field?
when i post a new record into a table via TUniQuery.Post methode, expect i in the AfterPost event that the record is complete posted and refreshed so that i can read all field values, including the identity/autoinc field.
However, it seems the event fires too early. All fields which will be filled by the database are still not there. Only if i overwrite the DoAfterPost methode will i see all fields are properly filled.
So, the AfterPost event is useless. At least as the LastInsertId will not be filled from the component.
Over which explicit way can i get information about a newly posted record? Especially about the record no. or the value of an identity/autoinc field?