Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Brazil
    Posts
    1

    Exclamation Unanswered: Query Date Type - Somebody help me!p

    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.

  2. #2
    Join Date
    Jan 2003
    Location
    New York
    Posts
    160
    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 ?
    Beyond Limitation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •