我想引用adoquery 和adotable 控件 
我引用了 但是在使用 adoquery 的 sql 进行查询的时候就不对了 
是不是引用的空间部可以用sql 那该怎么写
adotabele 可不可以通过sql语句来筛选 如果可以 该怎么做
请不吝赐教
                             万分感谢

解决方案 »

  1.   

    Contains the text of the SQL statement to execute for the ADO query.DescriptionUse SQL to provide the SQL statement that an ADO query component executes when its ExecSQL or Open method is called.The SQL statement provided to the SQL property may contain replaceable parameters, following standard ADO syntax conventions. Parameters are created and stored in the Parameters property.At design-time, edit the SQL statement using the property editor invoked by clicking the ellipsis button of the property in the Object Inspector. At runtime, use properties and methods of string list objects to clear the current contents, add new contents, or to modify existing contents.with ADOQuery1 do begin
      with SQL do begin
        Clear;
        Add('SELECT EmpNo, LastName, FirstName, HireDate');
        Add('FROM Employee');
      end;
      Open;
    end;

    Note: The library does not evaluate the SQL sent to the database via a TADOQuery component. The SQL used must be valid for the particular database type accessed via ADO. Any error messages passed back to the application will have originated at the ADO or database level, and so will have error codes and messages specific to those systems.