Could not open a connection to SQL Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Campanini
    New Member
    • May 2011
    • 58

    Could not open a connection to SQL Server

    Not to worry I have found a solution For the past two weeks I have been developing a program in C# that uses LINQ to SQL to access the database. Everything has been working just fine, with lots of help from DOTNETPEARLS. I have been testing the program successfully for the past few days, making minor adjustments here and there for cosmetic purposes. Today, while testing, I got error in C#, something about the program could not start, I cannot recall exactly the error, and no matter how many times I tried to run my program I got the same error. So, when in doubt, restart the machine, which I did, and now I get the following error...
    A network-related or instance-specific error occurred whil establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared MemoryProvider, error: 40 - Could not open a connection toSQL Server)
    I am not an SQL fundi, so please how do I verify the instance name, and why it wants to allow remote connections beats me, it's on a stand alone machine.

    Any suggestions anyone?

    Joe
    Last edited by Joe Campanini; Apr 8 '12, 12:48 AM. Reason: Problem solved
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Did you change anything else?


    ~~ CK

    Comment

    • Joe Campanini
      New Member
      • May 2011
      • 58

      #3
      Originally posted by ck9663
      Did you change anything else?


      ~~ CK
      Not as far as I am aware. I admit I had Management Studio open, but that was just for me to check if my C# program was picking up the correct record, but at the time of testing my C# program I had not utilized Management Studio for some time, and during that time I had made numerous test runs with the C# program successfully.

      Joe

      Comment

      Working...