I am confused as to why datawindow couldn't link to the transaction object
specified at open event of a window.
please have a look at the following code:
-----------------
window.open()
--------------------
dw_1.of_settransobject(SQLCA)
cb_refresh.event clicked()
-----------------------
cb_refresh.clicked()
-----------------------
long ll_result
ll_result = dw_1.event pfc_Retrieve()
IF ll_result = -1 THEN
SQLCA.of_Rollback()
MessageBox("Error","Retrieve error")
ELSE
SQLCA.of_Commit()
dw_1.SetFocus()
END IF
The code above will produce error:
a database error has occurred
database error code = -1
database error messagE:
database transaction information not available
Call settrans or settransobject function
---------------------------------------------
The strange thing was that if I move statement
"dw_1.of_settransobject(SQLCA)" from window.open() to cb_refresh_clicked()
then suddenly everything runs normal (i.e. dw can make the link to SQLCA
successfully)
At first I thought it was because of the PFC, but after I tested using
dw_1.settransobject(SQLCA) and with dw_1.retrieve()
I still got the same error message.
Have you got any idea for this?
thanks,
rony
Are you changing the dataobject at any point, either with a direct "dw_1.dataobject = " or with a Modify() or
SetSQLSelect() statement?
--
Paul Horan[TeamSybase]
"Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom> wrote in message
news:420e2bc1$1@forums-1-dub...
Then you have to do another SetTransObject(). You can do it anytime between the Modify() statement (or however you're
changing the dataobject) and the retrieve.
--
Paul Horan[TeamSybase]
it also explain why datawindow services enabled before was disabled after a
direct
"dw_1.dataobject = " or with a Modify() or
SetSQLSelect() statement?
TG, it's fixed now.
cheers,
rony
"Rony Santoso" <ron...@yahoo.de> wrote in message news:...
> yes i did, the code was put at ancestor window and failed at descendant
>
> "Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom> wrote in message
> news:420e2bc1$1@forums-1-dub...
> > "Rony Santoso" <ron...@yahoo.de> wrote in message