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

SQL Anywhere 12.0.0 (Français) » UltraLite - C and C++ Programming » Application development » Developing applications using the UltraLite C++ API


Authenticating users

UltraLite databases can define up to four user IDs. UltraLite databases are created with a default user ID and password of DBA and sql, respectively. All connections to an UltraLite database must supply a user ID and password. Password changes and user ID additions and deletions can be performed once a connection is established.

You cannot directly change a user ID. You can add a user ID and delete an existing user ID.


You can use SQL statements to authenticate users as an alternative to using the UltraLite C API. See CREATE USER statement.

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

  2. Grant the user connection authority with the desired password using the conn->GrantConnectTo method.

    This procedure is the same whether you are adding a new user or changing the password of an existing user. See GrantConnectTo method.

 ♦  To delete an existing user
  1. Connect to the database as an existing user.

  2. Revoke the user's connection authority using the conn->RevokeConnectFrom method.

    See RevokeConnectFrom method.