[Gambas-user] DataView Help
Benoit Minisini
benoit.minisini at gambas-basic.org
Wed Jul 12 21:32:40 CEST 2023
Le 12/07/2023 à 21:29, Christof Thalhofer a écrit :
> Am 12.07.23 um 21:14 schrieb Benoit Minisini:
>
>> As LastInsertId may not be reliable, one have to use the DataView.Find()
>> method to find the index of the last inserted record, knowing the
>> primary keys of that record.
>>
>> Now, following what I just said, I will try to add a method that finds
>> the index of the last inserted record automagically.
>
> But please take into account that the last inserted record in a table
> could have been created by another user/connection.
>
> Alles Gute
>
> Christof Thalhofer
>
No, it's just the DataSource Save() method that will take note of the
primary keys of the saved record.
That way, if Save() creates a new record, it will be able to find its
index easily.
Regards,
--
Benoît Minisini.
More information about the User
mailing list