Forums
This topic is locked
Nested Repeat Regions Tutorial
13 May 2003 20:45:27 Erik Mr. posted:
I'm trying to use the tutorial on nested repeat regions. I get the follwing error using the below code. Do you see where my mistake might be?MCI 96A3's ( this is my header title)
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/eyreNew/TMPb77agetwc3.asp, line 56
Here's the code******************************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/forsale.asp" -->
<%
Dim MasterRecordset
Dim MasterRecordset_numRows
Set MasterRecordset = Server.CreateObject("ADODB.Recordset"

MasterRecordset.ActiveConnection = MM_forsale_STRING
MasterRecordset.Source = "SELECT * FROM BusType"
MasterRecordset.CursorType = 0
MasterRecordset.CursorLocation = 2
MasterRecordset.LockType = 1
MasterRecordset.Open()
MasterRecordset_numRows = 0
%>
<%
Dim SecondRecordset
Dim SecondRecordset_numRows
Set SecondRecordset = Server.CreateObject("ADODB.Recordset"

SecondRecordset.ActiveConnection = MM_forsale_STRING
SecondRecordset.Source = "SELECT * FROM Coaches"
SecondRecordset.CursorType = 0
SecondRecordset.CursorLocation = 2
SecondRecordset.LockType = 1
SecondRecordset.Open()
SecondRecordset_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
MasterRecordset_numRows = MasterRecordset_numRows + Repeat1__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
While ((Repeat1__numRows <> 0) AND (NOT MasterRecordset.EOF))
%>
<table width="400" border="0" cellspacing="3" cellpadding="3">
<tr>
<td><%=(MasterRecordset.Fields.Item("BusTypeTxt"

</tr>
<tr>
<td><%
FilterParam = (MasterRecordset.Fields.Item("BusType"

SecondRecordset.Filter = "BusType = " & FilterParam
While (NOT SecondRecordset.EOF)
%>
<%=(SecondRecordset.Fields.Item("CoachNumber"

<%
SecondRecordset.MoveNext()
Wend
%></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
MasterRecordset.MoveNext()
Wend
%>
</body>
</html>
<%
MasterRecordset.Close()
Set MasterRecordset = Nothing
%>
<%
SecondRecordset.Close()
Set SecondRecordset = Nothing
%>
thanks for the help.