Using ClientDataSets

Is there a sample project available where ClientDataSets are used with uiSecurityManager?

I don't seem to be able to get this working...

I've set up the 6 CDS tables and assigned them to uilSecurityManager bindaries.

Each is set up as typical "SCN->SDS->DSP->CDS->DS".

If the various ID fields (eg Users.UserID) are set as int IDENTITY and PK, I need to add all fields to the SDS, then set the required flag (on the ID field) to false.

With that setup, I can double click on the SecurityManager in IDE and add a user.

Unfortunately the data isn't persisted.

That is, if I close the dialog and immediately re-open it (again, in the IDE) nothing has been saved.

Any suggestions?

Does using dbExpress mean the SecurityManager is run-time only (in order to update identity fields in CDS events)?

Here's my DDL for users table for reference. Maybe I'm missing the blindingly obvious again.

CREATE TABLE [dtr_sec_Users] (
  [LoginName] VARCHAR(50) NULL,
  [FullName] VARCHAR(50) NULL,
  [Password] VARCHAR(50) NULL,
  [LastAccess] DATETIME NULL,
  [Enabled] BIT NULL,
  [CreatedDate] DATETIME NULL,
  [LastAccTime] DATETIME NULL,
  [CreatedTime] DATETIME NULL,
  [AccessCount] INTEGER NULL,
  CONSTRAINT [dtr_sec_users_pk] PRIMARY KEY ([UserID])


I gave up on CDS: I dropped all the appropriate FireDAC components in the datamodule instead.

SecurityManager now works from IDE.

I'm thinking using CDS doesn't work because managing IDENTITY fields has to be done at run-time (meaning adding code to events to handle managing fake ID values until they are updated on the server.).

I could be wrong about that, but, given the amount of time I've spent on this already - FireDAC to the rescue.


I have not used a TClientDataSet so far for the purpose of persisting data in the DFM at design-time and use it then at runtime. Typically the clientdataset can loaded or saved in XML format but I don't see a clientdataset capability to save it from the design-time editor, only to load it via its context menu.