Forums
This topic is locked
(0x800A01A8) Object Required
Posted 14 Feb 2003 03:49:22
1
has voted
14 Feb 2003 03:49:22 chris espino posted:
I've been getting this odd error whenever I run the script, I'm using DSN connection, and everything else is OK.I can query a list of titles, then I'll click on it to go to the details page. then I get this odd error.
Microsoft VBScript runtime (0x800A01A8)
Object required
/legal/result05.asp, line 37
and here's line 37
<td><%=(AVC.Fields.Item "AVCTITLE"

thanks in advance!
Replies
Replied 14 Feb 2003 03:54:13
14 Feb 2003 03:54:13 chris espino replied:
here's my code.
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/AVC.asp" -->
<%
Dim AVC__MMColParam
AVC__MMColParam = "1"
If (Request.QueryString("AVCTITLE"
<> ""
Then
AVC__MMColParam = Request.QueryString("AVCTITLE"
End If
%>
<%
Dim AVC
Dim AVC_numRows
Set AVC = Server.CreateObject("ADODB.Recordset"
AVC.ActiveConnection = MM_AVC_STRING
AVC.Source = "SELECT * FROM Data WHERE AVCTITLE = '" + Replace(AVC__MMColParam, "'", "''"
+ "'"
AVC.CursorType = 0
AVC.CursorLocation = 2
AVC.LockType = 1
AVC.Open()
AVC_numRows = 0
%>
<%
AVC.Close()
Set AVC = Nothing
%>
<title>Results 05</title>
<link href="avc.css" rel="stylesheet" type="text/css">
<p>Result 5</p>
<table width="250" border="0" class="avc">
<tr>
<td><%=(AVC.Fields.Item("AVCTITLE"
.Value)%> </td>
</tr>
</table>
<br>
<table width="500" border="0" class="avc">
<tr>
<td><%=(AVC.Fields.Item("AVCDESCRIPTION"
.Value)%></td>
</tr>
</table>
<p> </p>
-------------
thanks in advance!
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/AVC.asp" -->
<%
Dim AVC__MMColParam
AVC__MMColParam = "1"
If (Request.QueryString("AVCTITLE"


AVC__MMColParam = Request.QueryString("AVCTITLE"

End If
%>
<%
Dim AVC
Dim AVC_numRows
Set AVC = Server.CreateObject("ADODB.Recordset"

AVC.ActiveConnection = MM_AVC_STRING
AVC.Source = "SELECT * FROM Data WHERE AVCTITLE = '" + Replace(AVC__MMColParam, "'", "''"

AVC.CursorType = 0
AVC.CursorLocation = 2
AVC.LockType = 1
AVC.Open()
AVC_numRows = 0
%>
<%
AVC.Close()
Set AVC = Nothing
%>
<title>Results 05</title>
<link href="avc.css" rel="stylesheet" type="text/css">
<p>Result 5</p>
<table width="250" border="0" class="avc">
<tr>
<td><%=(AVC.Fields.Item("AVCTITLE"

</tr>
</table>
<br>
<table width="500" border="0" class="avc">
<tr>
<td><%=(AVC.Fields.Item("AVCDESCRIPTION"

</tr>
</table>
<p> </p>
-------------
thanks in advance!
Replied 14 Feb 2003 12:01:53
14 Feb 2003 12:01:53 Marja Ribbers-de Vroed replied:
You've already closed the recordset you refer to in the table cell, so it is not available anymore.
The following code should be placed entirely at the bottom your page:
<%
AVC.Close()
Set AVC = Nothing
%>
--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
The following code should be placed entirely at the bottom your page:
<%
AVC.Close()
Set AVC = Nothing
%>
--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Replied 14 Feb 2003 18:42:54
14 Feb 2003 18:42:54 chris espino replied:
gotcha!
thank you, sir!
thank you, sir!