Multiple row insert not working as before after applying hotfix apsb13-13
coldfusion 9.01
windows server 2003
microsoft access database (yeah, know)
before hotfix applied, add multiple rows (anywhere 1-100 or more) , we're limited 15 rows @ time after applying hotfix. we've narrowed down hotfix being culprit had rebuild server not long after hotfix applied (~ 1 month) , multiple row inserts once again working fine until got point of applying hot fix again.
anyone heard of happening? ideas how correct?
thanks in advance,
fmhelp
below code of how we're doing multiple row insert (it's performed on 3 pages):
page 1
<cfform name="form1" method="post" action="handler.cfm?page=update_2">
<input type="hidden" name="sproductid" value="<cfoutput>#qproducts.sproductid#</cfoutput>">
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<th scope="row" colspan="2" align="center">update inventory product</th>
</tr>
<tr>
<th width="42%" scope="row">product id</th>
<td width="58%"><cfoutput>#qproducts.sproductid#</cfoutput></td>
</tr>
<tr>
<th width="42%" scope="row">friendly name</th>
<td width="58%"><cfoutput>#qproducts.sfriendly_name#</cfoutput></td>
</tr>
<tr>
<th width="42%" scope="row">description</th>
<td width="58%"><cfoutput>#qproducts.sdescription#</cfoutput></td>
</tr>
<tr>
<th width="42%" scope="row">vendor</th>
<td><select name="svendor">
<cfoutput><option value="#qproducts.svendor#">#qproducts.svendor#</option></cfoutput>
<option value=""></option>
<cfoutput query="qvendor">
<option value="#svendor#">#svendor#</option>
</cfoutput>
</select></td>
</tr>
<tr>
<th scope="row">order no.</th>
<td><cfinput name="sorder_no" type="text" value="" required="yes" message="order number required field."></td>
</tr>
<tr>
<th scope="row">lot no.</th>
<td><input name="slot" type="text" value=""/></td>
</tr>
<tr>
<th scope="row">date expires</th>
<td><input name="dtexpire" type="text" value=""/></td>
</tr>
<tr>
<th scope="row">boxes received</th>
<td><input name="iboxes" type="text" value="" /></td>
</tr>
<tr>
<th scope="row">doses/units</th>
<td><input name="pcount" type="text" value="" /></td>
</tr>
<tr>
<th scope="row">note</th>
<td><cfoutput>#qproducts.snote#</cfoutput></td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
</tr>
<tr>
<th scope="row" colspan="2" align="center"><input type="submit" value="submit" /></th>
</tr>
</table>
</cfform>
</table>
page 2
<form name="form1" method="post" action="handler.cfm?page=update_3">
<cfoutput><input type="hidden" name="pcount" value="#form.pcount#"></cfoutput>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" align="left">record count (doses/units)= <cfoutput>#form.pcount#</cfoutput></td>
</tr>
<tr>
<td>product id</td>
<td>vendor</td>
<td>order no.</td>
<td>lot no.</td>
<td>expiration date</td>
<td>num. of boxes</td>
</tr>
<cfset peoplecount = 0>
<cfloop index="add" from="1" to="#form.pcount#" step="1">
<tr>
<cfset peoplecount = peoplecount + 1>
<td><input <cfoutput> value="#form.sproductid#" </cfoutput> name="sproductid_<cfoutput>#peoplecount#</cfoutput>" type="text" id="sproductid_"></td>
<td><input <cfoutput>value="#form.svendor#"</cfoutput> name="svendor_<cfoutput>#peoplecount#</cfoutput>" type="text" id="svendor_"></td>
<td><input <cfoutput> value="#form.sorder_no#" </cfoutput> name="sorder_no_<cfoutput>#peoplecount#</cfoutput>" type="text" id="sorder_no_"></td>
<td><input <cfoutput>value="#form.slot#"</cfoutput> name="slot_<cfoutput>#peoplecount#</cfoutput>" type="text" id="slot_"></td>
<td><input <cfoutput> value="#dateformat(form.dtexpire, 'mm/dd/yy')#" </cfoutput> name="dtexpire_<cfoutput>#peoplecount#</cfoutput>" type="text" id="dtexpire_"></td>
<td><input <cfoutput>value="#form.iboxes#"</cfoutput> name="iboxes_<cfoutput>#peoplecount#</cfoutput>" type="text" id="iboxes_"></td>
</tr>
</cfloop>
<tr>
<td> </td>
<td>
<input type="submit" name="submit" value="submit">
<input name="howmany" type="hidden" id="howmany" value="<cfoutput>#form.pcount#</cfoutput>">
</td>
</tr>
</table>
</form>
</table>
page 3
<cfquery name="qgetonhand" datasource="#variables.dsnci#">
select *
from products
where sproductid = '#session.sproductid#'
</cfquery>
<cfquery datasource="#variables.dsnci#">
update products
set ionhandqty = (#form.pcount# + #qgetonhand.ionhandqty#)
where sproductid = '#session.sproductid#'
</cfquery>
<cfset quantity = #form.pcount#>
<cfset pcount = 0>
<!-- start loop -->
<cfloop index="add" from="1" to="#form.howmany#" step="1">
<cfset pcount = pcount + 1>
<cfset product = "form.sproductid_#pcount#">
<cfset product = evaluate(product)>
<cfset vendor = "form.svendor_#pcount#">
<cfset vendor = evaluate(vendor)>
<cfset order = "form.sorder_no_#pcount#">
<cfset order = evaluate(order)>
<cfset lot = "form.slot_#pcount#">
<cfset lot = evaluate(lot)>
<cfset expires = "form.dtexpire_#pcount#">
<cfset expires = evaluate(expires)>
<cfset boxes = "form.iboxes_#pcount#">
<cfset boxes = evaluate(boxes)>
<cfquery datasource="#variables.dsnci#" name="insertdata">
insert received_history (sproductid, svendor, sorder_no, slot, dtexpire, iboxes, dtreceived)
values ('#product#', '#vendor#', '#order#', '#lot#', <cfif expires "">null<cfelse>#createodbcdate(expires)#</cfif>, #boxes#, #createodbcdate(now())#)
</cfquery>
</cfloop>
More discussions in ColdFusion
adobe
Comments
Post a Comment