adoData2.Active := False;
adoData2.SQL.Text := 'select top 1 * from bs_Data where Point='+QuotedStr(p2);
adoData2.Active := True;
--------------------------------------------------------------------
[错误] Unit_Main.pas(508): Incompatible types: 'String' and 'TLabel'
紧急求助,出现以上错误怎么解决

解决方案 »

  1.   

    P2是啥?TLabel ?
    QuotedStr(p2.Caption);  ?
      

  2.   

    adoData2.Active := False; 
    adoData2.SQL.Text := 'select top 1 * from bs_Data where Point='+QuotedStr(p2.Caption); 
    adoData2.Active := True; 是不是应该这样?
      

  3.   

    界面中有一个DBEDIT,从数据库中取出point=P2的数据显示在其中
      

  4.   

    好了 谢谢。。
    QuotedStr(p2.Caption)  再问一下这么写是为什么