473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Help with IIS server Error (Provider error '80040154' Class not registered)

I am trying to get a total record count on a Acess 97 mdb database. However
I get the following error when I try to load the page:

Provider error '80040154' Class not registered
http://www.assetresearch.com/clog/count.asp

I believe permissions for the IUSR_machine are correct as I am able to add
and delete records from the database through other ASP pages in the site.
Any ideas on what Class needs to be re-registered. If so, how do I do it?

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("clogin.mdb"))
conn.CursorLocation = 3

set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM users"
rs.Open sql,conn

if rs.Supports(adApproxPosition)=true then
i=rs.RecordCount
response.write("The number of records is: " & i)
end if
rs.Close
conn.Close
%>

Any help is this matter is greatly appreciated:)

--
Best Regards,
Martin Franklin
Ma***@AssetResearch.Com

Asset Research Services, Inc.
PO Box 7562
Chandler, Arizona 85246

Phone (800) 783-9636 or (480) 940-4290
Extension 213

Fax (888) 496-5736 or (480) 496-5735

Web: WWW.AssetResearch.Com
Jul 22 '05 #1
4 9126
Martin Franklin wrote:
I am trying to get a total record count on a Acess 97 mdb database.
However I get the following error when I try to load the page:

Provider error '80040154' Class not registered
Which one is line 17?
http://www.assetresearch.com/clog/count.asp

I believe permissions for the IUSR_machine are correct as I am able
to add and delete records from the database through other ASP pages
in the site. Any ideas on what Class needs to be re-registered. If
so, how do I do it?

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("clogin.mdb"))
conn.CursorLocation = 3

set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM users"
rs.Open sql,conn

if rs.Supports(adApproxPosition)=true then
This is the wrong property to check for Supports. It's Bookmarkability that
determines whether or not the cursor supports recordcount. Anyways, you set
cursorLocation to 3 above, so you have a client-side cursor that
automatically supports recordcount because a client-side cursor is always a
Static cursor which supports recordcount.
i=rs.RecordCount
response.write("The number of records is: " & i)
end if
rs.Close
conn.Close
%>

Any help is this matter is greatly appreciated:)

As a guess, you have an Access97 database which uses Jet 3.51, and you are
using the Jet 4.0 provider to open it. I have never had a problem with this,
but then again, I never use the RecordCount property, so this error may have
been waiting in the wings for me all this time.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2
Mr. Barrows

One thing I failed to mention in my original post is the fact that this code
works on my testing server. My problem arises when I try to run the same
page on my ISP's web server. I've actually tested this code on two of my own
web servers without any problems. Line 17 pertains one of the following
lines of code below. My development tool lists line 17 as 'rs.Open sql,
conn' but I believe the true offending line of code pertains to the line
below it 'i-rs.RecordCount' .

rs.Open sql,conn
i=rs.RecordCount

I've further trimmed my code as suggested by removing 'if
rs.Supports(adApproxPosition)=true then' . Thanks for the catch. My new
complete code is...

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("clogin.mdb"))
conn.CursorLocation = 3

set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM users"
rs.Open sql, conn

i=rs.RecordCount
response.write("The number of records is: " & i)

rs.Close
conn.Close
%>

Perhaps my question would be better suited for a form on IIS config. Any
further suggestions are greatly appreciated.

Ma***@assetresearch.com
Martin Franklin


"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uI**************@TK2MSFTNGP14.phx.gbl...
Martin Franklin wrote:
I am trying to get a total record count on a Acess 97 mdb database.
However I get the following error when I try to load the page:

Provider error '80040154' Class not registered
Which one is line 17?
http://www.assetresearch.com/clog/count.asp

I believe permissions for the IUSR_machine are correct as I am able
to add and delete records from the database through other ASP pages
in the site. Any ideas on what Class needs to be re-registered. If
so, how do I do it?

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("clogin.mdb"))
conn.CursorLocation = 3

set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM users"
rs.Open sql,conn

if rs.Supports(adApproxPosition)=true then


This is the wrong property to check for Supports. It's Bookmarkability

that determines whether or not the cursor supports recordcount. Anyways, you set cursorLocation to 3 above, so you have a client-side cursor that
automatically supports recordcount because a client-side cursor is always a Static cursor which supports recordcount.
i=rs.RecordCount
response.write("The number of records is: " & i)
end if
rs.Close
conn.Close
%>

Any help is this matter is greatly appreciated:)

As a guess, you have an Access97 database which uses Jet 3.51, and you are
using the Jet 4.0 provider to open it. I have never had a problem with

this, but then again, I never use the RecordCount property, so this error may have been waiting in the wings for me all this time.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jul 22 '05 #3
Martin Franklin wrote:
Mr. Barrows

One thing I failed to mention in my original post is the fact that
this code works on my testing server. My problem arises when I try to
run the same page on my ISP's web server. I've actually tested this
code on two of my own web servers without any problems. Line 17
pertains one of the following lines of code below. My development
tool lists line 17 as 'rs.Open sql, conn' but I believe the true
offending line of code pertains to the line below it
'i-rs.RecordCount' .
Have you commented out the line to verify this belief?

rs.Open sql,conn
i=rs.RecordCount

I've further trimmed my code as suggested by removing 'if
rs.Supports(adApproxPosition)=true then' . Thanks for the catch. My
new complete code is...
1> <%
2> set conn=Server.CreateObject("ADODB.Connection")
3> conn.Provider="Microsoft.Jet.OLEDB.4.0"
4> conn.Open(Server.Mappath("clogin.mdb"))
5> conn.CursorLocation = 3
6>
7> set rs=Server.CreateObject("ADODB.recordset")
8> sql="SELECT * FROM users"
9> rs.Open sql, conn
10>
11> i=rs.RecordCount
12> response.write("The number of records is: " & i)
13>
14> rs.Close
15> conn.Close
16> %>
Perhaps my question would be better suited for a form on IIS config.
Any further suggestions are greatly appreciated.


All I can suggest is an MDAC upgrade/repair on the server which is giving
you the problem..

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #4

Bob Barrows [MVP] wrote:
*Martin Franklin wrote:
Mr. Barrows

One thing I failed to mention in my original post is the fact that
this code works on my testing server. My problem arises when I try

to
run the same page on my ISP's web server. I've actually tested

this
code on two of my own web servers without any problems. Line 17
pertains one of the following lines of code below. My development
tool lists line 17 as 'rs.Open sql, conn' but I believe the

true
offending line of code pertains to the line below it
'i-rs.RecordCount' .


Have you commented out the line to verify this belief?

rs.Open sql,conn
i=rs.RecordCount

I've further trimmed my code as suggested by removing 'if
rs.Supports(adApproxPosition)=true then' . Thanks for the catch.

My
new complete code is...

1> <%
2> set conn=Server.CreateObject("ADODB.Connection")
3> conn.Provider="Microsoft.Jet.OLEDB.4.0"
4> conn.Open(Server.Mappath("clogin.mdb"))
5> conn.CursorLocation = 3
6>
7> set rs=Server.CreateObject("ADODB.recordset")
8> sql="SELECT * FROM users"
9> rs.Open sql, conn
10>
11> i=rs.RecordCount
12> response.write("The number of records is: " & i)
13>
14> rs.Close
15> conn.Close
16> %>

Perhaps my question would be better suited for a form on IIS

config.
Any further suggestions are greatly appreciated.


All I can suggest is an MDAC upgrade/repair on the server which is
giving
you the problem..

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a
quicker response by posting to the newsgroup. *


Update: 3/25/05

Found the problem to the 'class not registered' error. I had to extend
the IUSR permissions on the directories that were pointed to by the
TEMP and TMP system variables.

"Note The Microsoft Jet database engine uses the System Temp and Tmp
environment
variables to specify the location of temporary files that are created
during Jet operations."

Posted by Martin Franklin
ma***@assetresearch.com

--
mmfranklin
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message933177.html

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: carlos seramos | last post by:
I've got two IIS servers. One public and one staging. On the public server the ASP code works fine however on the staging server I've started getting this error recently: error '8002801d'...
2
by: Dayron | last post by:
Hi, I use ASP code to generate report that I retrieve about 100,000 to 800,000 records from database using ADODB.Recordset. But when i run the code, it show me the following error. Provider...
1
by: Nobody | last post by:
<!--#include file="CommonServer.aspx"--> <script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) CheckConnection() end sub </script> <HTML> <HEAD> <META...
5
by: Ryan | last post by:
A binding navigator control adds the following code for when the Save button is clicked: Me.Validate() Me.UserBindingSource.EndEdit() Me.UserTableAdapter.Update(Me.UserDataSet.User)" You can...
0
by: dba123 | last post by:
My web site is definitely configured as an application in IIS. So what else could it be? I had added some of our code to this 3rd party's web.config shown below. So I don't know if it's the 3rd...
3
by: Ted | last post by:
In WSAT, I get the following error when trying to set up my provider: Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site...
4
by: jobs | last post by:
Works great on my client when I test from vs.net 2005. Howevever, when I deploy to the web server, I get this error: remotely and local from the web server. An error has occurred while...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: Prakash Paul | last post by:
Hi All, I need your help regarding Linked server. We have two different locations for our two servers and I want to transfer my data from one server to another server every day. For that I used...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.