/// <summary> /// Change the password (or assign a password) to an open database. /// </summary> /// <remarks> /// No readers or writers may be active for this process. The database must already be open /// and if it already was password protected, the existing password must already have been supplied. /// </remarks> /// <param name="newPassword">The new password to assign to the database</param> public void ChangePassword(string newPassword) { if (_connectionState != ConnectionState.Open) { throw new InvalidOperationException("Database must be opened before changing the password."); } _sql.ChangePassword(newPassword); }