RAD Studio VCL Reference
|
Contains the text of the SQL statement to execute for the ADO query.
property SQL: TWideStrings;
__property TWideStrings SQL;
Use 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;
ADOQuery1->Close(); ADOQuery1->SQL->Clear(); ADOQuery1->SQL->Add("SELECT EmpNo, LastName, FirstName, HireDate"); ADOQuery1->SQL->Add("FROM Employee"); ADOQuery1->Open();
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|