IExpressionStore::Export Method [C++]

Use this method to export the expressions stored in the expression store to a file.

Definition

[C++]

HRESULT IExpressionStore::Export(BSTRbstrFileName);

[Visual Basic]

Sub Export(bstrFileName As String)

Parameters

  • bstrFileName[C++]
    [in] A BSTR that contains the name of the file used to store the expressions.
  • bstrFileName[Visual Basic]
    [in] A String that contains the name of the file used to store the expressions.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] None.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_EXPR_BADCONNECTION

[C++] 0x8110001F

[Visual Basic] &H8110001F

Invalid connection
E_EXPR_NOCONNECTIONSTRING

[C++] 0x8110000D

[Visual Basic] &H8110000D

No connection string specified

[C++] Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The file being exported to should not exist prior to the call or the method will fail. If an absolute path is not specified, the file is placed in the \WINNT\system32 folder.

After the method successfully completes, the file contains the XML schema for the expression recordset followed by the XML representation of each expression recordset in the expression store.

Use the Import method to copy the expressions in a file to the expression store.

Call the Connect method before calling the Export method.

[Visual Basic]

Example

' oExpressionStore is an ExpressionStore object connected to
' a valid expression store.

oExpressionStore.Export "Expressions.xml"

See Also

[C++]Expression Recordset

[C++]Expression XML Structures

[C++]ExpressionStore Object

[C++]IExpressionStore::Import

[Visual Basic]Expression Recordset

[Visual Basic]Expression XML Structures

[Visual Basic]ExpressionStore Object

[Visual Basic]ExpressionStore.Import

Copyright © 2005 Microsoft Corporation.
All rights reserved.