ArcObjects Library Reference (GeoDatabaseDistributed)  

IGdbXmlImport.ImportWorkspace Method

Imports a workspace from XML.

[Visual Basic .NET]
Public Sub ImportWorkspace ( _
    ByVal inFile As String, _
    ByVal EnumNameMapping As IEnumNameMapping, _
    ByVal pWorkspace As IWorkspace, _
    ByVal schemaOnly As Boolean _
)
[C#]
public void ImportWorkspace (
    string inFile,
    IEnumNameMapping EnumNameMapping,
    IWorkspace pWorkspace,
    bool schemaOnly
);
[C++]
HRESULT ImportWorkspace(
  BSTR inFile,
  IEnumNameMapping* EnumNameMapping,
  IWorkspace* pWorkspace,
  VARIANT_BOOL schemaOnly
);
[C++]

Parameters

inFile [in]   inFile is a parameter of type BSTR EnumNameMapping [in]

  EnumNameMapping is a parameter of type IEnumNameMapping

pWorkspace [in]

  pWorkspace is a parameter of type IWorkspace

schemaOnly [in]   schemaOnly is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The ImportWorkspace method imports a geodatabase workspace schema and data.

In order to import a workspace, you need to pass in IEnumNameMapping and IWorkspace.  The inFile is a string that identifies the input XML filename.  The filename must have a "xml" file extension, for example, "c:\temp\file.xml".  Otherwise, the inFile is a .ZIP or .Z file extension.

If you set schemaOnly to TRUE, the imported workspace will contain the schema and no data.  Otherwise, the workspace being imported will contain schema and data.

See Also

IGdbXmlImport Interface