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

T Lee Davidson t.lee.davidson at ...626...
Tue Jan 20 19:55:37 CET 2015


Martin,

I must apologize for slightly misleading you.
The .Update method is the more appropriate one to use to reload the data in the event of a canceled edit.
The .Update method can be applied to the DataSource and it will update all bound children.

And, yes, logically, if you create a record and then do not populate it with data, you would have added a blank record to the DB.
But it really depends on how you create the record to begin with.

For example, the clicking the "New" button in the Databrowser does not create a new record in the database until the data is "Save"d.


Lee
__________

"Artificial Intelligence is no match for natural stupidity."

On 01/20/2015 08:19 AM, Martin McGlensey wrote:
> Lee,
>
>
>
> Thanks for your response. Yes I'm working with only one record at a time.
> I'm unclear as to where to use the refresh method.  The form is used to
> input data including name, address , phone and state. There is the
> possibility that multiple datacontrols may be changed at one time. Must I
> use the refresh method with each datacontrol or can I apply it to the
> datasource? I've tried refreshing the datasource, in the cancel function,
> but that does not seem to work. There is got to be a way of refreshing all
> datacontrols on a form. One other question - If I create a record intending
> to add data and then cancel by not updating the datasource is a blank record
> added to the table?
>
>
>
> Thanks
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> 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