Microsoft OLE DB Provider for SQL Server error '80004005' unable to connect remotely to database

Dear experts,
I have an ASP file on a webserver that needs to connects to a database server remotely. But for some reason it doesn't allow me to do so. I know it is not the database server problem because I tried connecting to it with another computer and IT WORKS data comes out. I tried using a DSN connection on the web server and "TESTS COMPLETED SUCCESSFULLY", but I still cant' get the data to come up on my ASP page.


the error on the ASP page is
Microsoft OLE DB Provider for SQL Server error '80004005'
 "client unable to establish connection"

 I've also tried directly connecting to SQL server which still doesnt' work.

the error on the ASP page is
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]Access denied.


 I'm pretty sure that it is the web server restricting access but don't know how to unenable it. Any suggestions would be appreciated. I'm on a company network. Is this a problem? I'm getting desperate on this one.

Peter
tienluongAsked:
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.

drichardsCommented:
Is your SQL Server set up for "Windows ony" authentication?
0
Bob LambersonSoftware EngineerCommented:
0
RonaldKunenborgCommented:
I suggest you take a look at the SQL server setup, just as drichards said. I had the exact same problem.
This is caused by the webserver trying to use the account under which the webserver is running to access the database. This account usually has NO permission to access the database.

To solve it, set up SQL server to allow access by using accountname/password login.

Also, if you are already using this way to access the database, try writing the connect statement anew. Maybe you overlooked a space or quote somewhere?

Good luck,
Ronald.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

dileedilCommented:
Dim connection

set connection=Server.CreateObject("ADODB.Connection")
connection.ConnectionString = "Provider=SQLOLEDB; Data Source=SourceName; Initial Catalog=CatalogName; User ID=sa; Password="
connection.open

Try to set Connecting String like this , This is a solution for you,
Thanks
0
RonaldKunenborgCommented:
Hi TienLuong,

if you answered the question, please share your answer with us so we may benefit in the future. The answers given above are the most straightforward ones, so if you have a really different problem your answer may help someone in the future.

Regards,
- Ronald.
0
PashaModCommented:
Closed, no points refunded.
PashaMod
Community Support Moderator
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
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
Programming

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.