_BusinessDataAdmin2::GetSiteTerms Method [C++]

Use this method to create an XML document containing the site terms.

Definition

[C++]

HRESULT _BusinessDataAdmin2::GetSiteTerms(BSTRsEncodeIXMLDOMDocument**unnamed parameter);

[Visual Basic]

Function GetSiteTerms(Optional sEncode As String) As DOMDocument

Parameters

  • sEncode [C++]
    [in, optional] A BSTR that contains the document encoding.
  • sEncode[Visual Basic]
    A String that contains the document encoding.
  • unnamed parameter[C++]
    [out, retval] A pointer used to return a DOMDocument object that will contain the site terms.

Return Values

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

[Visual Basic] If this method completes successfully, it returns a DOMDocument object that contains the site terms.

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
ERR_NOCONNECTION

[C++] 0x800A00BF

[Visual Basic] &H800A00BF

191

No connection is open to the database. The Connect() method should be called first.
ERR_PROFILEPATH_INVALID

[C++] 0x800A007C

[Visual Basic] &H800A007C

124

Invalid profile-path '%0'.
ERR_CATALOG_NOTFOUND

[C++] 0x800A0074

[Visual Basic] &H800A0074

116

Cannot find catalog '%0'.
ERR_PROFILE_NOTFOUND

[C++] 0x800A0075

[Visual Basic] &H800A0075

117

Cannot find profile '%0'.
ERR_SOURCE_NOTFOUND

[C++] 0x800A0071

[Visual Basic] &H800A0071

113

Cannot find data-source '%0' in catalog '%1'.

[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

[C++] The unnamed parameter contains valid data only if the method completed successfully.

[Visual Basic] The DOMDocument object returned by this property is valid only if the method completed successfully.

The sEncode parameter is used to specify the encoding within the document. It inserts the following tag in the document. <xml encoding = "<sEncode>"> It does not change how the site terms are encoded or perform any validation that the encoding in the document matches the sEncode parameter.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

[Visual Basic]

Example

'
set MyDoc = myBusinessDataAdmin2.GetSiteTerms()

See Also

[C++]BusinessDataAdmin2 Object

[Visual Basic]BusinessDataAdmin2 Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.