ReportingService2005.CreateResource 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
新增一個資源到回報伺服器資料庫。
public:
void CreateResource(System::String ^ Resource, System::String ^ Parent, bool Overwrite, cli::array <System::Byte> ^ Contents, System::String ^ MimeType, cli::array <ReportService2005::Property ^> ^ Properties);
public void CreateResource(string Resource, string Parent, bool Overwrite, byte[] Contents, string MimeType, ReportService2005.Property[] Properties);
member this.CreateResource : string * string * bool * byte[] * string * ReportService2005.Property[] -> unit
Public Sub CreateResource (Resource As String, Parent As String, Overwrite As Boolean, Contents As Byte(), MimeType As String, Properties As Property())
參數
- Resource
- String
新資源的名稱。
- Parent
- String
要加入新資源的父資料夾的完全限定網址。
- Overwrite
- Boolean
一個 Boolean 表達式,指定是否覆寫一個名稱與路徑相同的現有資源。 預設值為 false。
- Contents
- Byte[]
資源檔案的內容。
- MimeType
- String
多功能網際網路郵件擴充功能(MIME)類型的資源。 最大字元長度為 260 字元。
備註
下表顯示此操作的標頭與權限資訊。
| SOAP 標頭 | (在) BatchHeaderValue (出局) ServerInfoHeaderValue |
| 必要權限 | 建立新資源: CreateResource on Parent更新現有資源: UpdateContent 關於 Resource更新資源屬性: UpdateContent AND UpdateProperties on Resource |
參數長度 Parent 不得超過 260 個字元;否則會拋出帶有錯誤碼 rsItemLengthExceed 的 SOAP 例外。
Parent參數不能為空或空,或包含以下保留字元: : ? ; @ & = + $ , \ * > < | . "。 你可以用斜線字元(/)來分隔資料夾完整路徑名稱中的項目,但不能用在資料夾名稱的末尾。
若發生錯誤,該資源不會被建立。
將資源加入報告伺服器資料庫會 ModifiedBy 修改父資料夾的 and ModifiedDate 屬性。