Sunday, February 19, 2012

Error in ASP/SQL Server

Hello,
I have searched all over the web in order to find a solution to this,
but nothing I find seems to fit my problem.
My IIS and SQL Server reside on the same server. I am trying to
connect my ASP page to that SQL Server. My connection string looks
like
"Provider=sqloledb;Data Source=XXX.XXX.XXX.XXX;Initial
Catalog=DATABASE;Persist Security Info=False;UID=uid;PWD=PASS;Network
Library=DBMSSOCN"
When trying to access the page, I receive
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.
I have tried putting the port number at the end of the data source.
I tried troubleshooting the problem with seeing if I can get into SQL
Server Enterprise Manager and Query Analyzer using that UID and PWD. I
could.
I checked my SQL server security setting and it is setup with both SQL
Server and Windows authenication. Everything seems to be set up
properly.
I have tcp/ip enabled with the correct port.
I have used just the server name in the connection string.
Nothing seems to narrow down the problem.
Any help would be greatly appreciated. A web site! Advice! I'm not
picky.
Thanks,
Amanda
devanoy@.hotmail.com> "Provider=sqloledb;Data Source=XXX.XXX.XXX.XXX;Initial
quote:

> Catalog=DATABASE;Persist Security Info=False;UID=uid;PWD=PASS;Network
> Library=DBMSSOCN"

Did you try 127.0.0.1 or LOCALHOST or (local) as the Data Source parameter?
Do you really have a database named "DATABASE"?
Is your user/password information correct?
Is SQL Server listening on the correct port (1433)?
Are you sure this is a default install and not a named instance?|||Amanda (devanoy@.hotmail.com) writes:
quote:

> I have searched all over the web in order to find a solution to this,
> but nothing I find seems to fit my problem.
> My IIS and SQL Server reside on the same server. I am trying to
> connect my ASP page to that SQL Server. My connection string looks
> like
> "Provider=sqloledb;Data Source=XXX.XXX.XXX.XXX;Initial
> Catalog=DATABASE;Persist Security Info=False;UID=uid;PWD=PASS;Network
> Library=DBMSSOCN"
> When trying to access the page, I receive
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied.

Why that Network Library parameter? I would try removing it.
Also, for Data Source I would try (local) instead, to make things simpler.
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I don't believe it. Removing the network library from the connection string
worked!
And no, my database name is not DATABASE.
Thanks a lot!!
Amanda
Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns9465469FC4FEYazorman@.127.0.0.1>...
quote:

> Amanda (devanoy@.hotmail.com) writes:
> Why that Network Library parameter? I would try removing it.
> Also, for Data Source I would try (local) instead, to make things simpler.

No comments:

Post a Comment