Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-20 Thread Lewis Balentine
Mr. Speaker, I request permission to revise and extend my previous remarks ... Please see the attached sample application and data base. I used a SQlite Database but in theory these function should operate the same. I tried five ways to cancel the edits to a set of data controls. via

Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-20 Thread Lewis Balentine
Nope, you did not mislead me I was already been looking at these methods, but I had only tried the update function on a dataview control where the data was modified by an external program (that works nicely). I believe that I have tried every combination of: DataSource.Cancel,

Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-20 Thread T Lee Davidson
I believe I have mislead you too, Lewis. My apologies. Look at DataSource.Update. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/20/2015 01:03 PM, Lewis Balentine wrote: Mr. Speaker, I request permission to revise and extend my previous remarks ... Please

[Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-19 Thread Martin McGlensey
Hello, I have a form containing a datasource linked to a MySQL database table. The datasource contains datacontrols to display the data from the underlying table. There are buttons for add, edit, save, delete and cancel. The add button creates a new record. The save button saves the record.

Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-19 Thread Lewis Balentine
use the .Refresh method That assumes that one is using data linked controls. That is not always the case: examples: a date record is displayed/edited as two separate text boxes (i.e. date and time) a person's name is stored in the fields: given_name, initial, family_name

Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols

2015-01-19 Thread T Lee Davidson
Hello Martin, If you are working with only one record at a time, you don't need to use transactions. Transactions are used when multiple records need to be modified in an all-or-none scenario, such as when a record, that is the one in a one-to-many relationship, needs to be deleted. In such a