Login Failure using SQLOLEDB

I try to connect to an SQL server (7.0) database from an IIS application that I am developing using VBSCRIPT (ASP).  The database server and the web server reside on different machines.  I use the following code:

dim CONN
set CONN = server.CreateObject("adodb.connection")CONN.ConnectionString = "provider=SQLOLEDB;server=MYSRV;uid=MYUSR;pwd=MYPWD;database=MYDB"

I get the following error:

Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user 'MYUSR'. Reason: Not associated with a trusted SQL Server connection.

What is a trusted SQL Server connection?  How do I create one?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

The problem is that the IIS server is using named pipes to try and connect to the database.  It should be using TCP/IP.

If you have the SQL Client on the IIS server, on the IIS server go to the Client Network Utility in the SQL Server 7.0 start menu.  Either enable the protocal TCP/IP and put it at the top of the list or create an alias that uses TCP/IP

Hope this helps
Or the userID and password is invalid.
Are you sure you have used the valid userID and password?
Regarding userID, it can be either from SQL Server userID alone or NT login(if you are using Mixed Security mode).

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
Guy Hengel [angelIII / a3]Billing EngineerCommented:
try this:

"provider=SQLOLEDB;server=MYSRV;user id=MYUSR;password=MYPWD;database=MYDB;"
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

desmondgAuthor Commented:
The question was answered in the VB area.  I had posted in three areas namely VB, ASP and MS SQL.  Thanks to all you experts that attempted to answer it.

The answer it that the SQL server security must be set to mixed security.

Glad finally you can figure it out Desmond! :)
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
Last desmondg comment: mixed security which I recommended.
Please take further action.
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.