Solved

Getting error Microsoft VBScript runtime error '800a01a8' Object required on asp page

Posted on 2004-08-20
24
1,422 Views
Last Modified: 2008-07-24
Hi,

I have an asp page where i run reports based on the parameter passed to the db stored proc and report chosen.  It used to work fine until recently.  I added two more reports and added two more parameters in the stored proc. All the reports are running fine except for the first report in the list where I am getting this message at the bottom of my report page layout.

Microsoft VBScript runtime error '800a01a8'

Object required

/appfolder/reports-exec.asp, line 158
0
Comment
Question by:interlaken
  • 7
  • 6
  • 4
  • +4
24 Comments
 
LVL 31

Expert Comment

by:alorentz
ID: 11853845
What's the code on and around that line?
0
 
LVL 1

Expert Comment

by:McSqueeb
ID: 11853887
check the spelling etc on line 157 & 158.

post the code??
0
 
LVL 7

Expert Comment

by:vnvk
ID: 11854613
Possible errors can be:

report file is missing
stored proceudre is missing

And Speeling mistakes are more common as pointed out by McSqueeb

Just like above :)
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 11862937
what is that u r using to create the report .. post some code ..
0
 
LVL 3

Expert Comment

by:matthew1471
ID: 11863220
Open in notepad, scroll to line 156 to 158 and copy and paste :P

Object Required is a server component, typically an update component or mail component.

It would just be a case of then regsvr32'ing the DLL so your ASP Programs can use it
0
 
LVL 3

Expert Comment

