SQL 2012 Native Client and SQL2000

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tonisanta
Posts: 55
Joined: Wed 04 Apr 2007 17:25

SQL 2012 Native Client and SQL2000

Post by tonisanta » Mon 03 Dec 2012 10:43

Hi,
when the MSConnection.Options.Provider is set to prAuto and the PC has "SQL 2012 Native client" installed, when connecting to a SQL-Server 2000 the connection does not succeed and an error is raized, something similar to "Native client cannot connect to SQL2000 or previous". It would be fine if the msconnection would detect the version of the SQLServer and change the provider to prSQL if the server is 2000 or less.
best regards
Toni Santa
SABE SOFT

AndreyZ

Re: SQL 2012 Native Client and SQL2000

Post by AndreyZ » Mon 03 Dec 2012 12:11

Hello,

In the latest SDAC version 6.5.10, we added the TMSConnection.Options.NativeClientVersion property that allows specifying the exact version of SQL Native Client to use. You can avoid the problem with SQL Server 2000 in two ways:
- set the TMSConnection.Options.Provider property to prNativeClient and the TMSConnection.Options.NativeClientVersion property to nc2008 or nc2005;
- set the TMSConnection.Options.Provider property to prSQL.
Please note that there is no way to detect the version of SQL Server without connecting to it. That is why you should control the provider to use.

Post Reply