You can use the CREATE USER, ALTER USER, and DROP USER statements to manage users in an UltraLite database.
As an alternative to SQL statements, you can use the following UltraLite API methods in your application to grant or revoke user access to an UltraLite database:
Grant and revoke methods are not available in the UltraLiteJ API. For Android devices, construct a CREATE USER, ALTER USER, or DROP USER statement as a string variable and pass it to the Connection.prepareStatement method.
The following example illustrates how to use the UltraLiteJ API connect to an existing UltraLite database, and use the CREATE USER statement to create a new user:
ConfigFile config = DatabaseManager.createConfigurationFileAndroid("DBname.udb", getApplicationContext()); Connection conn = DatabaseManager.connect(config); String sql_string = "CREATE USER test-user IDENTIFIED BY test-password"; PreparedStatement authenticator = conn.prepareStatement(sql_string); authenticator.execute(); authenticator.close();