共用方式為


SetResourceContents 方法

Sets the contents of a resource.

命名空間:  ReportService2006
組件:  ReportService2006 (在 ReportService2006.dll 中)

語法

'宣告
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetResourceContents", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Sub SetResourceContents ( _
    Resource As String, _
    Contents As Byte(), _
    MimeType As String _
)
'用途
Dim instance As ReportingService2006
Dim Resource As String
Dim Contents As Byte()
Dim MimeType As String

instance.SetResourceContents(Resource, _
    Contents, MimeType)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetResourceContents", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public void SetResourceContents(
    string Resource,
    byte[] Contents,
    string MimeType
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetResourceContents", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
void SetResourceContents(
    String^ Resource, 
    array<unsigned char>^ Contents, 
    String^ MimeType
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices/SetResourceContents", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member SetResourceContents : 
        Resource:string * 
        Contents:byte[] * 
        MimeType:string -> unit 
public function SetResourceContents(
    Resource : String, 
    Contents : byte[], 
    MimeType : String
)

參數

  • Resource
    型別:System. . :: . .String
    The fully qualified URL of the resource including the file name and extension.
  • Contents
    型別:array<System. . :: . .Byte> [] () [] []
    The contents of a resource in the form of a byte array.

備註

A SOAP exception is thrown with the error code rsMissingParameter if the value of the Contents parameter is set to null Nothing nullptr unit null 參考 (在 Visual Basic 中為 Nothing) (Nothing in Visual Basic).