Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello all, I recieve this error

Status
Not open for further replies.

roaml

Technical User
Feb 19, 2002
264
US
Hello all,

I recieve this error with the two Input statements (below):

Error Message:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding
to the requested name or ordinal.
/project/wo_project_form.asp, line 355.

Here is my code: (Line 355 is the first <Input type> statement). The &quot;project_status&quot; select option statement appears fine if I remove the Input statements.

<%
MySQL = &quot;Insert into wo_table (wo_number, project_name, project_start_date, project_end_date) Values('&quot;&wo_number&&quot;','&quot;&project_name&&quot;','&quot;&project_start_date&&quot;','&quot;&developer_end_date&&quot;');&quot;
%>
<Table>
<tr>
<td class=&quot;small&quot; colspan=&quot;2&quot;><li class=&quot;bullettext&quot;><strong> PROJECT INFORMATION</strong></td>
</tr>
<tr>
<td class=&quot;small&quot; width=&quot;20&quot;> </td>
<td width=&quot;701&quot; class=&quot;small&quot;></td>
</tr>
<tr>
<td class=&quot;small&quot; width=&quot;20&quot;> </td>
<td class=&quot;small&quot;>Project Name:</td>

<INPUT TYPE=&quot;text&quot; NAME=&quot;project_name&quot; VALUE=&quot;<%=RS(&quot;project_name&quot;)%>&quot; SIZE=20 tabindex=&quot;1&quot;></td>
<INPUT TYPE=&quot;text&quot; NAME=&quot;project_start_date&quot; VALUE=&quot;<%=RS(&quot;project_start_date&quot;)%>&quot; SIZE=20 tabindex=&quot;2&quot;></td>
<INPUT TYPE=&quot;text&quot; NAME=&quot;project_end_date&quot; VALUE=&quot;<%=RS(&quot;project_end_date&quot;)%>&quot; SIZE=20 tabindex=&quot;3&quot;></td>

<td>Project Status:
<select name=&quot;project_status&quot; tabindex=&quot;4&quot;>
<option><strong><%=RS(&quot;project_status&quot;)%></strong></option>
<option value=&quot;Open&quot;>Open</option>
<option value=&quot;Closed&quot;>Closed</option>
<option value=&quot;Pending&quot;>Pending</option>
</select>
</td>
</tr>
</Table>

Appreciate your time.
 
The error message is because you are trying to use information in a recordset that is not available. On that line, you have RS(&quot;project_name&quot;) and the recordset apparently does not contain a field called project_name.

I noticed that you have created your SQL statement in the variable MySQL, but where are you actually pulling them information from the database into the RS recordset? This could be where the problem is. Get the information from the database into the recordset with a statement such as:

rs.open MySQL, cn

where rs is your recordset, MySQL is a string variable containing your SQL statement and cn is your open connection to the database.

Bernie
 
As I explained to you yesterday when you posted this same question, you are using a recordset value that does not exist in your recordset. Where do you create the RS recordset? Presumably, the &quot;project_status&quot; is a field in your RS recordset, but the remainder of the RS fields (&quot;project_name, project_start_date, project_end_date&quot;) are apparently only listed in the mySQL INSERT statement - that means they are NOT part of the returned recordset RS!

To make sure this is the case, post the code that produces your RS recordset, or response.write the SQL that produces your RS recordset, and you should be able to verify what I told you before and what bernlaw has also just told you.

-----------------------------------------------------------------------------------------------------
&quot;If you can't explain something to a six-year-old, you really don't understand it yourself.&quot;
-- Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top