blog

Home / DeveloperSection / Blogs / Connection String

Connection String

Uttam Misra4135 21-Oct-2010

Connection stringis the very important part, we use connection string to connect to our database(Database like: MSSQL Server, Oracle, MSACESS etc).

A connectionstring is a string version of the initialization propertiesneeded to connect to a data store and enables us to easily store connectioninformation within our application or to pass it between applications.

Connection String may contain “ServerName”, “DatabaseName”, “UserID”,“Password”

For example:
SqlConnection con = new SqlConnection("server=XYZ\\sqlexpress; database=Hello; uid=sa;password=sa ");
Server Name = ”server=XYZ\\sqlexpress” Database = ”Hello” UserID  = ”sa”
Password =”sa”
//Openconnection   con.Open();
//Closeconnection   con.Close();

Updated 18-Sep-2014
More than 18 years of working experience in IT sector. We are here to serve you best.

Leave Comment

Comments

Liked By