I have a TMS WEB application retrieving data from TMS XData REST server.
I am using TXDATAWebConnection to connect to the REST server.
I am using TXDATAWebDataSet to connect to an entity...(Q08).
I then call Q08.LOAD to load data to dataset.
I have a TWebDBGrid with Q08 for datasource.dataset.
The data loads and shows correctly in the TWebDBGrid.
HOWEVER,
I wish to show the data in a TWebStringGrid by iterating through Q08 like I do in my Windows desktop applications and I can't get Q08 to contain any data. I do it like this:
- Q08.open;
- Q08.load;
- Q08.first;
- while not Q08.eof do
begin
TWebStringGrid.cells[column,row] := Q08.fieldbyname('DESCRIPTION').AsString;
Q08.next;
end;
This is not my code but instead a snippet to hopefully show you what I am trying to do.
The problem is, when I use DATASET.OPEN, DATASET.LOAD, DATASET.FIRST, there isn't any data in Q8. BUT it works fine when loading it into a DBGRID using only DATASET.LOAD.
What is the correct sequence of steps to do when using a TXDATAWebDataset and I wish to iterate through the table one row at a time? Do I use DATASET.OPEN or only DATASET.LOAD?
Regards,
Steve Wagner
Instamation Systems Inc.