[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Cannot dump current sequence values from runtime license

Status
Not open for further replies.
H

Håvard Danielsen

Guest
The Data Admin API supports read and update of sequence current-value. The example below shows both read and update of the current value. The ISequence also allows read and update of the other sequence properties. Note that the code below does not work for Multi-tenant databases. This is supported through the ISequence:SequenceValues property that returns a map of tenant names and values. ------------------------------ block-level on error undo, throw. using OpenEdge.DataAdmin.IDataAdminService from propath. using OpenEdge.DataAdmin.DataAdminService from propath. using OpenEdge.DataAdmin.ISequence from propath. define variable Service as IDataAdminService no-undo. define variable oSequence as ISequence no-undo. define variable iSeq as int64 no-undo. Service = new DataAdminService("mydatabase"). oSequence = Service:GetSequence("mysequence"). iSeq = oSequence:CurrentValue. oSequence:CurrentValue = iSeq + 1. Service:UpdateSequence(osequence).

Continue reading...
 
Status
Not open for further replies.
Top