Do not get data!!!!!

From: Peet Koekemoer (peetmce_at_telkomsa.net)
Date: 06/09/04


Date: Wed, 9 Jun 2004 13:35:30 +0200

Hi all,

It's me again. Well I have the following problem. I'm trying to extract data
from the db and load it into a Grid but I get no records. But I know there
are three records for the date selected. I do get the records when I do a
normal select in Query Analyzer.

I'm using D5, TADOQuery and MSSQL2000

This is my Procedure to get the data.

With DataModuleForm.ADOQuery do
begin
   SQL.Clear;
   SQL.Add('Select * from SundayLabour where WorkDate = :WorkDate');
   Paramaters.ParamByName('WorkDate').Value := WorkDate.Date
   Open;

   While NOT EOF do
    begin
        Grid.Cells[0,Grid.RowCount-1] := FieldByName('Employee').AsString;
        Grid.Cells[1,Grid.RowCount-1] := FieldByName('WorkDate').AsString;
        Grid.Cells[2,Grid.RowCount-1] := FieldByName('StartTime').AsString;
        Grid.Cells[3,Grid.RowCount-1] := FieldByName('EndTime').AsString;
        Next;
    end;
    Close;
end;

No again am I doing this Wrong as I'm new to ADO and use to BDE.

Peet



Relevant Pages

  • Access Insert failing, but no error message
    ... I am using Access to extract data from a SQL Server table ... and load it into Teradata. ... rows load and there is no Error message. ...
    (microsoft.public.access.externaldata)
  • Re: Do not get data!!!!!
    ... Peet Koekemoer wrote: ... > extract data from the db and load it into a Grid but I get no ... John Leavey ...
    (borland.public.delphi.database.ado)