Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Cannot Connect to SQLEXPRESS

Author  Topic 

NJHiker111
Starting Member

5 Posts

Posted - 2010-07-25 : 07:05:42
I was having difficulty with SQL Server. It may have been because I had both SQL Server 2005 and SQL Server 2008 installed. So I uninstalled both and reinstalled SQL Server 2008. But I was unable to install Management Studio. After a fair amount of research I found that I had to install a service pack for Visual Studio 2008. Then Management Studio installed ok.
I was also having some problems when testing a MVC tutorial. One database installed with a .mvc extension and a different one installed with a .dbo extension. I can’t remember all the details.

Now I cannot connect in Visual Studio 2008 or 2010 and cannot connect in Management Studio. I have searched the web extensively and cannot find a solution. TCP/IP and Named Pipes were already enabled.

Here is the error message I get.

Cannot connect to XXXXXX\SQLEXPRESS.
------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)


Can anyone help me? Please see screen prints. I changed the name on my computer to XXXXX\SQLSERVER. Not sure if that should be made public?

NJHiker111
Starting Member

5 Posts

Posted - 2010-07-25 : 11:27:52
Sorry I meant an .mdf extension not .mvc
Go to Top of Page

NJHiker111
Starting Member

5 Posts

Posted - 2010-07-26 : 09:06:07
I uninstalled SQL Server Express 2008 and reinstalled it. I can now connect in Management Studio. Then in Visual Studio 2010 I went into my application and tried to Register a User from the Log In control that was created for me. I still got a 26 error. After trying various things like checking to see if SQL Server service is running and checking to see that TCP/IP is enabled I managed to get rid of the 26 error and then registed a user in my Visual Studio 2010 app from the Log In control. Visual Studio 2010 is then suppose to create the SQL Server database for me if it did not exist and put it in App_Data but it is not there.
I then opened the Web Site Administration Tool and sure enough I found the user I created but still cannot find the database anywhere. I opened Server Explorer and it is not there and it is still not in App_Data. I then went back to the log In and was able to login using the User I just created.
So I can't find the database that was apparently created. I did a Windows 7 search and it doesn't seem to be anywhere.
Does anyone have an idea how to solve this?
Thanks, JMTech
Go to Top of Page

NJHiker111
Starting Member

5 Posts

Posted - 2010-07-26 : 09:42:50
I finally solved the problem. It did create the database but it was hidden. I ahd to go into Solution Explorer and click Show all files.
Go to Top of Page
   

- Advertisement -