TsgcWSPClient_DatasetMethods › StartTransaction

StartTransaction Method

Begins a new transaction; subsequent messages are queued until Commit or RollBack.

Syntax

procedure StartTransaction(const aChannel: string = '');

Parameters

NameTypeDescription
aChannelconst stringOptional channel scope of the transaction. Leave empty to start a default transaction.

Remarks

Opens a transaction on the server for this client. Messages sent afterwards are held in a queue and are only dispatched to subscribers when Commit is called, or discarded when RollBack is called.

Example

oProtocol.StartTransaction;
oProtocol.Publish('msg1', 'news');
oProtocol.Publish('msg2', 'news');
oProtocol.Commit;

Back to Methods