private idtype as INT
If typeTfMod Then
InstSql.NewType (1, TypeTextField.Text )
idtype = InstSql.GetLastIdType
End If
In the InstSql module
Sub GetLastIdType
requete = "select max(idtype) from type"
ID = LastID(requete)
End Sub
Sub LastID(requete as String) As Int
Try
Dim Last_ID As Int = Main.SQL.ExecQuerySingleResult (requete)
Catch
Log (LastException)
End Try
Return Last_ID
End Sub