SQL Server Native Client - Pros and Cons

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
chkaufmann
Posts: 82
Joined: Sat 01 Jul 2006 11:42

SQL Server Native Client - Pros and Cons

Post by chkaufmann » Thu 21 Mar 2013 08:18

Hi,

having problems with datetime2 and date fields in Sql Server, I found some information in another posting. Basically I should not have the problem with wrong datatype mapping when working with the "Native Client". Is that correct?

What are other advantages / disadvantages when using the Native Client?

cu Christian

AndreyZ

Re: SQL Server Native Client - Pros and Cons

Post by AndreyZ » Thu 21 Mar 2013 08:51

Hello,

UniDAC can work with SQL Server using two providers: OLE DB that is shipped with MDAC, and SQL Native Client that is shipped with SQL Server. You can find the differences between these providers at http://msdn.microsoft.com/en-us/library/ms131035.aspx

chkaufmann
Posts: 82
Joined: Sat 01 Jul 2006 11:42

Re: SQL Server Native Client - Pros and Cons

Post by chkaufmann » Thu 21 Mar 2013 09:00

If I install the Native Client, how does UniDac decide, what provider is used?
Regarding performance, what provider is the preferred choice to use with UniDac?

cu Christian

AndreyZ

Re: SQL Server Native Client - Pros and Cons

Post by AndreyZ » Fri 22 Mar 2013 10:48

To choose the needed provider, you can use the OLEDBProvider specific option. Here is an example:

Code: Select all

UniConnection.SpecificOptions.Values['OLEDBProvider'] := 'prNativeClient';
If OLEDBProvider is set to prAuto (the default value), UniDAC looks for the available provider with the most recent version. It means that UniDAC looks for an available provider in the following sequence: Native Client 11, Native Client 10, Native Client 9, OLE DB. The first found provider from the sequence is used.
If OLEDBProvider is set to prNativeClient, UniDAC looks for an available provider in the following sequence: Native Client 11, Native Client 10, Native Client 9.
If OLEDBProvider is set to prSQL, UniDAC uses the OLEDB provider.
If OLEDBProvider is set to prCompact, UniDAC uses the SQL Server Compact Edition provider.
For more information, please refer to the "UniDAC and SQL Server" article in the UniDAC documentation.

We did not perform any tests comparing performance of Native Client and OLE DB providers. You can perform any tests yourself using UniDAC Trial Edition and decide which provider is more appropriate for you. UniDAC Trial Edition is available at http://www.devart.com/unidac/download.html

Post Reply