是这样的。我在ADOTable1的onCalcFields事件中写了如下的代码。用于合计(heji)字段。程序运行时没有什么问题。但用DBNavigator1的"+"号增加一条记录时,出现了错误对话框显示为"
Project shoufei.exe raised excekption class EConvertError with message "is not a valid integer value'. process stopped.use step or run to continue"
onCalcFields事件的代码: ADOTable1.FieldByName('heji').Value:= ADOTable1.fieldbyname('shihuafei').AsInteger+ADOTable1.fieldbyname('iphuafei').AsInteger;其中heji的计算字段我设置为:integer 。shihuafei 和iphuafei两个字段我在access中设置为"文本型"的。。
请哪位朋友告诉我怎么做?

解决方案 »

  1.   

    请 weitao999(涛涛) 朋友来此接分。。给分证据:http://expert.csdn.net/Expert/topic/1643/1643422.xml?temp=3.316897E-02
      

  2.   

    ADOTable1.FieldByName('heji').Value:= ADOTable1.fieldbyname('shihuafei').AsInteger+ADOTable1.fieldbyname('iphuafei').AsInteger;AsInteger为什么不换成Value呢?试试看
      

  3.   

    可以把asinteger换成value试验一下。如果实在不可以用strtoint转换一下。