NetTalk Central

Author Topic: MultipleActiveResultSets  (Read 4235 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
MultipleActiveResultSets
« on: May 09, 2020, 11:28:43 PM »
in My FM3 extention template
Auto Up SQL Driver String  I have:
/BUSYHANDLING=2 /MULTIPLEACTIVERESULTSETS=TRUE
exactly as the line above

In my webserver window procedure I check the following
        s_web.trace('JMR about to check busy handling')
        s_web.trace('JMR BusyHandling:' & company{PROP:BusyHandling})
        s_web.trace('JMR BusyRetries:' & company{PROP:BusyRetries})   
        s_web.Trace('JMR MARS:' & SEND(company,'/MULTIPLEACTIVERESULTSETS' ))

The JMR MARS trace displays FALSE

Does this send statement reset the MARS to False ?
How do I check that MARS is On ?
 

 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: MultipleActiveResultSets
« Reply #1 on: May 10, 2020, 10:40:27 PM »
perhaps someone more familiar with SQL can comment...

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: MultipleActiveResultSets
« Reply #2 on: May 11, 2020, 06:35:23 AM »
turn on trace and see what happen there, change to MARS_Connection=Yes in your connection string

this is my trace and mars is turn on:

11.0.13505
03944H(1) 10:32:11.933 Allocating Environment Environment 01632080H Time Taken:0.00 secs
03944H(1) 10:32:11.965 Allocating Connection 01637018H Time Taken:0.00 secs
03944H(1) 10:32:11.965 Connecting to Server=WINDOWS8\SQLDEVELOPER;Database=fecipur;UID=**;PWD=********;MARS_Connection=Yes;DRIVER={SQL Server Native Client 11.0}
03944H(1) 10:32:11.996 Warning: 01000 [Microsoft][SQL Server Native Client 11.0][SQL Server]Changed database context to 'fecipur'.<0DH><0AH>[Microsoft][SQL Server Native Client 11.0][SQL Server]Changed language setting to us_english.
03944H(1) 10:32:11.996  Time Taken:0.03 secs

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: MultipleActiveResultSets
« Reply #3 on: May 11, 2020, 09:53:26 AM »
Bear in mind that MARS has to be set for THE FIRST TABLE that you touch on that connection.

From the help (emphasis added):

Quote
This is a connection-wide switch, which means that all files with the same OWNER will have the same MARS support based on the first file that is opened on that connection.

If all tables are closed and a PROP:Disconnect is issued successfully, you will need to SEND the /MULTIPLEACTIVERESULTSETS = TRUE again before the first table is opened.

 
When MARS is set to ON, the BusyHandling switch is still active, but should not be needed. The driver's default behavior is to retry whenever the busy message is encountered, but a busy message should never happen with MULTIPLEACTIVERESULTSETS on (or active).


MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: MultipleActiveResultSets
« Reply #4 on: May 11, 2020, 11:30:17 AM »
Thanks for the reply Guys.
How do I turn trace on ?
How do I look at the Trace ?
I did have MARS_Connection=Yes at the end of my connection string .
I changed it to /MULTIPLEACTIVERESULTSETS=TRUE as per FM3 documentation it puts it in the driver string of the GsmsSQL file that it users to open that table in the sqlconnect procedure before any other table is opened .