cancel
Showing results for 
Search instead for 
Did you mean: 

SetTransObject dose not check DB Connect State?

lukas7703
Member
0 Kudos

I use Powerbuilder 11.5

The SetTransObject method returns 1 even though the client's Ip is changed and the DB connection is not available.

Does the SetTransObject Method check the DB connection status?

Int li_settrans

li_settrans = dw_1.SetTransObject(SQLCA)

If li_settrans <> 1 Then 
	Disconnect using SQLCA;
	n_connectservice lnv_connectserv
	lnv_connectserv = Create using "n_connectservice"
	If lnv_connectserv.of_ConnectDB ( ) <> 0 Then
		Destroy lnv_connectserv
		MessageBox("error","DB Reconnect failed. ~n[" + String(SQLCA.SQLErrText) + "]", StopSign!)
	Else
	        gf_dw_conn(This)
	End If
End If
anne-petteroe
Community Manager
Community Manager
0 Kudos

Hello,

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members.

Feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will also help you when preparing questions for the community.

By adding a picture to your profile you encourage your readers to respond.

Kind regards,
Anne

chris_keating
Advisor
Advisor
0 Kudos

I think that is expected behaviour. The SetTransObject is simply associating a transaction object with the datawindow (or datastore). As you are using the global transaction object, it is instantiated so would not return NULL. I cannot recall the conditions that might return a -1.

Accepted Solutions (0)

Answers (0)