Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
将连接字符串中指示的用户口令更改为所提供的新口令。
Public Shared Sub ChangePassword( ByVal connectionString As String, ByVal newPassword As String )
public static void ChangePassword( string connectionString, string newPassword )
connectionString 一个连接字符串,其中包含连接到指定数据库所需的足够信息。连接字符串可以包含用户 ID 和当前口令。
newPassword 要设置的新口令。
ArgumentNullException connectionString 或 newPassword 参数为空。
ArgumentException 连接字符串包括使用集成安全性的选项。
ULException 类 尝试打开数据库时发生 SQL 错误。