BeginTrans

This function begins a new transaction. The server will track any changes made to the database until either a DB.CommitTrans or DB.RollbackTrans are executed. You cannot have a second DB.BeginTrans for the same data source before committing or rolling back the first one. On a mobile device, there is only 1 data connection and it must be committed or rolled back before another DB.BeginTrans is used.

Group: Database Related Extensions

 


Syntax:

DB.BeginTrans

[bValue =] DB.BeginTrans(vSource)

bValue     (Boolean) Optional – indicates success or failure. If this command should fail because the connection is not available, the remainder of the code should not be executed. There may be unreliable results.

vSource   (Variant) data source name (DSN) or the data source number

Example:

DB.BeginTrans("RFSample")

DB.BeginTrans(1)