The SetTransObject method is used to bind a Transaction object with a DataStore or DataWindow control. The Transaction object provides the information necessary for communicating with a database. Since the SetTransObject method binds the Transaction object with the control, the Retrieve and Update methods execute faster. This is because the database is not required to be connected or disconnected with each method call.
However, if the DataWindow object associated with the DataWindow control (or DataStore) is changed or the database is disconnected and reconnected, SetTransObject must be called to re-bind the connection.
Note: Although, the SetTransObject method is similar to the SetTrans method, SetTransObject call is more efficient and provides better control over transactions.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.