[Gambas-user] DataView Help
gradobag at gradobag.it
Tue Jul 11 16:06:49 CEST 2023
Il 11/07/23 15:51, Gianluigi ha scritto:
> Il 11/07/23 15:38, Christof Thalhofer ha scritto:
>> Am 11.07.23 um 14:40 schrieb Gianluigi:
>>> Getting the identity of the added student is easy, in the Save Sub just
>>> Dim sSQL As String = "SELECT MAX(students_id) FROM students;"
>>> Dim i As Integer
>>> i = DataSource1.Connection.Exec(sSQL)
>>> 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
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> Hi Christof,
> right, I understand you have to use 'LastInsertId' 😅
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
here, what you just pointed out brings back to why I insist with Hans
that we want to use the tools that Gambas makes available to us.
Not everyone who writes small business programs has the experience that
Benoit has, that you have or Shordi has, to name a few that we all know.
Gambas shields us from so many mistakes, we only need to be smart enough
to understand how these tools work (of course I am talking about myself).
More information about the User