我用datasource,DBGRID,ADOTABLE,ADOCONNECTION 连接数据库已经成功~~但在运行时回出现:project Project1.exe raised exception class EVariantTypeClassError with message 'could not convert variant of type
(Null) into type (string)'.的提示。但是我一直没找到错误~~怎么回事??
(Null) into type (string)'.的提示。但是我一直没找到错误~~怎么回事??
因为你的表这个字段为空字段。adotable1.fieldbyname('field').value改为 .asstring;