Object linking and embedding database provider for SQL Server
This article describes about the Microsoft OLEDB providers for SQL Server and also describes how connections are establish with database.
OLEDB
Object linking and embedding Database (OLEDB) is the successor to ODBC. OLEDB is the set of software component that allows a front end connects with the back end. The connection can be created with connection string as follows
Provider=sqloledb;Data Source=server_add;Initial Catalog=database_name;User Id=user_name;Password=password;
|
User can also established a trusted connection with a Database. It is more secure than the previous connection. The connection string used to create trusted connection is as follows
Provider=sqloledb;Data Source=server_add;Initial Catalog=database_name;Integrated Security=SSPI;
|
To use a specific SQL Server instance user can use InstanceName or ServerName in data source field.
Provider=sqloledb;Data Source=server_name\instance_name;Initial Catalog=database_name;Integrated Security=SSPI;
|
User can also connect to DataBase with the help of IP address. Connection string used to create connection is
Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=database_name;User Id=user_name;Password=password;
|
If user receiving errors like 'General network error' or 'sp_setapprole was not invoked correctly' it can be removed by disable application pooling. Application pooling is on by default.
Provider=sqloledb;Data Source=server_name;Initial Catalog=database_name;User Id=user_name;Password=password;OLE DB Services=-2;
|
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here