Databases Reference
In-Depth Information
The type of the result depends on the
Command
parameter and the content of the
Format
property passed by the client to the
Execute
method. If no
Format
property is specified,
the result is the same as if
Format
were defined as native.
Table 32.1 shows the type of result based on the
Command
parameter and the value of the
property
Format
.
TABLE 32.1
Resultset by Format and Command
Format Property
Native
Multidimensional
Tabular
MDX
Select
MDDataset
MDDataset
Rowset
DMX
Select
Rowset
Rowset
SQL
Select
Rowset
Rowset
DDL command
Empty result
Empty result
Empty result
The
Execute
method supports the following parameters.
Command
The
Command
parameter contains an XML document that contains information about the
command to be executed on the server. Commonly used commands fall into two cate-
gories:
.
Data Manipulation Language (DML) commands request information that is stored or
calculated on the server. MDX, Data Mining Extensions (DMX), and SQL requests are
examples of such commands.
.
Data Definition Language (DDL) commands create and manipulate objects on the
server.
<Create>
,
<Alter>
, and
<Delete>
are examples of this type of command. DDL
commands were designed especially for Microsoft Analysis Services. They are not sup-
ported by other XML/A providers; nor are they defined by the XML/A 1.1 specification.
A command sent to the server must be a valid XML element. All requests to the server
written in MDX, DMX, or SQL must be wrapped in a
<Statement>
element.
Properties
The
Properties
parameter of the
Execute
method is similar to the
Properties
parameter
of the
Discover
method. It contains a collection of properties that enable you to control
various aspects of execution. (See the “The
Discover
Method” section earlier in this
chapter for a discussion of the
Properties
parameter.)
The following example is a request that the client sends to the server to execute a simple
MDX statement that returns the values of all the measures in the cube:
SELECT measures.members ON COLUMNS FROM [Warehouse and Sales]
To generate the
Execute
method, we need to form a SOAP envelope:
<Envelope xmlns=”http://schemas.xmlsoap.org/soap/envelope/”>
Search WWH ::
Custom Search