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

SQL Anywhere 11.0.1 (中文) » UltraLite - M-Business Anywhere 编程 » 了解 UltraLite for M-Business Anywhere 开发

 

验证用户

必须从现有连接添加新用户。由于所有 UltraLite 数据库都是用缺省用户 ID 和口令(分别为 DBAsql)创建的,因此必须首先以此初始用户的身份进行连接。

不能更改用户 ID:添加一个用户并删除现有用户。每个 UltraLite 数据库最多允许使用四个用户 ID。

有关授予或撤消连接权限的详细信息,请参见grantConnectTo 方法revokeConnectFrom 方法

♦  添加用户或更改现有用户的口令
  1. 以现有用户身份连接到数据库。

  2. 授予用户具有所需口令的连接权限。

    conn.grantConnectTo("Robert", "newPassword");
♦  删除现有用户
  1. 以现有用户身份连接到数据库。

  2. 像下面这样撤消用户的连接权限。

    conn.revokeConnectFrom("Robert");