fetchall = false only with MARS?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

fetchall = false only with MARS?

Post by Ludek » Fri 23 Oct 2015 14:22

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.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: fetchall = false only with MARS?

Post by azyk » Tue 27 Oct 2015 11:30

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.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: fetchall = false only with MARS?

Post by Ludek » Tue 27 Oct 2015 15:05

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...)
:(

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: fetchall = false only with MARS?

Post by azyk » Fri 30 Oct 2015 13:08

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.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: fetchall = false only with MARS?

Post by Ludek » Fri 30 Oct 2015 13:51

Thank you, I'll try.

Post Reply