Databases Reference
In-Depth Information
TABLE 32.3 Attributes of the Error Element
<Error> Attribute
Description
An unsigned integer number that identifies the error
ErrorCode
An explanation of the error
Description
The name of the component that generated an error
Source
The path or URL to the help file that describes the error
HelpFile
The following example shows a response that the client application will receive if it sends
a request with a typo in the method name:
<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>
<soap:Body>
<soap:Fault xmlns=”http://schemas.xmlsoap.org/soap/envelope/”>
<faultcode>XMLAnalysisError.0xc10f0007</faultcode>
<faultstring>The BadXMLAMethod element at line 3, column 66 (namespace
urn:schemas-microsoft-com:xml-analysis) cannot appear under Envelope/Body.
</faultstring>
<detail>
<Error ErrorCode=”3238985735” Description=”The BadXMLAMethod element at line
3, column 66 (namespace urn:schemas-microsoft-com:xml-analysis) cannot appear under
Envelope/Body.” Source=”Microsoft SQL Server 2008 Analysis Services” HelpFile=”” />
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
MDX Errors
When an error occurs in the execution of an MDX statement, you can take advantage of a
more powerful mechanism for error handling than you get with SOAP. Analysis Services
provides information about syntax errors that occur during the parsing of an MDX state-
ment. For example, such information could be the location of the error in the command;
it would be contained in the child element Location within the Error element.
In this example, we send an MDX request to the server in which we reference a hierarchy
that does not exist in the cube. Analysis Services generates an Error element that contains
information about the error and its location:
<Statement>SELECT x.members ON COLUMNS FROM [Warehouse And Sales]</Statement>
<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>
<soap:Body>
<soap:Fault xmlns=”http://schemas.xmlsoap.org/soap/envelope/”>
<faultcode>XMLAnalysisError.0xc10a0006</faultcode>
<faultstring>Query (1, 9) The dimension '[x]' was not found in the cube when
the string, [x], was parsed.</faultstring>
 
Search WWH ::




Custom Search