the connectionstring would be typically like this:
"Data Source=.;Initial Catalog=DatabaseName;Trusted_Connection=true;"
so...
New SqlConnection("Data Source=.;Initial Catalog=DatabaseName;Trusted_Connection=true;"))
if you are using SQL Express then change the data source to:
"Data Source=.\SQLExpress..........."
www.connectionstrings.com has all the connectionstrings for your needs. the connection string is basically a string that contains details on how/where to connect to to access your database.
|