Hi,
I have a table with the follow fields :
ID - Int
Date - Datetime
I need to make a simple query to result the records between to dates with a single ID.
Ex.: Get the records between 01/08/2003 to 30/08/2003 only from ID=230
Im using the follow :
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('Select * from Apro where data between Inicio and Final');
ADOQuery1.Parameters[0].Value:=Inicio;
ADOQuery1.Parameters[2].Value:=Final;
ADOQuery1.Open;
When I open the query it doesnt work cos its result a null set
How can I solve this?
Im using SQL Server 2000 and Delphi 6
Thanks for atention.where u have
Select * from Apro where data between Inicio and Final
should data be date ?? --> Date - Datetime
or u did that on purpose
Can u output the record source that is being executed ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment