ExpressionStore.Export
Use this method to export the expressions stored in the expression store to a file.
Definition
Sub Export(bstrFileName As String)
Parameters
bstrFileName
[in] A String that contains the name of the file used to store the expressions.
Return Values
None.
Error Values
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 | &H8110001F | Invalid connection |
E_EXPR_NOCONNECTIONSTRING | &H8110000D | No connection string specified |
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.
Example
' oExpressionStore is an ExpressionStore object connected to
' a valid expression store.
oExpressionStore.Export "Expressions.xml"