Share via


_BusinessDataAdmin2::GetSiteTerms Method

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

HRESULT _BusinessDataAdmin2::GetSiteTerms(
  BSTR sEncode
  IXMLDOMDocument** unnamed parameter 
);
Function GetSiteTerms(
  Optional sEncode As String
) As DOMDocument

Parameters

  • sEncode
    [C++]

    [in, optional] A BSTR that contains the document encoding.

    [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 Value

[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

0x800A00BF

&H800A00BF

191

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

ERR_PROFILEPATH_INVALID

0x800A007C

&H800A007C

124

Invalid profile-path '%0'.

ERR_CATALOG_NOTFOUND

0x800A0074

&H800A0074

116

Cannot find catalog '%0'.

ERR_PROFILE_NOTFOUND

0x800A0075

&H800A0075

117

Cannot find profile '%0'.

ERR_SOURCE_NOTFOUND

0x800A0071

&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 thesEncode parameter.

Example

set MyDoc = myBusinessDataAdmin2.GetSiteTerms()

See Also

Other Resources

BusinessDataAdmin2 Object