|Get the Transaction
|Have you ever wanted to get the transaction object that is assigned to a
datawindow. This is not an everyday requirement but it is especially useful if you are
building components or frameworks.
Sybase did not see fit to make the Transaction attribute of the datawindow object public,
so we have to do a few tricks of our own to get this information.
Declare an instance variable of type Transaction inside your datawindow ancestor. Then
override the SetTransObject function. Make sure you get the declaration correct. It
returns an integer and takes
a transaction object. Then add the following code to the function:
li_RC = super::SetTransObject( atr_TRObj )
IF li_RC > 0 THEN &
itr_TransObj = atr_TRObj
In use I would normally declare the instance variable as
protected and create a public local function get_transobject() which returned the