2.4.5.2.7 CT_DataRecordset

Referenced by: CT_DataRecordsets

The CT_DataRecordset complex type specifies a recordset.

Child Elements:

PrimaryKeys : An optional CT_PrimaryKeys element. If the RowOrder attribute does not exist or equals 0, this element MUST exist. If the RowOrder attribute exists and is equal to 1, this element MUST NOT exist.

DataColumns : A CT_DataColumns element.

Attributes:

ID : An xsd:unsignedLong ([XMLSCHEMA2] section 3.3.21) attribute that specifies the identifier of this recordset. It MUST be unique amongst all the DataRecordset child elements of the containing CT_DataRecordsets.

ConnectionID : An xsd:unsignedLong ([XMLSCHEMA2] section 3.3.21) attribute that specifies the identifier of a CT_DataConnection in the document.

Command :  An xsd:string ([XMLSCHEMA2] section 3.2.1) attribute that specifies the query string that returns this recordset from a data source. It MUST NOT be empty and MUST use syntax from following table:

Type of data source

Syntax

OLE DB

A valid SQL query string as specified in [MS-ODBCSTR]

ODBC

A valid SQL query string as specified in [MS-ODBCSTR]

List

A valid SQL query string as specified in [MS-ODBCSTR]. MUST NOT contain a WHERE clause.

Workbook

The query string MUST be "SheetName=sheet name;RangeName=range name;", where sheet name is the name of a sheet, and range name is the name of a range, given in A1 reference style.

Custom

MUST be same as the ConnectionString attribute of the CT_DataConnection that this recordset uses.

Pages :  An xsd:string ([XMLSCHEMA2] section 3.2.1) attribute that specifies a comma-separated list of indices of the drawing pages that contain shapes bound to data in this recordset. The index of each drawing page in this list MUST match the ID attribute of one of the PageMetaData child elements of the CT_PagesMetaData in the ShapeInfo XML Part.

RowOrder :  An optional xsd:integer ([XMLSCHEMA2] section 3.3.13) attribute that specifies whether this recordset uses the row number as the primary key to bind rows of data in this recordset to shapes in a drawing page. It MUST be 1 or 0. A value of 1 specifies that the row number is used. If the optional PrimaryKeys element exists, this attribute MUST NOT exist or MUST be equal to 0. If the PrimaryKeys element does not exist, this attribute MUST exist and MUST be equal to 1.

 <xsd:complexType name="CT_DataRecordset">
   <xsd:sequence>
     <xsd:element name="PrimaryKeys" minOccurs="0" maxOccurs="1" type="CT_PrimaryKeys"/>
     <xsd:element name="DataColumns" minOccurs="1" maxOccurs="1" type="CT_DataColumns"/>
   </xsd:sequence>
   <xsd:attribute name="ID" type="xsd:unsignedLong" use="required"/>
   <xsd:attribute name="ConnectionID" type="xsd:unsignedLong" use="required"/>
   <xsd:attribute name="Command" type="xsd:string" use="required"/>
   <xsd:attribute name="Pages" type="xsd:string" use="required"/>
   <xsd:attribute name="RowOrder" type="xsd:integer" use="optional"/>
 </xsd:complexType>