Do not get data!!!!!
From: Peet Koekemoer (peetmce_at_telkomsa.net)
Date: 06/09/04
- Next message: Peet Koekemoer: "Re: How to save DateTime"
- Previous message: Vassil Nazarov: "Re: Inserts, joins and 'Unique Table'"
- Next in thread: Jeremy Collins: "Re: Do not get data!!!!!"
- Reply: Jeremy Collins: "Re: Do not get data!!!!!"
- Reply: Kevin Frevert: "Re: Do not get data!!!!!"
- Reply: Jeremy Collins: "Re: Do not get data!!!!!"
- Reply: John Leavey: "Re: Do not get data!!!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Peet Koekemoer: "Re: How to save DateTime"
- Previous message: Vassil Nazarov: "Re: Inserts, joins and 'Unique Table'"
- Next in thread: Jeremy Collins: "Re: Do not get data!!!!!"
- Reply: Jeremy Collins: "Re: Do not get data!!!!!"
- Reply: Kevin Frevert: "Re: Do not get data!!!!!"
- Reply: Jeremy Collins: "Re: Do not get data!!!!!"
- Reply: John Leavey: "Re: Do not get data!!!!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|