我在合并导入数据时出现以下问题,说数据类型不正确
此主题相关图片如下:qq截图20170203232213.jpg
但是我查了表结构,数据类型是整数型,不就是Int32型的吗,为什么说不正确,该怎么解决?
此主题相关图片如下:qq截图20170203232525.jpg
导入数据的代码如下:(如果把黄色背景的代码删了就没问题)
Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter= "Excel文件|*.xls|Excel2007文件|*.xlsx" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim mg As New Merger
mg.SourcePath = dlg.FileName
mg.Format = "excel"
mg.SourceTableName = "PartMaterial$"
mg.DataTableName = "fabricdetail"
mg.FieldMaps.Add("Id","Id")
mg.FieldMaps.Add("生成备料单时间","stockTM")
mg.FieldMaps.Add("编号","HandID")
mg.FieldMaps.Add("样办单号","SrsNO")
mg.FieldMaps.Add("客户名称","Customer")
mg.FieldMaps.Add("内部款号","StyleNo")
mg.FieldMaps.Add("尺码","Size")
mg.FieldMaps.Add("产品颜色","color")
mg.FieldMaps.Add("部门组名","QAgroup")
mg.FieldMaps.Add("创建人","FllowQA")
mg.FieldMaps.Add("办房部位","SampleDepart")
mg.FieldMaps.Add("物料位置","MaterialPst")
mg.FieldMaps.Add("物料大类","MaterialCategory")
mg.FieldMaps.Add("小类别","MaterialKind")
mg.FieldMaps.Add("物料名称","MaterialName")
mg.FieldMaps.Add("用料说明","MaterialDescription")
mg.FieldMaps.Add("颜色(通用)","GeneralColor")
mg.FieldMaps.Add("色办颜色/染色颜色","DyeColor")
mg.FieldMaps.Add("缸号","BatchNo")
mg.FieldMaps.Add("算料数量","SumQuantity")
mg.FieldMaps.Add("单位","Unit")
mg.FieldMaps.Add("加工要求","processRequire")
mg.FieldMaps.Add("备料员备注","RemarkByStocker")
mg.FieldMaps.Add("备料员","Stocker")
mg.FieldMaps.Add("备注","RemarkByQA")
mg.FieldMaps.Add("回仓架位","BackstockPst")
mg.FieldMaps.Add("生产规格(通用)","ProcessSize")
mg.FieldMaps.Add("裁片数/物料个数","SumInteger")
mg.FieldMaps.Add("需求数量","RequireQuanlity")
mg.FieldMaps.Add("仓位","StockPst")
mg.FieldMaps.Add("RM_Productsample_Costcenter","CostCenter")
mg.FieldMaps.Add("紧急程度","UrgencyLevel")
mg.FieldMaps.Add("样办用途","SampleUse")
mg.Merge()
End If