Associating the AdoTransaction object with a DataWindow control or DataStore

You use the SetTransaction method to associate the AdoTransaction object with a DataWindowControl, WebDataWindowControl, or DataStore. The following code creates a DataStore, supplying the name of the DataWindow object and the library where it is stored as arguments in the constructor, and uses the SetTransaction method to associate the DataStore and the AdoTransaction:

[Visual Basic]
Dim ds As New DataStore("mylib.pbl", "d_dept")
ds.SetTransaction(adoTrans)

[C#]
DataStore ds = new DataStore("mylib.pbl", "d_dept");
ds.SetTransaction(adoTrans);