kusql:='update 库存表 '+
          ' set 37=isnull(37,0)-strtoint(edit7.text)'+
                             ' 38=isnull(38,0)-strtoint(edit8.text)'+
                             ' 39=isnull(39,0)-strtoint(edit9.text)'+
                             ' 40=isnull(40,0)-strtoint(edit10.text)'+
                             ' 41=isnull(41,0)-strtoint(edit11.text)' +
                             ' 42=isnull(42,0)-strtoint(edit12.text)' +
                             ' 43=isnull(43,0)-strtoint(edit13.text)' +
                             ' 44=isnull(44,0)-strtoint(edit14.text)' +
    'where  isnull(公司名,'''+edit3.text+''')=edit3.Text,isnull(类型,'''+combobox1.Items[combobox1.ItemIndex]+''')=combobox1.Items[combobox1.ItemIndex] '+
           'isnull(货号,'''+edit1.text+''')=edit1.text' ;
上面这样的写法,在编译是通过的,就是运行时,提示,有操作符丢失的错误,
请问各位高手如何改正啊。

解决方案 »

  1.   

    set后面的各个字段之间是没有逗号的呀?这个SQL语法是这样的啊!可我就不知道错在哪里。
      

  2.   

    因为是在家里做,所以没装SQLSERVER,我是用ACCESS在模拟
      

  3.   

    Access需要标准SQL语句,你查查标准的Set是怎么写的,我以前写的sql server的sql 语句到access经常报错,后来发现access支持的和sql server还是有一点不一样的。
      

  4.   

    sql里没有strtoint这个函数把
    set 37=isnull(37,0)
    你的字段名就叫37么?这个合法么?用[]扩起来