[Gambas-user] DataView Help
Benoit Minisini
benoit.minisini at gambas-basic.org
Tue Jul 11 15:56:23 CEST 2023
Le 11/07/2023 à 15:38, Christof Thalhofer a écrit :
> Am 11.07.23 um 14:40 schrieb Gianluigi:
>
>> Getting the identity of the added student is easy, in the Save Sub just
>> type:
>>
>> Dim sSQL As String = "SELECT MAX(students_id) FROM students;"
>> Dim i As Integer
>>
>> DataSource1.Save
>> i = DataSource1.Connection.Exec(sSQL)[0]
>> Print "STUDENT ID = "; i
>>
>> I still couldn't select the correct row though, I always end up
>> selecting the last one
>
> This is not good, as soon as not only one person can insert data, it
> will be unreliable.
>
> Alles Gute
>
> Christof Thalhofer
>
This is a feature of the underlying database system, so it's up to it to
make that feature reliable! :-)
--
Benoît Minisini.
More information about the User
mailing list