Hi,
1.Did you execute your sql query in an Query Analyzer?(I assume that you use MSSQL Server). Get your runtime query with the Profiler and run it. Maybe is nothing to display.
2.Why don't you use a db aware component - DBGrid? You will work directly on the dataset and actions (update, insert, delete) will be easier to do.
3. If your query returns data from server, try the following code to populate your StringGrid:
i := 0;
while not Eof do
begin
for j:=0 to stringgrid1.ColCount-1 do //or to FieldCount - 1
stringgrid1.Cells[j,i]:=Fields[j].asString;
Next;
inc(i);
end;
Ionelul
Junior Poster in Training
94 posts since Dec 2009
Reputation Points: 17
Solved Threads: 27