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.
fetchall = false only with MARS?
Re: fetchall = false only with MARS?
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?
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?
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?
Thank you, I'll try.