Multiple SQL Server Native Clients (SQL Server Provider)
Multiple SQL Server Native Clients (SQL Server Provider)
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.
			
									
									
						Any help would be appreciated.
- 
				AndreyZ
Re: Multiple SQL Server Native Clients (SQL Server Provider)
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:
			
									
									
						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';Re: Multiple SQL Server Native Clients (SQL Server Provider)
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.
			
									
									
						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)
I am sorry, it was my mistake.Thanks for your input AndreyZ, but I am actually using UniDAC
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.
Re: Multiple SQL Server Native Clients (SQL Server Provider)
Great, thanks for your time.
			
									
									
						- 
				AndreyZ
Re: Multiple SQL Server Native Clients (SQL Server Provider)
If any other questions come up, please contact us.
			
									
									
						Re: Multiple SQL Server Native Clients (SQL Server Provider)
Hello. I see that a new update has come out. Has this issue been addressed?
			
									
									
						Re: Multiple SQL Server Native Clients (SQL Server Provider)
hello,
We are still working on this problem, and we will try to add this fix to the nearest build
			
									
									
						We are still working on this problem, and we will try to add this fix to the nearest build