标签:HERE ota support 出错 param app _id material net
sqlserver中,insert和update,会判定长度是否超过2100,超过就会报错,我这边更新超过100就报错了(需要研究一下为什么100条数据就报错了)。
批量操作中出错,看我是怎么解决的,如下:
1.xxxServiceImpl.java:
2.xxxMapper.java
3. xxxMapper.xml
<update id="updatePoInfo" parameterType="java.util.List"> <foreach collection="updatePoList" item="p" index="index" open="" close="" separator=";"> update production_order <set> plant = #{p.plant}, order_type = #{p.orderType}, batch_no =#{p.batchNo}, customer_code = #{p.customerCode}, customer_name =#{p.customerName}, material_no = #{p.materialNo}, mode_no =#{p.moldNo}, cust_material_no = #{p.custMaterialNo}, order_qty =#{p.orderQty}, uom = #{p.uom}, packing_category =#{p.packingCategory}, country = #{p.country}, mpt =#{p.mpt}, mpq = #{p.mpq}, mpt_material_no =#{p.mptMaterialNo}, length = #{p.length}, width =#{p.width}, high = #{p.high}, apt =#{p.apt}, apq = #{p.apq}, assortment_id =#{p.assortmentID}, assortment_description = #{p.assortmentDescription}, total_carton_qty =#{p.totalCartonQty}, rel_date =#{p.relDate}, locco = #{p.locco}, airplane_type =#{p.airplaneType}, zscxs = #{p.zscxs} </set> where production_order = #{p.productionOrderNo} </foreach> </update>
4.运行后报错:
mybatis+sqlserver批量操作数据库报错:The server supports a maximum of 2100 parameters
标签:HERE ota support 出错 param app _id material net
原文地址:https://www.cnblogs.com/PinkPink/p/13832766.html