Today, we will discuss about creating a connection string to establish a connection in Asp.Net
To create a connection string, add following lines to your web.config file.
<connectionStrings>
<add name="connectionstr" connectionString="Data Source=.\DHRUVIN\SQLEXPRESS;Initial Catalog=DEMO_SSRS;Integrated Security=true";User id="user";Password="pass@123" />
</connectionStrings>
Here
Data Source = SQL SERVER Name
Initial Catalog = Name of Database which you want to connect
User id = username of SQL SERVER
Password = password of SQL SERVER
Now your connection string is ready to be used. You can use it in code behind or in web.config file.
Data Source = SQL SERVER Name
Initial Catalog = Name of Database which you want to connect
User id = username of SQL SERVER
Password = password of SQL SERVER
Now your connection string is ready to be used. You can use it in code behind or in web.config file.
For More Updates stay connected On : Learn2All Facebook Page
Amazing Concepts in Video : Video On YouTube
Comments
Post a Comment