by:matthew1471
ID: 11863223
Particularly any Server.CreateObject("....that's really what we want to see
0
 

Author Comment

by:interlaken
ID: 11871302
Here is the code around that line

if rs.recordcount = 0 then
      Response.Write("<p>No Records Found</p>")
else
      If irptType = 1 then
            For y = 1 to 6
                  Response.Write("<table border=2><tr>")
                  for x = 0 to (rs.Fields.count - 1) step 1
                        Response.Write("<td>" & rs.Fields(x).name & "&nbsp;" & "</td>")
                  next
                  Response.Write("</tr>")
                  if rs.State = adStateClosed then
                        Response.Write("<tr><td>0</td></tr>")
                  else
                        while not rs.EOF
                              Response.Write("<tr>")            
                              for x = 0 to (rs.Fields.count - 1) step 1
                                    Response.Write("<td>" & rs.Fields(x).value & "&nbsp;" & "</td>")
                              next
                              Response.Write("</tr>")
                              rs.MoveNext
                        wend
                  end if
                  Response.Write("</table>")
                  if Y < 6 then  
      LINE 157****                  set rs = rs.NextRecordset
                        rs.movefirst
                  End if
            Next
      else
                  Response.Write("<table border=2><tr>")
                  for x = 0 to (rs.Fields.count - 1) step 1
                        Response.Write("<td>" & rs.Fields(x).name & "&nbsp;" & "</td>")
                  next
                  Response.Write("</tr>")
                  while not rs.EOF      
                        Response.Write("<tr>")            
                        for x = 0 to (rs.Fields.count - 1) step 1
                              Response.Write("<td>" & rs.Fields(x).value & "&nbsp;" & "</td>")
                        next
                        Response.Write("</tr>")
                        rs.MoveNext
                  wend
                  Response.Write("</table>")
      
      End If
      set rs=nothing
      set hoteldi = nothing      
end if
0
 
LVL 31

Expert Comment

by:alorentz
ID: 11871360
Take this out:

LINE 157****               set rs = rs.NextRecordset

This is bad news:  set rs = rs.NextRecordset

What are you trying to do?
0
 

Author Comment

by:interlaken
ID: 11871391
I know, that was just added so you or someone else looking at my code would know where line 157 was.  It is not part of the code.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 11871443
I didn't mean the LINE 157****  

I meant the  set rs = rs.NextRecordset

Take out the whole line
0
 

Author Comment

by:interlaken
ID: 11871500
that's not it.  

Now I am getting this message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e18'

Rowset position cannot be restarted.

/appfolder/reports-exec.asp, line 158
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 31

Expert Comment

by:alorentz
ID: 11871613
That's because you're not opening your recordset for forward and backward movement.  Should be like this:

rs.open yourSQl, yourConn, 2, 3

Change to match and try again.
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 11878345
r u trying to retrive 2 recordsets using the same command object and callind one SP?? is that y u r using .NextRecordset .. if y, is ur cursor location = aduseclient?
0
 

Author Comment

by:interlaken
ID: 11881334
all, the problem seems to be with my stored proc because when I switched back to the old sp, the error went away.  Please hold off your comments or suggestions for now and thank you for attending to this problem.
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 11881388
ok .. so basically ur SP was returning just one recordset and ur code was trying to move to the next recordset which was not present ...
0
 

Author Comment

by:interlaken
ID: 11906338
I resolved this issue by changing the values for Y from 1 to 6 TO 1 to 4 for report type 1.
  If irptType = 1 then
          For y = 1 to 6

Please close this question.

Thank you to those who tried to help.
0
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 11910005
The question has been PAQ'd and the 500 points have been refunded.
RomMod
Community Support Moderator
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 11924550
RomMod,
y were the points refunded .. i had pointed the author to the problem he was facing .. it was his mistake that he was calling a different SP and so geting the error .. and i pointed him to that place ..

normally there would be a recommendation before refunding the points .. y is it not there in this case???
0
 

Author Comment

by:interlaken
ID: 11933763
not really, I was not calling a different stored proc because there is only one stored proc I can make a call to.  His comments talked about using two record sets.  The sp returns a recordset based on the parameter value passed to the stored proc.  he can have the points but I don't think his comments helped me.  
0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 11949465
interlaken,
when u were calling the wrong SP, i assume it is just returning back one recordset.. so basically ur code which does a .nextrecordset would fail and that is what i pointed out .. if u cannot accept the fact, i do not have any problem with it .. as for trying to be so generous of giving the points to me even when my comments did not help u "no thanks" .. it is not that the points given by u is going to help me to earn a livelihood or something like that .. i participate in EE not just for helping out but i get to learn too ... i have faced similar situations before in EE where the author is stubborn not to acknowledge that someone might have helped him out ....
0
 

Author Comment

by:interlaken
ID: 11997852
wow wow wow, no need to get all huffy and puffy!  Like the other EE members, I come to EE to get help and nothing else.  I am greatfully thankful to those who have helped me in the past!  

I think you are having difficult time accepting the fact that your answer did not help me!  I have unlimited points, i don't care if you get them, whether you deserve them is a different story!

You say you have faced similar situation before, may be you need to face the fact that your recommendations always don't resolve people's issues.  

You say you come to EE to learn, Instead of wasting your time typying up comments in this question, why don't you try to help out someone else, that way you will learn more than wasting your time here typing.


0
 
LVL 26

Expert Comment

by:Rejojohny
ID: 12013392
thx for the advice .. as u said, i do feel that i am wasting my time here ..
my last comments in this thread here ...
ur problem - "Getting error Microsoft VBScript runtime error '800a01a8' Object required on asp page"
my comment - " r u trying to retrive 2 recordsets using the same command object and callind one SP?? "
ur answer - "I was not calling a different stored proc because there is only one stored proc I can make a call to.  His comments talked about using two record sets."

FYI, u can one SP which returns back more than one result and it can be retrived by a SINGLE recordset and to the access the other resultsets .. u use the command .NextRecordset .. as in this case the SP u were initially calling was retrning back just one recordset and so ur code "set rs = rs.NextRecordset" was failing and u were facing the error .. so by reducing the loop from 6 to 4 ensured that the number of recordsets been accessed is just 4 .. i never said i answered ur problem completely, but just pointed u to the right direction .. all EE out here appreciate efforts and the time spend by other EE to comment .. most of us r working and we take some time out of busy schedule ... looking at ur  profile, i think u lack experience in EE and so this immatuarity ..

anyway .. forget all that .. as for comments
>>You say you come to EE to learn, Instead of wasting your time typying up comments in this question, why don't you try to help out someone else, that way you will learn more than wasting your time here typing
Thx again for ur advice .. but if u had a taken look at my profile, u would have known that i have not wasted my time all the time .. there r some exceptional cases like u .. sorry that i even participated in this thread ... and i too have unlimited points here .. maybe i could donate some to u .. so that some other member might not have to face a similar situation ...
have a nice day ...
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now