-
October 28th, 2016, 04:51 PM
#16
Re: Access to MSSQLServer 2008 R2 but not rights
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.
-
November 2nd, 2016, 04:00 PM
#17
Re: Access to MSSQLServer 2008 R2 but not rights
why you believe so hardly its about how to connect?
-
November 3rd, 2016, 10:22 AM
#18
Re: Access to MSSQLServer 2008 R2 but not rights
Originally Posted by pschulz
why you believe so hardly its about how to connect?
It's pretty hard to tell what your issues are at this point. If you can describe clearly what you are trying to do and what problems you are having, please do so; otherwise, let the thread die.
-
November 4th, 2016, 03:09 AM
#19
Re: Access to MSSQLServer 2008 R2 but not rights
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;
}
Last edited by 2kaud; November 4th, 2016 at 03:32 AM.
-
November 4th, 2016, 05:23 PM
#20
Re: Access to MSSQLServer 2008 R2 but not rights
I would change "finally" like:
Code:
finally
{
if ((server != null))
{ server.Close();
if (server is IDisposable)
{
(server as IDisposable).Dispose();
}
server = null;
}
but, it takes down the start subject
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|