[Gambas-user] Delete record in DB
Maurice Dumais
mdumm at ...647...
Sun Mar 13 00:13:01 CET 2005
Hi Peter,
In answer to (1):
From your code, I assume that:
"Konten" is the name of your MySQL table
"konto" is the name of a field in this table.
After
$hyConnect.Begin
I would write:
ktoRes=$hConnect.Edit("Konten", "konto = &1", ktoCBX.Text)
IF ktoRes.Available THEN
ktoRes.Delete
$hConnect.Commit
END IF
And I would do away with the remainder of the code
As for (2), Yes it is possible if the table is created as follows:
PUBLIC SUB Creer_ModGenTbl()
''''''''''''''''''''''''''''''''
'Création de la table générale des types de modules (Général)
DIM rs AS Result
rs=db.Exec("CREATE table ModGenTbl (SEQ Integer PRIMARY KEY
AUTO_INCREMENT," &
"MOD_TYPE varchar(2) NOT NULL, DESCRIPTION varchar(40) NOT NULL," &
"PROF_NOM_ANGL varchar(6), PROF_NOM_METR varchar(6), DIMS varchar(2))")
CATCH
Message.Error(ERROR.Text)
END
Regards
Maurice Dumais
More information about the User
mailing list