3 Replies - 2848 Views - Last Post: 17 May 2009 - 12:51 PM Rate Topic: -----

#1 sam.adams61  Icon User is offline

  • D.I.C Regular

Reputation: 12
  • View blog
  • Posts: 283
  • Joined: 14-July 08

Could not open a connection to sql server...

Post icon  Posted 29 April 2009 - 05:16 PM

Not so long ago I created a database in Visual Studio 2008, no problem. Today I have a problem, & I'm just about ready to pull my last hair out. I don't understand why I get an Error 40: could not open a connection to sql server. Could somebody...anybody...please explain what is going on & why? Many thanks. BTW, TCP & such is enabled in sql configuration manager.
Is This A Good Question/Topic? 0
  • +

Replies To: Could not open a connection to sql server...

#2 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: Could not open a connection to sql server...

Posted 30 April 2009 - 07:27 PM

Need more info, post the code regarding the connection. Are you connecting over a network? If so, any changes to the server - new, name, permissions?
Was This Post Helpful? 0
  • +
  • -

#3 kzimmerm  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 70
  • Joined: 08-February 09

Re: Could not open a connection to sql server...

Posted 07 May 2009 - 08:12 AM

Try this link:
http://blog.sqlautho...-to-sql-server/

Good luck.
Kurt
Was This Post Helpful? 0
  • +
  • -

#4 sssmartie  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 59
  • Joined: 03-June 08

Re: Could not open a connection to sql server...

Posted 17 May 2009 - 12:51 PM

Hello!

1-Check your firewall settings turn your firewall off and see if it helps.
2-See if your server is enabled
:control panel--->administrative tools--->Services--->look for SQL Server and check if it's status is started (if not start it)
3-Changing your computer's user name can also cause this problem(if you're not connecting over a network)
Was This Post Helpful? 1

Page 1 of 1