October 6, 2007

Connection strings in asp.net

Before writing connection string to ur C#.net applications
First include System.Data.SqlClient Namespace

The System.Data.SqlClient namespace is the .NET Framework Data Provider for SQL Server.

The .NET Framework Data Provider for SQL Server describes a collection of classes used to access a SQL Server database in the managed space. Using the SqlDataAdapter, you can fill a memory-resident DataSet, which you can use to query and update the database.

For more details about click System.Data.SqlClient Namespace

using System.Data.SqlClient;

SqlConnection conn = new SqlConnection("server=SRISHTI-THILLAI;uid=sa;pwd=1234;database=Teeth");
here SRISHTI_THILLAI is the server name
1234 is the password of your server
Teeth is the database name