UltraLite User's Guide
Designing UltraLite Applications
Global autoincrement default column values
Default values are chosen from the partition identified by the global database identification number until the maximum value is reached. When this state has been reached or is imminent, you must assign the database a new identification number.
The programming interfaces provide means of obtaining the proportion of numbers that have been used. The return value is a short in the range 0-100 that represents the percent of values used thus far. For example, a value of 99 indicates that very few unused values remain and the database should be assigned a new identification number.
To find out the percent of values used (embedded SQL)
Retrieve the proportion of used default values by calling the ULGlobalAutincUsage function. This procedure takes no arguments. It returns the maximum percent of used default values as a short in the range 0-100.
short p; p = ULGlobalAutincUsage( );
For more information, see ULGlobalAutoincUsage function.
To find out the percent of values used (C++ API)
Retrieve the proportion of used default values by calling the ULConnection::GlobalAutincUsage method. This method takes no arguments. It returns the maximum percent of used default values as a short in the range 0-100.
short p; p = conn.GlobalAutincUsage( );
For more information, see GlobalAutoincUsage method.
To find out the percent of values used (Java)
Retrieve the proportion of used default values by calling the JdbcConnection.globalAutincUsage method. This method takes no arguments. It returns the maximum percent of used default values as a short in the range 0-100.
For more information, see globalAutoincUsage method.