Multiple SQL Server Native Clients (SQL Server Provider)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hetfield
Posts: 4
Joined: Fri 17 Aug 2012 20:16

Multiple SQL Server Native Clients (SQL Server Provider)

Post by hetfield » Fri 17 Aug 2012 20:28

My system (win 7x64, delphi xe2) has SQL Server Native Client 10.0 (2008) and 11.0 (2012) installed. Both can only connect to the current SQL version, and only certain previous ones. I need to connect to SQL Server 2000, which I have been doing with native client 10.0. But now I have 11.0 installed, which must have become the default, and now I cannot connect, as native client 11.0 doesn't support SQL Server 2000. Is there any way the specify to Unidac to use native client 10.0 instead of 11.0? Setting OLEDBProvider in SpecificOptions to prAuto or prNativeClient fails, but setting it to prSQL works, but evidently doesn't use the native client. Is there a way to set the default Native Client in Windows? As it stands, the default settings for the SQL Server Provider fails when trying to connect to SQL 2000 with Native Client 11.0 installed.

Any help would be appreciated.

AndreyZ

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by AndreyZ » Mon 20 Aug 2012 06:37

Hello,

If TMSConnection.Options.Provider is set to prAuto , SDAC looks for installed providers using the next sequence: SQL Server Native Client 11, SQL Server Native Client 10, SQL Server Native Client, OLEDB. If TMSConnection.Options.Provider is set to prNativeClient , SDAC looks for installed providers using the next sequence: SQL Server Native Client 11, SQL Server Native Client 10, SQL Server Native Client. The first found provider is used.
To make SDAC use SQL Server Native Client 10, you should set the Provider connection option in the TMSConnection.ConnectString property to SQLNCLI10.1 . For example:

Code: Select all

MSConnection.ConnectString := 'Provider=SQLNCLI10.1';

hetfield
Posts: 4
Joined: Fri 17 Aug 2012 20:16

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by hetfield » Mon 20 Aug 2012 16:02

Thanks for your input AndreyZ, but I am actually using UniDAC (hence posting in the UniDAC forum). The TUniConnection doesn't appear to have a ConnectString property, or any other way to specify the specific provider. The "ProviderName" property doesn't work either, since it can only be "SQL Server" or some other from the drop-down list. The only way to make the connection seems to be to set OLEDBProvider to prSQL in SpecificOptions, and use the non-Native Client provider.

Perhaps this is something that UniDAC can look at, since a new Native client is released with every new version of SQL Server, yet many of us are still stuck connecting to older servers.

AndreyZ

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by AndreyZ » Tue 21 Aug 2012 06:40

Thanks for your input AndreyZ, but I am actually using UniDAC
I am sorry, it was my mistake.
You are right, for the time being, you can work with SQL Server 2000 only by setting the OLEDBProvider specific option to prSQL. We will fix this problem in the next UniDAC build.

hetfield
Posts: 4
Joined: Fri 17 Aug 2012 20:16

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by hetfield » Tue 21 Aug 2012 17:28

Great, thanks for your time.

AndreyZ

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by AndreyZ » Wed 22 Aug 2012 06:43

If any other questions come up, please contact us.

hetfield
Posts: 4
Joined: Fri 17 Aug 2012 20:16

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by hetfield » Tue 02 Oct 2012 21:11

Hello. I see that a new update has come out. Has this issue been addressed?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Multiple SQL Server Native Clients (SQL Server Provider)

Post by AlexP » Wed 03 Oct 2012 13:47

hello,

We are still working on this problem, and we will try to add this fix to the nearest build

Post Reply