[Gambas-user] Delete record in DB
Peter
k-p.richter at ...20...
Sun Mar 13 22:47:02 CET 2005
Hallo Maurice,
thanks for your answer. Your solution of problem in 1 is better, but the
ktoRes.Delete work not!
I have now seen, in Gambas DB-Manager I can not delete an record from table
Konten. Add and change works...
I will beginning with NULL (Create Server etc) and than work with PRIMARY KEY
and AUTO_INCREMENT.
Many thanks, I report from result later.
regards
Peter
Am Sonntag, 13. März 2005 00:13 schrieb Maurice Dumais:
> 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
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=Click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list