7 Replies - 1371 Views - Last Post: 16 January 2010 - 12:55 AM Rate Topic: -----

#1 jpnheyjp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 21-July 09

Can't Connect to SQL Server Error

Post icon  Posted 09 January 2010 - 06:36 AM

please help me guys,

i have this kind of error only in my computer and i re-install my visual studio 2005 and even reformat my computer, please tell me how fix 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 settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Is This A Good Question/Topic? 0
  • +

Replies To: Can't Connect to SQL Server Error

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: Can't Connect to SQL Server Error

Posted 09 January 2010 - 07:24 AM

Well you obviously don't have to reinstall the OS (or even format anything) to fix this. It is about SQL Server permissions.

Here is the Microsoft KB article that describes the way to correctly configure the instance of SQL Server to accept remote connections.
Was This Post Helpful? 0
  • +
  • -

#3 jpnheyjp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 21-July 09

Re: Can't Connect to SQL Server Error

Posted 10 January 2010 - 10:56 PM

View PostCore, on 9 Jan, 2010 - 06:24 AM, said:

Well you obviously don't have to reinstall the OS (or even format anything) to fix this. It is about SQL Server permissions.

Here is the Microsoft KB article that describes the way to correctly configure the instance of SQL Server to accept remote connections.



thank you fior your reply but, i already try all those things still no luck, i tried installing it to other computers and its running smoothly, i really dont know what i have to do in my remote connections, thank you again...
Was This Post Helpful? 0
  • +
  • -

#4 TravisP  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 35
  • Joined: 06-January 10

Re: Can't Connect to SQL Server Error

Posted 11 January 2010 - 10:58 PM

I have a feeling the computer you have a problem is running is vista....

Try opening Visual studio as administrator (ie, right click and click "run as administrator"). See if you manage a connection that way.

This post has been edited by TravisP: 11 January 2010 - 10:59 PM

Was This Post Helpful? 0
  • +
  • -

#5 jpnheyjp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 21-July 09

Re: Can't Connect to SQL Server Error

Posted 12 January 2010 - 04:37 PM

View PostTravisP, on 11 Jan, 2010 - 09:58 PM, said:

I have a feeling the computer you have a problem is running is vista....

Try opening Visual studio as administrator (ie, right click and click "run as administrator"). See if you manage a connection that way.


sir travis im using windows XP pack 2...
Was This Post Helpful? 0
  • +
  • -

#6 TravisP  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 35
  • Joined: 06-January 10

Re: Can't Connect to SQL Server Error

Posted 13 January 2010 - 12:10 AM

Okay, so when are you actually getting this error?

If it is embedded in an application of yours check you are connecting to the right database. If you hard code your connection strings into your program make sure they are going to the right place, or even better swap to using configurationmanager.settings.

Also check what connection you are trying to connect through, VS2005 comes with SQLexpress and you'll need to select "sqlclient" to use it properly.

Still try to run as administrator, in case of any security concerns.

Are you sure you followed all of the steps with regards to the surface area configuration manager?
Was This Post Helpful? 0
  • +
  • -

#7 jpnheyjp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 21-July 09

Re: Can't Connect to SQL Server Error

Posted 13 January 2010 - 04:35 PM

View PostTravisP, on 12 Jan, 2010 - 11:10 PM, said:

Okay, so when are you actually getting this error?

If it is embedded in an application of yours check you are connecting to the right database. If you hard code your connection strings into your program make sure they are going to the right place, or even better swap to using configurationmanager.settings.

Also check what connection you are trying to connect through, VS2005 comes with SQLexpress and you'll need to select "sqlclient" to use it properly.

Still try to run as administrator, in case of any security concerns.

Are you sure you followed all of the steps with regards to the surface area configuration manager?

yes sir i already follow all the steps with regards to surface area configuration manager

i only use 1 user in my computer and its an admin.

we have a program that have created in other PC it uses the sql 2000 to connect with, im getting this error when i try to access the database, all my connections are ok.

i don't really understand why my computer having this error because i have tried to install the vs2005 and sql200 and the program in windows vista, and it run smoothly and without any errors.
Was This Post Helpful? 0
  • +
  • -

#8 jpnheyjp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 21-July 09

Re: Can't Connect to SQL Server Error

Posted 16 January 2010 - 12:55 AM

my problem is solved :D

all i do is to remove all the files in my program

i have to delete all files in the folder debuf >.< lol
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1