下面的代码运行时,出现错误:
'update tmh set dtmh='''+trim(Edit16.Text)+''' where id=''+did+'''
报错如下:
提示:Project P_Tcb.exe raise exception class EOLeException with message'标准表达式中数据类型不匹配。'.Precess stopped.Use Step or Run to continue
id是整数类型
其他方面都能正常运行有楼主回复用where id='+did
delphi无法编译,提示如下:
[Error] U_txmdy.pas(546): Incompatible types: 'String' and 'Integer'同样,语句sql.Add('update tmh set dtmh='''+trim(Edit16.Text)+''' where id='+did+'');在编译时也有以上提示
'update tmh set dtmh='''+trim(Edit16.Text)+''' where id=''+did+'''
报错如下:
提示:Project P_Tcb.exe raise exception class EOLeException with message'标准表达式中数据类型不匹配。'.Precess stopped.Use Step or Run to continue
id是整数类型
其他方面都能正常运行有楼主回复用where id='+did
delphi无法编译,提示如下:
[Error] U_txmdy.pas(546): Incompatible types: 'String' and 'Integer'同样,语句sql.Add('update tmh set dtmh='''+trim(Edit16.Text)+''' where id='+did+'');在编译时也有以上提示
整型:id='+IntToStr(did)
字符型:id='+did
http://topic.csdn.net/u/20111027/15/da20addc-144b-4e82-ad4d-3a82f71970de.html
查查字段类型
'update tmh set dtmh='''+trim(Edit16.Text)+''' where [id]='+IntToStr(did)