SiteConfig.ImportResource Method (PIA)

Use this method to read the specified resource, resource properties, and attributes from the specified file, and write them to the Commerce Server 2002 database.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Configuration
…
Public Sub ImportResource(bstrFileName As String)

[C#]

using Microsoft.CommerceServer.Interop.Configuration;
…
public void ImportResource(stringbstrFileName);

Parameters

[Visual Basic .NET]

  • bstrFileName
    A String that contains the file name.

[C#]

  • bstrFileName
    A string that contains the file name.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

The Initialize method must be called before this method can be used.

This method is the complement of the ExportResource method. It consumes the file that ExportResource creates.

[Visual Basic .NET]

Example

' sMyFileName is a string 
sMyFileName = "C:\ExportedFile.txt"
' oSiteConfig is a Commerce SiteConfig object
oSiteConfig.ImportResource(sMyFileName)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Configuration

Platforms: Windows 2000, Windows Server 2003

Assembly: cs_mscscfg (in cs_mscscfg.dll)

See Also

SiteConfig Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.