Classic ASP connection to SQL 2005 invalid connection error


We used to use SQL 2000 but have moved upto 2005, below is the typical connection string I used to connect to 2000 and worked fine;


Below is a couple of examples of connection strings I used to connect to 2005:

objConn = "Provider=SQLNCLI;Server=MAGGIE\MAGGIE;Database=WEBBILL;Uid=sa;Pwd=password;"
objConn = "Provider=SQLOLEDB;Data Source=; Initial Catalog=webbill; User ID=sa; Password=parssword;"

but on any variation I get the following error:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection.

/main.asp, line 23

I'm not sure if my connections are incorrect or if it's a setup within SQL 2005
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.

When providing TCP port use comma:

objConn = "Provider=SQLOLEDB;Data Source=,1433; Initial Catalog=webbill; User ID=sa; Password=parssword;"

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
Also use @ when using escape characters:

objConn = @"Provider=SQLNCLI;Server=MAGGIE\MAGGIE;Database=WEBBILL;Uid=sa;Pwd=password;"
trojan_ukAuthor Commented:
Thanks brejk, I changed the semi colon to a comma, now I get:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/main.asp, line 23

checked all the obvious things like remote access etc
trojan_ukAuthor Commented:
Ignore last comment, admin gave me the wrong IP address, should be 50 not 51....muppet
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 2005

From novice to tech pro — start learning today.