Cnn.Execute "update 工资结算 set " & Mid(Label1(i), 1, Len(Label1(i)) - 1) & "=" + Text1(i) + " where 日期 = '" + Text1(0) + "'and 工号='" + Text1(1) + "'"
实时错误:
             至少一个参数没有被指定值.我用的是access数据库

解决方案 »

  1.   

    需要调试
    把语句修改一下
    dim strsql as string
    strsql= "update 工资结算 set " & Mid(Label1(i), 1, Len(Label1(i)) - 1) & "=" + Text1(i) + " where 日期 = '" + Text1(0) + "'and 工号='" + Text1(1) + "'"Cnn.Execute strsql
    跟踪调试一下变量strsql看看哪个参数有问题。
      

  2.   

    try"update 工资结算 set " & Mid(Label1(i), 1, Len(Label1(i)) - 1) & "="& Text1(i) &"  where 日期 = #"& Text1(0) &"# and 工号='"& Text1(1) &"'"
      

  3.   

    放到ACCESS中调试容易发现错误