1. Jim Gunzelman
  2. PowerBuilder
  3. Wednesday, 18 November 2020 19:34 PM UTC

We downloaded PB2019R3 and converted our PB12 application.  We switched the db driver to msoledbsql to connect to our Sql Server 2016 database.  My activity monitor shows 2 connections with the same session ID leading me to believe the multiple active result sets is turned on.  Is this turned on by default?  SHould I leave it turned on?  If it should be off, how do I do that?  I have tried different connection string options to no avail.

 

Thanks

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Thursday, 19 November 2020 02:44 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Jim,

The “MSOLEDBSQL” driver PB 2019 R3 newly supported and the "SNC SQL Native Client(OLE DB)" Driver both enable MARS by default.
If you want to turn off MARS, please refer to the method Mike mentioned, for example:

SQLCA.DBParm = "Database='master',ProviderString='MARS Connection=False'"

Regards,
Ken

Comment
  1. Jim Gunzelman
  2. Thursday, 19 November 2020 13:58 PM UTC


Thanks. That explains how it is on and great example of how to turn off.
  1. Helpful
There are no comments made yet.
Jim Gunzelman Accepted Answer Pending Moderation
  1. Wednesday, 18 November 2020 20:09 PM UTC
  2. PowerBuilder
  3. # 1

This is the PB code we are using with bogus names

 

SQLCA.UserID = "uid"
SQLCA.LogID = "lid"
SQLCA.LogPass = "lpd"
SQLCA.Lock = "RC"
SQLCA.AutoCommit = False
SQLCA.ServerName = "myserver"
SQLCA.DBMS = "MSOLEDBSQL SQL Server"
SQLCA.DBParm = "Database='mydb',TrimSpaces=1,AppName='SIMS',Host='myhost',TimeOut=15,TrustServerCertificate=yes,DateFormat=''\''dd-mm-yyyy\'''',DateTimeFormat=''\''dd-mm-yyyy hh:mm:ss.fff\'''',TimeFormat=''\'hh:mm:ss.fff\'''',PBCatalogOwner='dbo',DelimitIdentifier='No'"

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 18 November 2020 19:47 PM UTC
  2. PowerBuilder
  3. # 2

post your connection string if you want help rather than guesses

 

You should be able to simply set: MARS Connection=false

https://www.connectionstrings.com/ole-db-driver-for-sql-server/enable-mars/

 

also, what do you have for:

OLE DB Services

 

 

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.