interlaken
asked on
Getting error Microsoft VBScript runtime error '800a01a8' Object required on asp page
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.as p, line 158
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.as
What's the code on and around that line?
check the spelling etc on line 157 & 158.
post the code??
post the code??
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 :)
report file is missing
stored proceudre is missing
And Speeling mistakes are more common as pointed out by McSqueeb
Just like above :)
what is that u r using to create the report .. post some code ..
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
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
Particularly any Server.CreateObject("....t hat's really what we want to see
ASKER
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 & " " & "</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 & " " & "</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 & " " & "</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 & " " & "</td>")
next
Response.Write("</tr>")
rs.MoveNext
wend
Response.Write("</table>")
End If
set rs=nothing
set hoteldi = nothing
end if
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 & " " & "</td>")
next
Response.Write("</tr>")
if rs.State = adStateClosed then
Response.Write("<tr><td>0<
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 & " " & "</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 & " " & "</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 & " " & "</td>")
next
Response.Write("</tr>")
rs.MoveNext
wend
Response.Write("</table>")
End If
set rs=nothing
set hoteldi = nothing
end if
Take this out:
LINE 157**** set rs = rs.NextRecordset
This is bad news: set rs = rs.NextRecordset
What are you trying to do?
LINE 157**** set rs = rs.NextRecordset
This is bad news: set rs = rs.NextRecordset
What are you trying to do?
ASKER
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.
I didn't mean the LINE 157****
I meant the set rs = rs.NextRecordset
Take out the whole line
I meant the set rs = rs.NextRecordset
Take out the whole line
ASKER
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.as p, line 158
Now I am getting this message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e18'
Rowset position cannot be restarted.
/appfolder/reports-exec.as
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.
rs.open yourSQl, yourConn, 2, 3
Change to match and try again.
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?
ASKER
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.
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 ...
ASKER
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.
If irptType = 1 then
For y = 1 to 6
Please close this question.
Thank you to those who tried to help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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???
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???
ASKER
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.
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 ....
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 ....
ASKER
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.
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.
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 ...
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 ...