[Gambas-user] Question on editing database tables

willy at ...3474... willy at ...3474...
Wed Dec 16 16:24:21 CET 2015


Hi all,


I have used editing on tables multiple times like this for example:

rResultEdit = $hConn.Edit("KasAanvullingen", "KassaCode = &1 AND Time = 
&2 AND Date = &3", sKasAanvulCode, rResultAanvul!Time, 
rResultAanvul!Date)

Now I'm facing a harder one:
I have this table and it needs to be edited, but for that records need 
to be ordered based on code, date and amount
I tried this:

rResultFact = $hConn.Edit("ICDagResFactNee", "ORDER BY Code, Date, 
Amount")

but that results in an empty result. Guess the second argument only 
replaces a WHERE

Now, this order is very important in this case as the proper records 
need to be edited and the default order of the table is not the desired 
one and will lead to data integrity problems when editing as is.
Can one use DB.Edit so the result is ordered in a certain desired 
manner?


Thanks,

gbWilly




More information about the User mailing list