Can't connect to SQL Server 2005 in Visual Studio, only SQLExpress works?

Hi all,

I'm having a big problem here. I can't seem to connect to a database of MSSQL Server 2005... Here is what I've did:

1. Under the Server Explorer>Data Connections. Right click and choose "Add Connection..."

2. Data Source was "Microsoft SQL Server Database File". Click OK.

3. I browse to the database in the MSSQL.2/MSSQL/Data folder.

4. Click on the "Advanced" button, and change the default DataSource from .\SQLEXPRESS to .\MSSQLSERVER. Click OK

5.  Received this error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

 

Only .\SQEXPRESS that I was able to connect to... i've tried the solution from Microsoft, opened SQL Server 2005 Surface Area Configuration and enabled "Local and remote connections", checked the option "Using both TCP/IP and named pipes" but it didn't help. This is frustrating because I can't get the Membership provider, login to work on my host. Please help.

 
Thank you very much,

Kenny.
 

0
xuanvu
7/9/2007 3:37:17 AM
📁 asp.net.sql-datasource
📃 29906 articles.
⭐ 0 followers.

💬 2 Replies
👁️‍🗨️ 831 Views

Hi Kenny, 

xuanvu:
Click on the "Advanced" button, and change the default DataSource from .\SQLEXPRESS to .\MSSQLSERVER. Click OK

is there named instance MSSQLSERVER on your host/machine

xuanvu:
Data Source was "Microsoft SQL Server Database File". Click OK.

wondering what did you chose while creating connection for SQLExpress was it Sql Server Database file or SQL Server. could you try to use SQL Server option for .\MSSQLServer?

thanks,

satish.

 


Kind Attn: If a reply to your post helped you, kindly mark it as Answered.
__________________________________________________
Please save Animals Help World Society For Protection Of Animals,
Protect these speechless creatures of GOD
0
satish_nagdev
7/9/2007 4:08:48 AM

Yeap the problem lies in the SQL Server instance name... I was able to connect to the database now, but here is the problem that I've been battled for a whole week without success... Reading countless forum for a solution but none seems to work.

Here is the problem that I've posted: http://forums.asp.net/t/1131239.aspx

Thanks,

Kenny.
 

0
xuanvu
7/9/2007 3:26:02 PM
Reply: