Named Pipes Provider, error: 40 - Could not open a connection to SQL Serve

I have a new application that is connecting to SQL 2005. Every time I run I get the following error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Application is Vb.net running on an XP box. SQL 2005 is developer edition running on the same box.
The funny thing is that if I run a different application and point it to the same database everything works fine. The code that access the database is the same on both applications.
I have never had any problem getting to SQL on any other application. I have verified that the connection string is correct. The new application also referenced Oracle client, so I thought that might be a problem. I remove all references to the Oracle client and the app still fails.

Any help would be appreciated. This has been haunting me for 2 days.
ndingleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cedric_DCommented:
Applications can use different connection strings.
Could you compare them? do you use Windows Authetification or provide user/password to connect SQL?

Also, try disable Named Pipes and Enable Shared Memory and TCP/IP.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ndingleAuthor Commented:
The connection strings are the same in both applications. This has been verified in debugger. I am using SQL authentication for both applications.

I am not sure how to disable named Pipes, but will give it a try.
0
ndingleAuthor Commented:
I enabled TCP/IP and shared memory, disabled named Pipes. Still have the problem.
0
Cedric_DCommented:
You have Accepted soluton - but still have a problem?

Do you guarantee both connection strings are 100% equal?
Maybe, one use (local) as server, and second PCNAME?

Do you see: (provider: TCP/IP Provider, error: 40 - Could not open a connection to SQL Server)?

Try write "PCNAME,1433"  (this will force to use TCP/IP with specified port)

0
ndingleAuthor Commented:
I did not get the Named pipes turned off as I thought. It solved the problem
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.