Query.SQL.Text:=' Insert BarPrint(GoodsID,GoodsName,InstoreNum) '+
                 'values('''+strID+''','''+STRName+''','''+strNum+''')';
            strid,strname为string  strNum为Integer  上面语句那里有问题

解决方案 »

  1.   

    将strNum两边的引号去掉Query.SQL.Text:=' Insert BarPrint(GoodsID,GoodsName,InstoreNum) '+
                     'values('''+strID+''','''+STRName+''','+strNum+')';
      

  2.   

    Query.SQL.Text:=' Insert BarPrint(GoodsID,GoodsName,InstoreNum) '+
                     'values('''+strID+''','''+STRName+''','+inttostr(strNum)+')';
    strNum为Integer  ,所以用双引号的话类型肯定不匹配.
      

  3.   

    既然你知道strNum是Integer型就不能加引号嘛,字符串才需要引号