Delphi: using TClientDataset as an in-memory dataset

前端 未结 11 2242
无人及你
无人及你 2020-12-14 08:00

According to this page, it\'s possible to use TClientDataset as an in-memory dataset, completely independent of any actual databases or files. It describes how

11条回答
  •  再見小時候
    2020-12-14 08:44

    My preference is to actually manage the dataset as XML. You can use the designer tools to create the basic structure and then save it to disk. This allows it to be managed outside of the executable, compiled in as a resource, or separately managed in version control.

    When doing it in this manner you can use LoadFromFile/Stream and the Save variants. Remember to make proper use of LogChanges and MergeChangeLog depending on your usage.

提交回复
热议问题