[Gambas-user] Conditional edit of a database table

willy at ...3474... willy at ...3474...
Thu Jun 16 21:10:24 CEST 2016


On 2016-06-13 16:45, willy at ...3474... wrote:
> Hi all,
> 
> I have been editing tables successfully using something like:
> 
> rResult = hConn.Edit("error", "id=&1", iId)
> 
> This comes in handy when wanting to edit a record with a certain id and
> works just fine for simple cases.
> But I have a table where the fields id and company (in table error)
> together form the primary key.
> 
> My question: Is it possible to edit a record based on these two
> requirements using db.edit function?
> 
> Something like below doesn't seem to work:
> 
> rResult = hConn.Edit("error", "id=&1 AND company=&2", iId, sCompany)
> 
> and documentation (http://gambaswiki.org/wiki/comp/gb.db/db/edit) isn't
> really helpful.
> 
> Thanks,
> 
> gbWilly

Anyone a sensible answer?

gbWilly




More information about the User mailing list