UltraLite User's Guide
Designing UltraLite Applications
Global autoincrement default column values
When deploying an application, you must assign a different identification number to each database. You can accomplish the task of creating and distributing the identification numbers by a variety of means. One method is to place the values in a table and download the correct row to each database based on some other unique property, such as user name.
The method of setting this identification number varies according to the programming interface you are using.
To set the global database identifier (embedded SQL)
Call the ULSetDatabaseID function. This function takes an argument that indicates the identification number.
int n = 123; ULSetDatabaseID( &sqlca, n );
For more information, see ULSetDatabaseID function.
To set the global database identifier (C++ API)
Call the ULConnection::SetDatabaseID method. This method takes a single integer argument that indicates the identification number.
int n = 123; conn.SetDatabaseID( n );
For more information, see SetDatabaseID method.
To set the global database identifier (Java)
Call the JdbcConnection.setDatabaseID method. This method takes a single argument, which is the integer global identification value.
int n = 123; conn.setDatabaseID( n);
For more information, see setDatabaseID method.