C
Claudia Fong
Hello
I'm trying to connect to a sql database using C# console application but
I'm having trouble to connect.. can someone help me?
// Create an empty SqlConnection object.
using (SqlConnection con = new SqlConnection())
{
// Configure the SqlConnection object's connection string.
con.ConnectionString =
"Data Source = "+ // WHAT SHOULD I PUT HERE??
"Database = LibDB;" + // the my DB
"Integrated Security=SSPI"; // integrated Windows security
// Open the Database connection.
con.Open();
}
Cheers!
Claudi
I'm trying to connect to a sql database using C# console application but
I'm having trouble to connect.. can someone help me?
// Create an empty SqlConnection object.
using (SqlConnection con = new SqlConnection())
{
// Configure the SqlConnection object's connection string.
con.ConnectionString =
"Data Source = "+ // WHAT SHOULD I PUT HERE??
"Database = LibDB;" + // the my DB
"Integrated Security=SSPI"; // integrated Windows security
// Open the Database connection.
con.Open();
}
Cheers!
Claudi