TMS FNC Web Push DB — Guides
Connecting to a dataset
Assign a TDataSource to the DataSource property. The component reads and writes subscription data through the linked dataset, so any persistent dataset type (file-based, client-server, in-memory) works without further configuration.
Mapping subscription fields
The Fields property (TTMSFNCWebPushDBFields) maps the Web Push subscription fields to dataset column names. Set at minimum the endpoint, auth, and P256DH field names to match the columns in your dataset.
Managing subscriptions
| Method | Action |
|---|---|
AddSubscription |
Inserts a new subscription into the dataset. |
UpdateSubscription |
Updates an existing subscription record. |
DeleteSubscription |
Removes a subscription by reference. |
TryFindSubscriptionByID |
Looks up a subscription by its endpoint identifier. |
Subscription lifecycle events
Subscribe to OnBeforeAddSubscription, OnBeforeDeleteSubscription, and OnBeforeUpdateSubscription to validate or cancel operations before they reach the dataset. Use OnSubscriptionAdded, OnSubscriptionDeleted, and OnSubscriptionUpdated to react after a change has been committed.
Delete mode
The DeleteMode property controls whether deleting a subscription removes the dataset record outright or marks it inactive. This is useful when you want to retain subscription history.