Export (0) Print
Expand All
Expand Minimize

2.4.81 DBQueryExt

Office

The DBQueryExt record specifies information about an external connection. This record specifies the beginning of a collection of records as specified by the Worksheet SubstreamABNF. The collection specifies more information about the external connection. See the QsiSXTag record for details about how the query table or PivotCache for the external connection is determined. The records of the collection MUST be in the following order:

  • The first record MUST be an ExtString record that specifies the comma-delimited list of table names to import, if and only if fTableNames is equal to 1.

  • The next record MUST be a TxtQry record, if and only if fTxtWiz is equal to 1.

  • The next record or records MUST be zero or more OleDbConn records as specified by coledb.


0

1

2

3

4

5

6

7

8

9
1
0

1

2

3

4

5

6

7

8

9
2
0

1

2

3

4

5

6

7

8

9
3
0

1

frtHeaderOld

dbt

A

B

C

D

E

F

G

reserved1

grbitDbt (variable)

...

H

I

J

reserved3

bVerDbqueryEdit

bVerDbqueryRefreshed

bVerDbqueryRefreshableMin

reserved4

reserved5

coledb

cstFuture

wRefreshInterval

wHtmlFmt

cwParamFlags

rgPbt (variable)

...

rgbFutureBytes (variable)

...

frtHeaderOld (4 bytes): An FrtHeaderOld structure. The frtHeaderOld.rt field MUST be 0x0803.

dbt (2 bytes): A DataSourceType enumeration that specifies the database source.

A - fMaintain (1 bit): A bit that specifies whether the connection with the database remains open once established.

B - fNewQuery (1 bit): A bit that specifies whether the connection was not refreshed. MUST be a value from the following table:

Value

Meaning

0

Connection was refreshed one or more times

1

Connection was not refreshed

C - fImportXmlSource (1 bit): A bit that specifies whether the underlying XML source or the Web page table is imported. MUST be ignored if dbt is not equal to 0x0004. MUST be a value from the following table:

Value

Meaning

0

Web page table is imported

1

XML source is imported

D - fSPListSrc (1 bit): A bit that specifies if the external connection is using the Web based data provider.

E - fSPListReinitCache (1 bit): A bit that specifies whether the Web based data is reinitialized rather than refreshed. MUST be ignored if fSPListSrc is equal to 0. MUST be a value from the following table:

Value

Meaning

0

Web based data is refreshed.

1

Web based data is reinitialized by reconnecting to the Web based data provider.

F - unused (2 bits): Undefined and MUST be ignored.

G - fSrcIsXml (1 bit): A bit that specifies whether the external connection source is XML.

reserved1 (8 bits): MUST be zero, and MUST be ignored.

grbitDbt (variable): A ConnGrbitDbt structure that specifies external connection properties specific to dbt.

H - fTxtWiz (1 bit): A bit that specifies whether this is a text query. If the value is equal to 1, this record MUST be followed by a TxtQry record.

I - fTableNames (1 bit): A bit that specifies whether the tables to import are specified in the ExtString record that follows this record.

J - reserved2 (1 bit): MUST be zero, and MUST be ignored.

reserved3 (13 bits): MUST be zero, and MUST be ignored.

bVerDbqueryEdit (1 byte): A DataFunctionalityLevel value that specifies the data functionality level the external connection was last edited with.

bVerDbqueryRefreshed (1 byte): A DataFunctionalityLevel value that specifies the data functionality level the external connection was last refreshed with. MUST be ignored if fNewQuery is equal to 1.

bVerDbqueryRefreshableMin (1 byte): A DataFunctionalityLevel value that specifies the minimum data functionality level that the application is required to support refreshing the external connection. MUST be ignored if fNewQuery is equal to 1.

reserved4 (1 byte): MUST be zero, and MUST be ignored.

reserved5 (2 bytes): MUST be zero, and MUST be ignored.

coledb (2 bytes): An unsigned integer that specifies the count of OleDbConn records that follow this record. MUST be zero if dbt is not equal to DBT_OLEDB.

cstFuture (2 bytes): An unsigned integer that specifies the count of bytes in rgbFutureBytes.

wRefreshInterval (2 bytes): An unsigned integer that specifies the number of minutes to wait between automatic refreshes of the external connection. The value MUST be greater than or equal to 0. A value of 0 specifies that the timed refresh is off.

wHtmlFmt (2 bytes): An unsigned integer that specifies the HTML formatting to apply to the imported data for a Web query. MUST be ignored if dbt is not equal to 0x0004. MUST be a value from the following table:

Value

Meaning

0x0001

No formatting is applied

0x0002

Rich text formatting only

0x0003

Full HTML formatting, including cell formatting

cwParamFlags (2 bytes): An unsigned integer that specifies the count of PBT items in rgPbt.

rgPbt (variable): An array of PBT items, each of which specifies information about the query parameters. The PBT items in the array specify information about same query parameters as the collection of ParamQry records of the external connection. The nth PBT item in this array corresponds to the nth ParamQry record within the collection.

rgbFutureBytes (variable): Information from future versions. The byte count MUST be equal to cstFuture.

Show:
© 2014 Microsoft