This record stores information about the SQL query string that retrieves external data for a PivotTable. The record is followed by SXSTRING records that contain the SQL strings and then by a SXSTRING record that contains the SQL server connection string.
Note
PARAMQRY has the same record number as SXEXT. This has no adverse ramifications in a BIFF file because PARAMQRY always occurs in conjunction with an SXEXT record.
Record Data — BIFF8
Offset |
Name |
Size |
Contents |
4 |
grbit |
2 |
Options flags; see following table |
6 |
cparams |
2 |
Number of parameter strings |
8 |
cstQuery |
2 |
Number of strings for SQL statement or URL |
10 |
cstWebPost |
2 |
Number of strings for post method of Web query |
12 |
cstSQLSav |
2 |
Number of strings for SQL statement for server-based page fields |
14 |
cstOdbcConn |
2 |
Number of strings for ODBC connection string |
The grbit field contains the following flags.
Bits |
Mask |
Name |
Contents |
2 – 0 |
0007h |
dbt |
= 1 ODBC data source |
3 |
0008h |
fOdbcConn |
= 1 for ODBC connection |
4 |
0010h |
fSql |
= 1 for ODBC connection |
5 |
0020h |
fSqlSav |
= 1 for server-based page fields |
6 |
0040h |
fWeb |
= 1 for a Web (WWW) query |
7 |
0080h |
fSavePwd |
= 1 if the Save Password option is on |
8 |
0100h |
fTablesOnlyHTML |
= 1 if the Save Tables in HTML Only option is on |
15 – 9 |
FE00h |
Reserved |
Reserved. Should be set to zero. |
The following records occur after a SXEXT record:
Record name |
Contents |
SXSTRING |
Collection of cstQuery SXTSRING records that should be concatenated to give the URL (Web query), SQL string (ODBC query) or parameterized SQL string (for server-based page field) |
SXSTRING |
Collection of cstOdbcConn SXTSRING records that should be concatenated to give the ODBC connection string (ODBC queries only) |
SXSTRING |
Collection of cstWebPost SXTSRING records that should be concatenated to give the post method data (Web query only, optional) |
PARAMQRY |
Collection of cparams PARAMQRY parameter definition records |
SXSTRING |
Collection of cstSQLSav SXTSRING records that should be concatenated to give the original SQL string for an ODBC query with server-based page fields |
Record Data — BIFF7 and earlier
Offset |
Name |
Size |
Contents |
4 |
id |
2 |
Connection ID of the SQL server |
6 |
fError |
2 |
= 1 if an error occurred during the last attempt to communicate with the server |
8 |
cstSQL |
2 |
Number of SXSTRING records that follow |