Page 1 of 1

fetchall = false only with MARS?

Posted: Fri 23 Oct 2015 14:22
by Ludek
I have found out, there are BIG trouble using fetchall = false without MARS active (commands not executing completely, additional db connections, etc., etc.). Is there a way to somehow globally force fetchall = true, if MARS not active?

As I currently have only a few fetchall = false datasets, I am individually testing the first number in TMSConnection.ClientVersion (=>9) & TMSConnection.Options.MultipleActiveResultSets = true. Is there some better way? Forcing native client is actually not possible (everybody is too lazy to install the native client on the workstations...)

Thanks, Ludek.

Re: fetchall = false only with MARS?

Posted: Tue 27 Oct 2015 11:30
by azyk
SDAC has no such separate option, but you can set the FetchAll property of the dataset to True by yourself (e.g. before dataset opening), if MultipleActiveResultSets = False in the connection parameter.

Re: fetchall = false only with MARS?

Posted: Tue 27 Oct 2015 15:05
by Ludek
That is the thing I'm trying NOT to do. And second thing - the setting of the property does not mean at all, that the MARS is really active (especially with provider AUTO and no native client installed...)
:(

Re: fetchall = false only with MARS?

Posted: Fri 30 Oct 2015 13:08
by azyk
To resolve the described problem, try using Direct mode. For this, before establishing connection to SQL Server, set the TMSConnection.Options.Provider property to prDirect.

Re: fetchall = false only with MARS?

Posted: Fri 30 Oct 2015 13:51
by Ludek
Thank you, I'll try.