Skip to main content
Known Participant
August 7, 2008
Question

Undefined: using RS1.Fields.Item("COLUMNNAME").Value

  • August 7, 2008
  • 1 reply
  • 457 views
Hi all, I'm using the built in asp link to detail page wizard, as instructed to do by the help file. For the purpose of creating a link to delete/update record functions.

However when i click the link, the data is not correctly pulled into the url variable and ends up with Undefined for the value.

Has anyone see this happen before?
This topic has been closed for replies.

1 reply

RoflmeowAuthor
Known Participant
August 8, 2008
I've run through, Simplifying the code as much as possible by removing the extra DW code that's not relavant.

The first iteration of the <%=(RS1.Fields.Item("ACCESSID").Value)%> (bolded) works properly and displays the intended data from the recordset. However the second time i attempt to call the same data from the recordset, it returns an Undefined result.

Code

<% while ((Repeat1__numRows-- != 0) && (!RS1.EOF)) { %>
<tr>
<td> <%=(RS1.Fields.Item("ACCESSID").Value)%></td>
<td><%=(RS1.Fields.Item("EXISTINGPORT").Value)%></td>
<td><%=(RS1.Fields.Item("AGREEMENTONFILE").Value)%></td>
<td><%=(RS1.Fields.Item("PRIMARYNAME").Value)%></td>
<td><%=(RS1.Fields.Item("EMAIL").Value)%></td>
<td><%=(RS1.Fields.Item("PHONE").Value)%></td>
<td><%=(RS1.Fields.Item("FAX").Value)%></td>
<td><%=(RS1.Fields.Item("FIRMNAME").Value)%></td>
<td><%=(RS1.Fields.Item("ADDRESS").Value)%></td>
<td><%=(RS1.Fields.Item("ADDRESS2").Value)%></td>
<td><%=(RS1.Fields.Item("CITY").Value)%></td>
<td><%=(RS1.Fields.Item("STATE").Value)%></td>
<td><%=(RS1.Fields.Item("ZIP").Value)%></td>
<td><a href="../Edit/update.asp? <%=("ACCESSID=") + (RS1.Fields.Item("ACCESSID").Value)%>"><%=(RS1.Fields.Item("UPDATE").Value)%></a></td>
<td><a href="../Delete/Delete.asp?<%= Server.HTMLEncode("ACCESSID=") + (RS1.Fields.Item("ACCESSID").Value) %>"><%=(RS1.Fields.Item("DELETE").Value)%></a></td>
</tr>
<%
Repeat1__index++;
RS1.MoveNext();
}
%>

View Source

<tr>
<td>name </td>
<td>1234 </td>
<td>Y </td>
<td>name </td>
<td>email@email.com </td>
<td>p1 </td>
<td>p2 </td>
<td>Cname </td>
<td>Addy1 </td>
<td>Addy2 </td>
<td>Town </td>
<td>State</td>
<td>88888 </td>
<td><a href="../Edit/update.asp?ACCESSID=undefined"></a></td>
<td><a href="../Delete/Delete.asp?ACCESSID=undefined"></a></td>
</tr>
RoflmeowAuthor
Known Participant
August 8, 2008
Bueller?



Bueller?





Bueller?