-
Praburaj KarthiKeyan
- PowerBuilder
- Thursday, 22 January 2026 06:29 AM UTC
Before i used anv_trans.dbms = 'OLE DB' and DISCONNECT USING anv_trans; ---–this code is working good it total disconnect from the db .
BUT Now i am using the below code
anv_trans.dbms = 'MSO'
anv_trans.Lock = "RC"
anv_trans.LogId = ls_LoginName
anv_trans.LogPass = ls_LoginPass
anv_trans.DBParm = "PROVIDER='MSOLEDBSQL',DATASOURCE='"+ls_ServerName+"',PROVIDERSTRING='Database="+ls_DatabaseName+";WSID="+UserProfile.of_GetHostString()+";App="+ls_AppString+"',CommitOnDisconnect='No',DelimitIdentifier='Yes',PackageProcs=1, StaticBind=1,RecheckRows=1" .
DISCONNECT USING anv_trans; ---–this code is NOT working .it not disconnect from the db .
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
already a PB user faced the same issue in 2023, but no solution for the problem in the below link:-
https://community.appeon.com/qna/q-a/microsoft-ole-db-driver-for-sql-server-disconnect
In PowerBuilder 2022
I am connecting with the new MSO driver in app run from the IDE. The purpose of the app is to make sure I have the correct connection properties before I modify the main application.
I ran sp_who to make sure the AppName and Host values are showing. I discovered that when my app does a disconnect, the process continues about a minute before ending. If I exit PowerBuilder IDE, it ends immediately.
Here are my connection properties:
sqlca.DBMS = "MSO"
sqlca.LogId = "######"
sqlca.LogPass = "######"
sqlca.ServerName = "######"
sqlca.DBParm = "Provider='MSOLEDBSQL19',Database='######',AppName='ex_app'," + &
"BindSPInput=1,DisableBind=1,Encrypt=0,Host='######',TrimSpaces=1"
sqlca.AutoCommit = False
Is this a bug or expected behavior? Is there a way to have the process end when disconnect is called?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.