The IDAUseGenerators interface returns the next value of a specified generator as integer value.

This interface is supported by all drivers that work with Oracle, InterBase/Firebird or PostgreSQL.

Note: We recommend to use IDAUseGenerators2 for returning int64 values as modern versions of these databases use int64 for sequences.

Recommended usage:

// aConnection: IDAConnection;
// ug: IDAUseGenerators;
// ug2: IDAUseGenerators2;
if Supports(aConnection, IDAUseGenerators2, ug2) then     autoincvalue := ug2.GetNextAutoinc2(aGeneratorName)
else if Supports(aConnection, IDAUseGenerators, ug) then  autoincvalue := ug.GetNextAutoinc(aGeneratorName)


Required Methods

GetNextAutoinc  safecall

Returns the next AutoInc value of a specified generator as integer value.

function GetNextAutoinc(const GeneratorName: string): Integer


  • GeneratorName: Specified generator name.