I hope that you are able to establish the connection from Management studio.
If so follow these steps:
1) Enable sql server browsing services
1. Click Start, point to Programs, point to Microsoft SQL Server 2005,
point to Configuration Tools, and then click SQL Server Surface Area
Configuration.
2. On the SQL Server 2005 Surface Area Configuration page, click
Surface Area Configuration for Services and Connections.
3. On the Surface Area Configuration for Services and Connections page,
click SQL Server Browser, click Automatic for Startup type, and then click
Apply.
Note When you click the Automatic option, the SQL Server Browser service
starts automatically every time that you start Microsoft Windows.
4. Click Start, and then click OK.
2) Launch VS2005
- Server explorer Add connection :
You will get a pop up asking for choose datasource:
select Data source as "Microsoft SQL server" and Data Provider as ".Net
Framework Data Provider for SQLServer".
Click continue.
Note:Check the data source and data provider from the Add connection popup
by clicking on the change button if you get the Add connection popup directly.
You will get the Add connection Popup:
In that server name dropdownlist click on the dropdown arrow to select
server. (Or) enter the "127.0.0.1\sqlexpress" as server name.
Select Windows authentication / sqlserver and click on the button "Test
Connection". If the connection succeeds try to select the database and click
ok. You should get the databse tree view in the server explorer.
Hope this would help!!!
Regards,
Pramod,
Web Programmer,
Technopark, Thiruvanathapuram,
India.
"Gabriel" wrote:
>
Are you using SQL Server 2005 or SQL Express?? If you are using SQL
Express
edition you need to add Machinename\SQLESPRESS as the server name else the
machine name alone will do. Is this error getting only while connecting
from
VS??
It's the express edition, before on this PC it was the standard edition
Listen ... I do this
- Launch VS2005
- File New Web site .. I give a name
- Server explorer Add connection :
With this parameter :
- server name : localhost (tried : localhost\SQLESPRESS too)
- SQL server authentification : username :sa and the password
Nothing in the dropdown to select the database
There is no web.config at this time. I add one, did the same operation, no
difference.
Regards,