• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Multiple row insert not working as before after applying hotfix apsb13-13

New Here ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

Coldfusion 9.01

Windows Server 2003

Microsoft Access database (yeah, we know)

Before the hotfix was applied, we could add multiple rows (anywhere from 1-100 or more) and now we're limited to 15 rows at a time after applying the hotfix. We've narrowed it down to the hotfix being the culprit as we had to rebuild the server not to long after this hotfix was applied (~ 1 month) and the multiple row inserts were once again working fine until we got to the point of applying this hot fix again.

Anyone heard of this happening? Any ideas how to correct?

Thanks in advance,

fmHelp

Below is code  of how we're doing the multiple row insert (it's performed over 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 an 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 is a 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 into Received_History (sProductID, sVendor, sOrder_No, sLot, dtExpire, iBoxes, dtReceived)

        values ('#Product#', '#Vendor#', '#Order#', '#Lot#', <cfif Expires IS "">NULL<cfelse>#CreateOdbcDate(Expires)#</cfif>, #Boxes#, #CreateOdbcDate(Now())#)

    </cfquery>

</cfloop>

Views

274

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation