我建立了一个窗体,之前运行正常,但是加入一个ADOTable连接到SQL的Table时
一运行就出现以下的错误,
Project communication.exe raised exception class EVariantError
with message'Invalid variant type conversion'.Process stopped.
Use Step or Run to continue.
请各位帮忙解决:

解决方案 »

  1.   

    类型的转换错把tabke的语句铁处来看看
      

  2.   

    没有语句,我只是把ADOtable的属性connectionstring和tablename设了一下,就出现上面的错误。
      

  3.   

    adotable里面肯定是要有语句的
      

  4.   

    with ADOTable1 do
    begin
    active:=true;
    adotable1.Filtered:=true;
    adotable1.filter:='tname='''+edit1.Text+'''';
    adotable1.Filtered:=false;
    可不可以这样用?
      

  5.   

    adotable1.filter:='tname='+''''+edit1.Text+'''';
      

  6.   

    Project communication.exe raised exception class EVariantError
    with message'Invalid variant type conversion'.Process stopped.
    Use Step or Run to continue.
    -----------
    这个错误经常是由于一个字符串和NULL相加引起的。
      

  7.   

    adotable1.filter:='tname='''+edit1.Text+'''' 这句话有问题的with ADOTable1 do
    begin
    active:=False;
    adotable1.filter:='tname='+edit1.Text;
    adotable1.Filtered:=true;
    试试!
      

  8.   

    with ADOTable1 do
    begin
    active:=false;
    adotable1.Filtered:=false;
    adotable1.filter:='tname='''+edit1.Text+'''';
    adotable1.Filtered:=true;
    active:=true;
    这样试一试应该可以的
      

  9.   

    给adotable添加永久字段,好像表里有记录的字段为空时会出现上面的错误