共用方式為


ConfigurationSetting 方法 - SetUnattendedExecutionAccount

指定用來自動執行報表的帳戶。

語法

Public Sub SetUnattendedExecutionAccount(UserName as String, _  
    Password as String, ByRef HRESULT as Int32)  
public void SetUnattendedExecutionAccount (string UserName,   
    string Password, out Int32 HRESULT);  

參數

使用者名稱
要用於自動執行的 Windows 帳戶。

密碼
指定之帳戶的密碼。

HRESULT
[out] 指出呼叫成功或失敗的值。

傳回值

傳回 HRESULT ,指出方法呼叫成功或失敗。 值為 0 表示方法呼叫成功。 非零值表示發生錯誤。

備註

SetUnattendedExecutionAccount 方法不會驗證報表伺服器是否能夠登入成為指定的使用者。

在報表伺服器 Windows 服務的內容中,您無法使用 SetUnattendedExecutionAccount 方法來執行自動執行作業。

需求

Namespace: root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

另請參閱

MSReportServer_ConfigurationSetting 成員