I use this quite successfully.
You'll need a tADOconnection, and a tADOquery.
Within the query, set the property of the SQL to something like this:
[tt]
SELECT * FROM [Image]
WHERE (pat_handle=

atient
AND int(acq_time)= :scandate AND ScanType= :sc_type)
[/tt]
The Parameters property in this query uses Patient (an OLE string) and ScanDate (ftLargeInt)
Then programatically you can change the parameters viz:
[tt]
procedure AdjustDateQuery(nScan : integer; sDate : string);
// redo the query on this patient with a specified scan date and type
begin
with ADOquery_image do begin
scandate := StrToDate(sDate); // convert date text to tDateTime (large integer)
close; // close the query to allow adjustment
Parameters.ParamByName('patient').value :=
ADOtable_Patients.FieldValues['pat_handle'];
Parameters.ParamByName('scandate').value :=
ScanDate; // assign date to parameter
Parameters.ParamByName('sc_type').Value :=
nScan; // get the right scan type
SQL.Text :=
'SELECT * FROM [Image] WHERE pat_handle=

atient AND int(acq_time)= :scandate AND ScanType= :sc_type)'; // be careful with the = : positions!
open; // re-open the query to apply it
end;
end;
[/tt]
Hope that helps
Cheers
Chris ;-)