Hi wp. Here are the answers to your questions:
(First let me state that my platform is Windows Server Essentials 2016, Lazarus 1.8, FPC 3.0.4)
>> You don't specify any filename. So, how do you expect the dataset to be saved?
The dataset is not intended to be saved. I'm trying to use TBufDataset like I used TClientDataset in Delphi. It's just a temporary in-memory table, never intended to be saved.
>> You call CreateDataset. This erases any data loaded from file even if there is a filename.
I have to call CreateDataset when my program starts. I put this in my form's (or DataModule's) .OnCreate event. There is no data at that point, so calling .CreateDataset doesn't erase anything. It just prepares the TBufDataset to be populated.
>> Note that you must "open" the dataset when CreateDatasset is not called.
Understood. Explained above.
>> Just for testing: Add a DBGrid to better see whether records are added.
A single record is definitely being added. It's values appear in the Data aware controls of my form. The trouble is, when I change the values in the fields of the form using the data aware controls, then .Post, the values I entered are discarded, and the original values remain.
The example project I attached to my Original Post demonstrates the problem.