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 Everyone

I 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>
&lt;%
Dim RSStaffProfileFull__MMColParam
RSStaffProfileFull__MMColParam = "1"
If (Request.QueryString("FEName" &lt;&gt; "" Then
RSStaffProfileFull__MMColParam = Request.QueryString("FEName"
End If
%&gt;
&lt;%
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
%&gt;
&lt;%
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
%&gt;
</font id=code></pre id=code>

Here is the first repeat region
<pre id=code><font face=courier size=2 id=code>
&lt;%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
RSStaffProfileFull_numRows = RSStaffProfileFull_numRows + Repeat1__numRows
%&gt;
</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>
&lt;table width="600" border="0" cellpadding="0" cellspacing="0"&gt;
&lt;tr valign="top"&gt;
&lt;td width="290"&gt; &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;%=(RSStaffProfileFull.Fields.Item("FEName".Value)%&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;%=(RSStaffProfileFull.Fields.Item("StaffAimIns".Value)%&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;%=(RSStaffProfileFull.Fields.Item("OldAimCode".Value)%&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td width="6"&gt;&lt;font size="3"&gt;&nbsp;&lt;/font&gt;&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Team".Value)%&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;font size="2"&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Floor".Value)%&gt; &lt;/font&gt;&lt;/strong&gt;&lt;/font&gt; &lt;font size="2"&gt;&lt;strong&gt;Floor-
&lt;%=(RSStaffProfileFull.Fields.Item("Building".Value)%&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td rowspan="10"&gt;&lt;div align="center"&gt;&lt;img src="../images/Staff/&lt;%=(RSStaffProfileFull.Fields.Item("PicturePath".Value)%&gt;" width="144" height="194"&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td colspan="3"&gt;&lt;div align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;
HOLIDAY LISTINGS&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td width="74"&gt;&nbsp;&lt;/td&gt;
&lt;td width="300"&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Telephone&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Telephone".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;e-mail&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Email".Value)%&gt;@darbys.co.uk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Mobile&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Mobile".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Home Office&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("HomeOffice".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Fax&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Fax".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Expertise&lt;/td&gt;
&lt;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>
&lt;%
FilterParam = RSStaffProfileFull.Fields.Item("FEName".Value
RSExperts.Filter = "FEName=" & FilterParam 'THIS IS THE LINE WHERE THE ERROR IS
While (NOT RSExperts.EOF)
%&gt;
&lt;%=(RSExperts.Fields.Item("Expertise".Value)%&gt;, &nbsp;
&lt;%
RSExperts.MoveNext()
Wend
%&gt; &lt;/td&gt;
</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>
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;%=(RSStaffProfileFull.Fields.Item("JobTitle".Value)%&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&pound;&lt;%=(RSStaffProfileFull.Fields.Item("HourlyRate".Value)%&gt; / ph&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Partner".Value)%&gt;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("TeamLeader".Value)%&gt;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Secretary&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("Secretary".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("FirstAider".Value)%&gt;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;Telephone&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("SecTelephone".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("EvecChairTrained".Value)%&gt;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;e-mail&lt;/td&gt;
&lt;td&gt;&lt;%=(RSStaffProfileFull.Fields.Item("SecEmail".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td colspan="4"&gt;&lt;%=(RSStaffProfileFull.Fields.Item("ExtraInfo".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</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>
&lt;%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RSStaffProfileFull.MoveNext()
Wend
%&gt;
</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>
&lt;%
RSStaffProfileFull.Close()
Set RSStaffProfileFull = Nothing
%&gt;
&lt;%
RSExperts.Close()
Set RSExperts = Nothing
%&gt;
</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.

Reply to this topic