You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Finish editing and post the modified record to the database
143
143
DataModule1.mdLayouts.Post;
144
144
end;
145
145
```
146
146
147
-
### Step 6: Persist the Database State Between Application Sessions
147
+
### Step 6: Store the Database State Between Application Sessions
148
148
149
-
This step is specific to the memory-based [TdxMemData] datasource.
149
+
This step is applicable only to the memory-based [TdxMemData] datasource.
150
150
151
-
To persist the database state when user closes the application
152
-
and restore the state when user restarts the application,
153
-
handle the `Create` and `Destroy` events of the data module:
151
+
To store the database state when user closes the application
152
+
and restore the state on app restart,
153
+
handle `OnCreate` and `OnDestroy` events of the data module:
154
154
155
155
```pas
156
156
const
@@ -172,9 +172,9 @@ end;
172
172
173
173
## Files to Review
174
174
175
-
-[uData.pas] (Delphi) and [uData.cpp] (C++Builder) read and store layout data in a database represented by an in-memory storage component.
175
+
-[uData.pas] (Delphi) and [uData.cpp] (C++Builder) store/restore layout data to/from a memory-based dataset component ([TdxMemData]).
176
176
-[uMainForm.pas] (Delphi) and [uMainForm.cpp] (C++Builder) supply layout data from the data module to [TdxReport] and display Report Designer and Viewer.
177
-
-[data.dat]persists the memory-based dataset between application sessions.
177
+
-[data.dat]stores the memory-based dataset state between application sessions.
178
178
-[nwind.db] contains the Northwind sample database used as a data source for report content.
0 commit comments