I am using PowerBuilder 6.5 with Syabase 11 on an NT workstation.
I would like to make an application connect to two different databases. I put the
following script in the pfc_open event of the application manager object:
// enable transaction registration
gnv_app.of_SetTrRegistration(TRUE)
// register SQLCA
gnv_app.inv_trregistration.of_Register(SQLCA)
// connect to and register ABRN_MRS database
itr_amrs = CREATE n_tr
il_return = SQLCA.of_CopyTo(itr_amrs)
itr_amrs.Database = "ABRN_MRS"
itr_amrs.ServerName = "MTPLZAFINQ3"
ll_return = itr_amrs.of_Connect()
If ll_return <> 0 then
MessageBox("Connection Error", "Unable to connect to ABRN_MRS database.")
End if
gnv_app.inv_trregistration.of_Register(itr_amrs)
itr_atm.of_SetName("AMRS")
------------------------------------------------
The above code isn't producing any errors, so I think it is working.
My question is.... When I open a datawindow, how do I make it use the ABRN_MRS
database?
Instead of saying ...
li_return = dw_1.of_SetTransObject(SQLCA)
I tried...
li_return = dw_1.of_SetTransObject(itr_amrs)
and
li_return = dw_1.of_SetTransObject(AMRS)
In both cases, I got an message saying it doesn't recognize the variable. So I tried
making the n_tr variables global. But then I got an error saying that it couldn't
assign dw_1 to the type u_dw.
Does anyone know what am I doing wrong?
Any help would be greatly appreciated,
Thanks, Jill
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]