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?
TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
Re: TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
We cannot reproduce the specified problem. Please send the CREATE script of the table, on which it is reproduced.
Re: TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
Hello Azyk,
you are fully right. With the information i gave you, is it not possible to reproduce it
I will write a small sample app and provide this for further tests.
It seems that it happens in the case that the TUniQuery have a active record filter.
I was confused because, with the previously uses database components, got i in the AfterPost event a value similar to the LastInsertId. Which i have used to reach the newly created record.
However, with the TUniQuery component can i try what i want, the LastInsertId is always zero.
you are fully right. With the information i gave you, is it not possible to reproduce it
I will write a small sample app and provide this for further tests.
It seems that it happens in the case that the TUniQuery have a active record filter.
I was confused because, with the previously uses database components, got i in the AfterPost event a value similar to the LastInsertId. Which i have used to reach the newly created record.
However, with the TUniQuery component can i try what i want, the LastInsertId is always zero.
Re: TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
We will be waiting for a sample from you. You can send it using the contact form at our website: http://www.devart.com/company/contactform.html
Re: TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
Hello Azyk,
thanks for the link.
However, since i know that the LastInsertId is really not provided for SQL Server, had i to find another solution which should work fine.
As long we find out why there is still a lot of network load in table and query if FetchAll = False and FetchRow = 1. Demo and description have i already send.
thanks for the link.
However, since i know that the LastInsertId is really not provided for SQL Server, had i to find another solution which should work fine.
As long we find out why there is still a lot of network load in table and query if FetchAll = False and FetchRow = 1. Demo and description have i already send.
Re: TUniQuery, MS SQL Azure, new record is not complete in AfterPost event
We have received your sample. We will investigate it and inform you about the results.