GenerateKey: Integer;
The GenerateKey method generates a unique key within current repository.
System sequence, created on the DBMS server, is used to generate keys.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
i: Integer;
Begin
MB := MetabaseClass.Active;
i := MB.GenerateKey;
End Sub UserProc;
After executing the example the "i" variable stores the generated unique key.
See also: