Native Client in SQL Server

  • Hello Friends,

    I am new to SQL Server.

    I have query regarding SQL Server Native Client.

    How to make connection with SQL Server using native client .

    I already make connection using ODBC and OLE DB.

    As in Oracle there is native client for C++ i.e OCI,

    In Postgres there is native client for C++ i.e. libpq

    So is there is such library exist in case of SQL Server 2008

    SQL Server Native Client make connection using ODBC or OLE Db, is there is another way exist to make connection with SQL Server.

    I am using VC++ 6.0 and SQL Server 2008,

    Regards,

    Nilesh

  • You can connect to SQL Server using either ODBC, OLEDB or SQLNCLI (SNAC).

    SQL Native client is a mix of OLEDB and ODBC, but that shouldn't be a concern.

    The connection library is determined by the connection string, where you can opt for any of the above.

    Is this what you're looking for?

    -- Gianluca Sartori

  • Native Client is the most recent driver for the newest version of SQL server for those not using .NET data provider classes (legacy code).

    In my experience SQLNCLI(10) is a better driver than older drivers and provide better error handling and reporting. Also provides access to the enhanced features of SQL Server 2005 and 2008. use Provider=SQLNCLI10 in your connection string if you want to use it.

    The probability of survival is inversely proportional to the angle of arrival.

  • Thanx for help,

    Is SQLNCLI is same as OCI in Oracle..?

    Is SQLNCLI provide their own API for connection or retrieval of data from SQL Server or use api of ODBC or OLE DB...?

    Regards,

    Nilesh

  • nilesh.ldce2007 (11/8/2011)


    Thanx for help,

    Is SQLNCLI is same as OCI in Oracle..?

    Yes

    Is SQLNCLI provide their own API for connection or retrieval of data from SQL Server or use api of ODBC or OLE DB...?

    It's just a transport protocol, a wrapper around TDS protocol. For data retrieval you use data access libraries such as ADO and ADO.NET.

    -- Gianluca Sartori

  • You told that OCI is same as Sqlncli,

    OCI has their own API for connection and data retrieval, but sqlncli has not such api,

    How we use sqlncli in our program for data retrieval,

    I have no idea about sqlncli, would u plz explain it 2 me in detail with coding...Plz....

    Regards,

    Nilesh

  • I'm not a C++ developer, wouldn't know where to start.

    This page on MSDN will probably help you: http://msdn.microsoft.com/en-us/library/ms130892(SQL.90).aspx

    However, keep in mind that SQLNCLI OLE DB provider is a low-level, COM API that is used for accessing data directly at TDS level, but it's OLEDB that exposes its API to the upper levels.

    -- Gianluca Sartori

  • Which give better performance or which is faster way 2 access data out of three:

    1) ODBC

    2) OLE DB

    3) SQL Server Native Client

  • I have never seen any benchmarks comparing these three. If it were me I would only use SQL native client, if only because of its more robust error reporting and access to MARS and other features.

    The probability of survival is inversely proportional to the angle of arrival.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply