Solutions:
SqlConnection oConnection = new SqlConnection("user id='Usename';password='Password ';Data Source='Sql servername ';Trusted_Connection=yes;");
try
{
oConnection.Open();
Messagebox("SQL connection test successfully");
}
catch (Exception test)
{
Messagebox("SQL connection problem");
}
finally
{
oConnection.Close();
}
SqlConnection oConnection = new SqlConnection("user id='Usename';password='Password ';Data Source='Sql servername ';Trusted_Connection=yes;");
try
{
oConnection.Open();
Messagebox("SQL connection test successfully");
}
catch (Exception test)
{
Messagebox("SQL connection problem");
}
finally
{
oConnection.Close();
}
No comments:
Post a Comment