Forums
This topic is locked
Nested Repeat Regions
Posted 22 Nov 2005 14:29:56
1
has voted
22 Nov 2005 14:29:56 Andrew Baker posted:
Hi EveryoneI am having a bit of trouble sorting this one out and getting my recordsets to work. I get this message
<font color=red>ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/20050915darbysintranet/People/StaffProfile.asp, line 369</font id=red>
Here is the recordsets i am using.
<pre id=code><font face=courier size=2 id=code>
<%
Dim RSStaffProfileFull__MMColParam
RSStaffProfileFull__MMColParam = "1"
If (Request.QueryString("FEName"


RSStaffProfileFull__MMColParam = Request.QueryString("FEName"

End If
%>
<%
Dim RSStaffProfileFull
Dim RSStaffProfileFull_numRows
Set RSStaffProfileFull = Server.CreateObject("ADODB.Recordset"

RSStaffProfileFull.ActiveConnection = MM_darbys1_STRING
RSStaffProfileFull.Source = "SELECT * FROM TBLStaffProfile WHERE FEName LIKE '%" + Replace(RSStaffProfileFull__MMColParam, "'", "''"

RSStaffProfileFull.CursorType = 0
RSStaffProfileFull.CursorLocation = 2
RSStaffProfileFull.LockType = 1
RSStaffProfileFull.Open()
RSStaffProfileFull_numRows = 0
%>
<%
Dim RSExperts
Dim RSExperts_numRows
Set RSExperts = Server.CreateObject("ADODB.Recordset"

RSExperts.ActiveConnection = MM_darbys1_STRING
RSExperts.Source = "SELECT * FROM tblExperts"
RSExperts.CursorType = 0
RSExperts.CursorLocation = 2
RSExperts.LockType = 1
RSExperts.Open()
RSExperts_numRows = 0
%>
</font id=code></pre id=code>
Here is the first repeat region
<pre id=code><font face=courier size=2 id=code>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
RSStaffProfileFull_numRows = RSStaffProfileFull_numRows + Repeat1__numRows
%>
</font id=code></pre id=code>
Here is the the table with the repeat region
<pre id=code><font face=courier size=2 id=code>
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="290"> <p><font size="3"><strong><%=(RSStaffProfileFull.Fields.Item("FEName"

<p><font size="3"><strong><%=(RSStaffProfileFull.Fields.Item("StaffAimIns"


<td width="6"><font size="3"> </font></td>
<td colspan="2"><p><font size="3"><strong><%=(RSStaffProfileFull.Fields.Item("Team"

<p><font size="3"><strong><font size="2"><%=(RSStaffProfileFull.Fields.Item("Floor"

<%=(RSStaffProfileFull.Fields.Item("Building"

</tr>
<tr valign="top">
<td rowspan="10"><div align="center"><img src="../images/Staff/<%=(RSStaffProfileFull.Fields.Item("PicturePath"

<td colspan="3"><div align="center"><strong><font size="3">
HOLIDAY LISTINGS</font></strong></div></td>
</tr>
<tr valign="top">
<td> </td>
<td width="74"> </td>
<td width="300"> </td>
</tr>
<tr valign="top">
<td> </td>
<td>Telephone</td>
<td><%=(RSStaffProfileFull.Fields.Item("Telephone"

</tr>
<tr valign="top">
<td> </td>
<td>e-mail</td>
<td><%=(RSStaffProfileFull.Fields.Item("Email"

</tr>
<tr valign="top">
<td> </td>
<td>Mobile</td>
<td><%=(RSStaffProfileFull.Fields.Item("Mobile"

</tr>
<tr valign="top">
<td> </td>
<td>Home Office</td>
<td><%=(RSStaffProfileFull.Fields.Item("HomeOffice"

</tr>
<tr valign="top">
<td> </td>
<td>Fax</td>
<td><%=(RSStaffProfileFull.Fields.Item("Fax"

</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td> </td>
<td>Expertise</td>
<td</font id=code></pre id=code>
<font color=red>'Here is the code to the second repeat region</font id=red>
<pre id=code><font face=courier size=2 id=code>
<%
FilterParam = RSStaffProfileFull.Fields.Item("FEName"

RSExperts.Filter = "FEName=" & FilterParam 'THIS IS THE LINE WHERE THE ERROR IS
While (NOT RSExperts.EOF)
%>
<%=(RSExperts.Fields.Item("Expertise"

<%
RSExperts.MoveNext()
Wend
%> </td>
</font id=code></pre id=code>
<font color=red> ' End of the second repeat region
Followed by rest of table</font id=red>
<pre id=code><font face=courier size=2 id=code>
</tr>
<tr valign="top">
<td><font size="3"><strong><%=(RSStaffProfileFull.Fields.Item("JobTitle"

<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td>£<%=(RSStaffProfileFull.Fields.Item("HourlyRate"

<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td><%=(RSStaffProfileFull.Fields.Item("Partner"

<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td><%=(RSStaffProfileFull.Fields.Item("TeamLeader"

<td> </td>
<td>Secretary</td>
<td><%=(RSStaffProfileFull.Fields.Item("Secretary"

</tr>
<tr valign="top">
<td><%=(RSStaffProfileFull.Fields.Item("FirstAider"

<td> </td>
<td>Telephone</td>
<td><%=(RSStaffProfileFull.Fields.Item("SecTelephone"

</tr>
<tr valign="top">
<td><%=(RSStaffProfileFull.Fields.Item("EvecChairTrained"

<td> </td>
<td>e-mail</td>
<td><%=(RSStaffProfileFull.Fields.Item("SecEmail"

</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td colspan="4"><%=(RSStaffProfileFull.Fields.Item("ExtraInfo"

</tr>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</font id=code></pre id=code>
<font color=red>
Here is the end of the first repeat region
</font id=red>
<pre id=code><font face=courier size=2 id=code>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RSStaffProfileFull.MoveNext()
Wend
%>
</font id=code></pre id=code>
<font color=red>
Here is the end of the Recordsets
</font id=red>
<pre id=code><font face=courier size=2 id=code>
<%
RSStaffProfileFull.Close()
Set RSStaffProfileFull = Nothing
%>
<%
RSExperts.Close()
Set RSExperts = Nothing
%>
</font id=code></pre id=code>
I am sorry about all the code but i just wanted to make sure you understood exactly what i needed to be worked out.
Thank you for your help
Baker <pre id=code><font face=courier size=2 id=code> </font id=code></pre id=code> <pre id=code><font face=courier size=2 id=code> </font id=code></pre id=code> <pre id=code><font face=courier size=2 id=code> </font id=code></pre id=code>
Replies
Replied 22 Nov 2005 14:35:38
22 Nov 2005 14:35:38 Andrew Baker replied:
Sorry everyone i forgot to state i am using ASP (VBScript)
Version of Dreamweaver MX
Version Extention - Hand written code
Sorry again. First time posting.
Version of Dreamweaver MX
Version Extention - Hand written code
Sorry again. First time posting.