If you can still programmatically connect to MyServerName\SQLEXPRESS, but don't see it in SQL mgmt studio, try enter MyServerName\SQLEXPRESS directly instead of attempting to select it from the drop down list.
Printable View
If you can still programmatically connect to MyServerName\SQLEXPRESS, but don't see it in SQL mgmt studio, try enter MyServerName\SQLEXPRESS directly instead of attempting to select it from the drop down list.
why you believe so hardly its about how to connect?
its good article that showes sql server run.
Code:string strCnn = ("data source='" + strServerName + "';integrated security=SSPI");
SqlConnection server = null;
try
{
server = new SqlConnection(strCnn);
server.Open();
return true;
}
catch (SqlException ex)
{
//ClsMsg.message(ex.Message);
return false;
}
catch (Exception ex)
{
//throw new Exception(ex.Message);
return false;
}
finally
{
server.Close();
if (server is IDisposable)
{
(server as IDisposable).Dispose();
}
if ((server != null))
server = null;
}
I would change "finally" like:
but, it takes down the start subjectCode:finally
{
if ((server != null))
{ server.Close();
if (server is IDisposable)
{
(server as IDisposable).Dispose();
}
server = null;
}