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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This field can not be saved into database!!!!!

Status
Not open for further replies.

longmatch

Programmer
Nov 1, 2001
406
Dear All:
I designed a website for data collection. Every field is working fine except this combined combo box. Every time I tried to save this data I got error:

ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.

the syntax I write for this field is

<TD><select name=&quot;Category&quot; onChange=&quot;populateProcedure(document.ProcedureData,document.ProcedureData.Category.options[document.ProcedureData.Category.selectedIndex].value)&quot;>
<option value=''>Select Category</option>
<option value='Behavioral'>Behavioral Science</option>
<option value='GYNM'>GYN Management</option>
<option value='GYNP'>GYN Procedures</option>
<option value='MedicineD'>Medicine Diagnosis</option>
<option value='MedicineP'>Medicine Procedures</option>
<option value='OBD'>OB Diagnosis/Management</option>
<option value='OBP'>OB Procedures</option>
<option value='Orthopedics'>Orthopedics</option>
<option value='PediatricsN'>Pediatrics/Neonatal</option>
<option value='Surgery'>Surgery</option>
</select></TD>
<TR>

Please give me a help

Thanks

Haijun
 
That error usually arises when you are trying to get something from the database that isnt there. Or possibly when you try and put something into the db when the place you want to put it isnt there.

I am not sure I see how you saving this combo box..
 
Dear longmatch,
With regards to this clause in your dropdown:

onChange=&quot;populateProcedure(document.ProcedureData, document.ProcedureData.Category.options[document.ProcedureData.Category.selectedIndex].value)&quot;

The square brackets should be regular parentheses.

onChange=&quot;populateProcedure(document.ProcedureData, document.ProcedureData.Category.options(document.ProcedureData.Category.selectedIndex).value)&quot;
 
Thank you for your helps. I checked my database, I do find the category field in my table. What is missing is the &quot;value&quot; properties. That means what is the value will be given to this control. I do not know how to do this, since I put this syntax after the onchange event:
value = <%=session(&quot;category&quot;)%>
it did not help.

I just also follow forecasting's idea to change the parentheses, it did not work either.

Any suggestions.

Haijun
 
I have other dropdownlist, their value can be saved into database. For example,

<TD><SELECT size=1 id=select7 name=Involvement VALUE=&quot;<%= session(&quot;Involvement&quot;)%>&quot;>
<option>&nbsp;</option>
<OPTION>Assisted</OPTION>
<OPTION>Performed</OPTION>
<OPTION>Supervised</OPTION>
<OPTION>Independent Performance</OPTION>
</SELECT></TD>

can be saved into database by
rs(&quot;involvement&quot;) = request(&quot;Involvement&quot;).

The difference between this dropdown list from previous one is the the second one without &quot;Value&quot; in <OPTION> tag.

Anybody can solve this problem for me.

Thanks

haijun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top