Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Connection Error (http://www.go4expert.com/forums/connection-error-t4248/)

Rabi 9May2007 18:18

Connection Error
Hi everybody

I need help in an issue, as below.

After installing Visual Studio 2005, with SQL Server Express, on my PC; when I try to add a new connection it reports the following error:

"An error has occurred while establishing a connection to the server. When connecting to the SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipe Provider, error: 40 - could not open a connection to SQL Server)"

I am using the following parameters:

Data Source: Microsoft SQL Server (SqlClient)
Server name: Desktop ( this is the name of my PC)
Attach a database file: test.mdf (it is just for an example)

I have un-installed and re-installed the application twice but the problem persists.

I would appreciate any help.



pradeep 9May2007 19:07

Re: Connection Error
Why don't you connect using the server name instead of named pipe?

Rabi 16May2007 16:44

Re: Connection Error
I am using a more straightforward "Add Connection" dialogbox.

Also, I noticed that the installation of the SQL Server did not offer me to provide or suggest the Server name and thus the default Server name is used.

I request for a more professional opinion. I am not after getting around this problem only; but want to know the cause and remedy for such a situation.

imp0steur 21Jul2007 16:38

Re: Connection Error
make sure you sqlserver is running .. then check wth is the instance name ..
In visual studio goto

tools --> options --> DataBase *** ( It may b different .. I am on linux now .. so cant say where's the option .. search a bit )

here for Sql server instance name .. change it to your sql server instance name .. then click ok ..

SIKO 26Oct2007 15:03

Re: Connection Error
Uninstall them, then install Sql Server 2005 first which will contain the Microsft Visual Studio 2005 before u install that from the original cd try openin a connection which will work after that install the visual studio 2005 in order to get all the MSDN but microsoft Server 2005 will contain the visual studio 2005.

All times are GMT +5.5. The time now is 15:37.