EntityDataset update when underlying table changes
Posted: Tue 30 Mar 2021 09:34
Hi,
I'm not entirely sure whether this is a dataset issue, or a database issue or a model issue.
I have an EntityConnection, EntityXMLModel, Datasource, EntityDataset and a grid on a form.
The dataset is linked to a database table (via the EntityConnection/XML Model). The datasource is connected to the entitydataset. The dbgrid is linked to the datasource.
Right now, when I run the application, the dbgrid populates with the information as gleamed off the database table. But when some more items are added to the database table, the dbgrid doesn't know anything about these changes.
My question is, how do I get the dbgrid to update automatically? At this moment, I'm just thinking of using dbgrid.datasource.dataset.refresh() with a timer; but this seems a little (for lack of a better word), silly. Is there a better way?
Thanks
Ed
I'm not entirely sure whether this is a dataset issue, or a database issue or a model issue.
I have an EntityConnection, EntityXMLModel, Datasource, EntityDataset and a grid on a form.
The dataset is linked to a database table (via the EntityConnection/XML Model). The datasource is connected to the entitydataset. The dbgrid is linked to the datasource.
Right now, when I run the application, the dbgrid populates with the information as gleamed off the database table. But when some more items are added to the database table, the dbgrid doesn't know anything about these changes.
My question is, how do I get the dbgrid to update automatically? At this moment, I'm just thinking of using dbgrid.datasource.dataset.refresh() with a timer; but this seems a little (for lack of a better word), silly. Is there a better way?
Thanks
Ed