I am trying to use TclientDataSet so that datasets reside in memeory. I am following an article, but so far I seem to get an error when I set active to 'True'.
The error I get is missing 'Data provider or data packet'
on my form I have:
TclientDataSet
TDatasource (which has the dataset set to the above)
Then I try to put some data in from a sqlite database.
Var
i : integer;
begin
DB := TLiteDB.Create(Self, 'hotelx.sdb3');
DB.Query('Select * from rooms');
For i := 0 to DB.RowCount -1 do
begin
RoomCDS.Open;
RoomCDS.Append;
RoomCDS.FieldByName('room_id').AsInteger := StrToInt(DB.Results[0]);
RoomCDS.FieldByName('room_name').AsString := DB.Results[0];
RoomCDS.Post
end;
any Ideas?
The error I get is missing 'Data provider or data packet'
on my form I have:
TclientDataSet
TDatasource (which has the dataset set to the above)
Then I try to put some data in from a sqlite database.
Var
i : integer;
begin
DB := TLiteDB.Create(Self, 'hotelx.sdb3');
DB.Query('Select * from rooms');
For i := 0 to DB.RowCount -1 do
begin
RoomCDS.Open;
RoomCDS.Append;
RoomCDS.FieldByName('room_id').AsInteger := StrToInt(DB.Results[0]);
RoomCDS.FieldByName('room_name').AsString := DB.Results[0];
RoomCDS.Post
end;
any Ideas?