Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Connection Problems 1

Status
Not open for further replies.

jebenson

Technical User
Feb 4, 2002
2,956
US
Hello all,

I have an intranet app that has been running on IIS 5, and now must be ported to a new server with IIS 6. The ASP connects to a SQL Server 2000 database that resides on the same machine.

When I run the app, the database connection fails. In the ASP page that connects to the database is this line:

<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->

If I remove this line, the script will connect to the database, but then I get this error later when the connection object is actually used for the first time:

ADODB.Command error '800a0e7d'

Requested operation requires an OLE DB Session object, which is not supported by the current provider.

/ListPOs.asp, line 181


The line referenced in the error is this:

cmdGetCounts.ActiveConnection = Cnxn

Cnxn is the connection object used throughout the script.

I have tried using a different typelib UUID, that is supposed to reference ADO 2.8, but this has not produced any different results. Here's the new reference:

<!--METADATA TYPE="typelib" uuid="2A75196C-D9EB-4129-B803-931327F72D5C" -->

With the above reference, I still cannot connect to the database.

Any ideas?




I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
What does this say?
<%
set cnTest = createObject("ADODB.Connection")
if Err.Number<>0 then
Response.Write "Microsoft Data Access Components is not installed"
else
Response.Write "You have Microsoft Data Access Components version " & cnTest.version & " installed."
end if
%>
 
Danp129,

Thanks for your response. I did not know how to display error messages in ASP, and your code led me to the real problem. Which was a user login error on SQL Server, not a problem with the typelib definition. Once I corrected the login issue, the script executes normally.

Anyway, thanks again and have a star for your troubles.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top