[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. The

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

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