How to use SQL Server native client ODBC Driver

This article describes how SQL Server native client ODBC driver are connects with the database.
  • 2293

There are two types of SQL Server native client ODBC Drivers 10.0 SQL Server native client ODBC driver and 9.0 SQL Server native client ODBC driver. Connection string used to connect with database is as follows

Provider={SQL Server native client 10.0};Server=server_add;Database=database_name;uid=user_name;Pwd=password;

Provider={SQL Server native client};Server=server_add;Database=database_name;uid=user_name;Pwd=password;

The above connection string is used to connect 9.0 SQL Server native client ODBC driver with database.

Syntax used to connect 10.0 SQL Server native client ODBC driver with database over a trusted connection

Driver={SQL Server native client 10.0};Server=server_add;Database=database_name;Trusted_Connection=Yes;

Syntax used to connect 9.0 SQL Server native client ODBC driver with database over a trusted connection

Driver={SQL Server native client};Server=server_add;Database=database_name;Trusted_Connection=Yes;

Connection string used to connect to an SQL Server instance

For 10.0 SQL Server native client ODBC driver

Driver={SQL Server native client 10.0};Server=server_name\instance_name;Database=database_name;Trusted_Connection=Yes;

For 9.0 SQL Server native client ODBC driver

Driver={SQL Server native client};Server=server_name\instance_name;Database=database_name;Trusted_Connection=Yes;

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.