Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - AppForge Programming » Understanding UltraLite Development with AppForge

Handling errors Next Page

Authenticating users


An UltraLite database may define up to four user IDs and associated passwords. UltraLite databases are created with an initial user ID of DBA with password sql; you must first connect as this initial user. While connected to the database, an application may grant connection authority to a new user ID, change the password for an existing user ID or revoke connection authority from an existing user ID.

Note that a user ID cannot be changed directly; however, you can add a new user ID and then delete the existing user ID.

UltraLite does not associate any specific rights with a user ID. All user IDs that are defined for the database can be used to connect to that UltraLite database. Code within an application can enforce different capabilities based on the user information supplied to the application.

For more information about granting or revoking connection authority, see GrantConnectTo method and RevokeConnectFrom method.

To add a user or change the password for an existing user
  1. Connect to the database as an existing user.

  2. Grant connection authority to a specific user with the desired password:

    conn.GrantConnectTo("Robert", "newPassword")
  3. To delete an existing user
    1. Connect to the database as an existing user.

    2. Revoke a specified user's connection authority as follows:

      conn.RevokeConnectFrom("Robert")