Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 6th, 2006, 02:58 AM
Authorized User
Join Date: Oct 2006
Location: Kolkata, West Bengal, India.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error 40

I'm using VS2003 and SQL2000. I created a database name "myDatabase" in SQL Server 2000 and built a website that
connet to this database. When I'm running this website in VS2003 IDE (press F5 or Ctrl-F5), everything is OK.
It was my localhost. Then I tried to install again on my server after installing .NET framework 2.0.But when my application
is trying to connect sql server, it is giving error like this:

"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) (Microsoft SQL Server, Error: 2)"

My connection string was: Server:XYZ;uid=sa;password=hello;Database=NewProje ct.

Now, I don't know how to fix it. Pls help me as soon as possible.

Reply With Quote
  #2 (permalink)  
Old December 7th, 2006, 01:31 AM
Registered User
Join Date: Dec 2006
Location: Pune, Maharashtra, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ghemant

Ensure if Remote connection for Local and Remote Connection is allowed if not

Microsoft SQL Server 2005->Configuration Tools->SS2005 Surface Area configuration-> Surface Area configuration for Services and Connection->Remote Connection->Local And Remote Connection->Using Both TCP/IP and Namedpipes-> Apply


With Regards
Hemantgiri S. Goswami
"Humans don't have Caliber to PASS TIME , Time it self Pass or Fail Humans"  -Hemantgiri S. Goswami
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 40. Do anyone known it? Please help! avgCS Classic ASP Basics 0 July 27th, 2007 06:53 AM
Error 40 prasanta2expert ASP.NET 1.x and 2.0 Application Design 1 December 6th, 2006 06:04 AM
Error 40 prasanta2expert ASP.NET 1.0 and 1.1 Basics 0 December 6th, 2006 02:58 AM
Named Pipes Provider, error: 40 ipaine SQL Server 2000 1 November 14th, 2006 03:36 AM
using &#40 instead of ( crmpicco HTML Code Clinic 5 April 10th, 2006 09:06 AM

All times are GMT -4. The time now is 08:25 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.