How to Create Trusted Connection in .NET Framework
In this article I am going to explain about how to create trusted connection.
Introduction
Here I am explaining how to create trusted connection in .NET framework. There are two way to create trusted SQL server connection string. For creating trusted SQL server connection string. we put data source, initial catalog, user id and password.
Syntax
Data Source=urServerAddress;Initial Catalog=urDataBase;Integrated Security=SSPI;
|
Example
SqlConnection scon = new SqlConnection("Data Source=.;Initial Catalog=db;Integrated Security=SSPI;");
SqlCommand scom = new SqlCommand("SELECT * FROM [dbo].[mcnemp]", scon);
|
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here