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.   

    到底发了多少贴?adoData2.Active := False; 
    adoData2.SQL.Text := 'select top 1 * from bs_Data where Point='+QuotedStr(p2.caption); 
    adoData2.Active := True; 
      

  2.   

    你這樣試試:
    adoData2.Active := False;
    adoData2.SQL.Clear; 
    adoData2.SQL.Text := 'select top 1 * from bs_Data where Point='+''''+QuotedStr(p2.caption)+''''; 
    adoData2.Active := True; 
      

  3.   

    QuotedStr(p2.Caption);一模一样的一贴。
      

  4.   

    QuotedStr(p2.caption)
    凑个热闹,呵呵