Try OpenEdge Now
skip to main content
Programming Interfaces
Database Administration Entity Interface Reference : ISequenceValue interface : ISequenceValue examples : Changing the current value of a sequence for a specific tenant
 
Changing the current value of a sequence for a specific tenant
The following shows how to change the current value of a sequence for a specific tenant:
define variable sequence as ISequence no-undo.
define variable sequence as ITenant no-undo.

assign
  sequence = service:GetSequence("OrderSeq")
  tenant = service:GetTenant("ACME")
  sequence:SequenceValues:Get(tenant):CurrentValue = 2001.

service:UpdateSequence(sequence).