Export (0) Print
Expand All
Expand Minimize

2.4.80 DbQuery

Office

The DbQuery record specifies information about an external connection. This record is followed by SXString and ParamQry records that specify the strings and parameters. The records MUST be in the following order:

  • If and only if fSql equals 1, zero or more SXString records as specified by cstQuery.

  • If and only if fOdbcConn equals 1, zero or more SXString records as specified by cstOdbcConn.

  • If and only if fWeb equals 1, zero or more SXString records as specified by cstQuery.

  • If and only if fWeb equals 1, zero or more SXString records as specified by cstWebPost.

  • Zero or more SXString and ParamQry pairs as specified by cparams.

  • If and only if fSqlSav equals 1, zero or more SXString records as specified by cstSQLSav.


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

dbt

A

B

C

D

E

F

unused

cparams

cstQuery

cstWebPost

cstSQLSav

cstOdbcConn

dbt (3 bits): An unsigned integer that specifies the data source (1) type. MUST be a value from the following table:

Value

Meaning

0x1

ODBC data source

0x2

DAO record set

0x4

Web query

0x5

OLE DB database

0x6

Text query

0x7

ADO query

A - fOdbcConn (1 bit): A bit that specifies whether the data source (1) type is ODBC. MUST be 1 if dbt is equal to 0x1.

B - fSql (1 bit): A bit that specifies whether there is a database command string. MUST be 0 if fWeb is 1. If the value of dbt is 5 see the grbitDbt field of the DBQueryExt record for details on what the database command string specifies. Otherwise the database command string specifies an Structured Query Language (SQL)query string. The database command string is contained by zero or more SXString records following this record, as specified by cstQuery.

C - fSqlSav (1 bit): A bit that specifies whether there is a SQL query string for server-based fields. For more information about server-based fields see the source data section. If and only if fSqlSav equals 1, the SQL query string for server-based fields is contained by zero or more SXString records following this record, as specified by cstSQLSav.

D - fWeb (1 bit): A bit that specifies whether there is a Uniform Resource Locator (URL) for a Web query. MUST be 1 if dbt is equal to 0x4. The URL is the command string contained in zero or more SXString records following this record, as specified by cstQuery.

E - fSavePwd (1 bit): A bit that specifies whether the password is saved with the ODBC connection string specified by SXString records following this record. MUST be a value from the following table:

Value

Meaning

0

Password is removed from the ODBC connection string.

1

Password is not removed from the ODBC connection string.

MUST be ignored if dbt is not equal to 0x1.

F - fTablesOnlyHTML (1 bit): A bit that specifies whether Web queries only works on HTML tables.

unused (7 bits): Undefined and MUST be ignored.

cparams (2 bytes): A signed integer that specifies the number of SQL parameters. Each parameter consists of an SXString record followed by a ParamQry record. The SXString record specifies the name of the parameter and the ParamQry record specifies the query parameters. MUST be greater than or equal to zero.

cstQuery (2 bytes): A signed integer that specifies the number of SXString records that contain the command string, see fWeb and fSql for more details. Each SXString record specifies up to 255 characters of the complete command string. MUST be greater than or equal to zero.

cstWebPost (2 bytes): A signed integer that specifies the number of SXString records that contain the Web query statement. Each SXString record specifies up to 255 characters of the complete query statement. MUST be greater than or equal to zero. MUST be 0 if fWeb is equal to 0.

cstSQLSav (2 bytes): A signed integer that specifies the number of SXString records that contain the SQL statement for server-based fields. For more information about server-based fields see the source data section. Each SXString record specifies up to 255 characters of the complete SQL statement. MUST be greater than or equal to zero. MUST be 0 if fSqlSav is equal to 0.

cstOdbcConn (2 bytes): A signed integer that specifies the number of SXString records that contain the ODBC connection string. Each SXString record specifies up to 255 characters of the complete connection string. MUST be greater than or equal to zero. MUST be 0 if fOdbcConn is equal to 0.

Show:
© 2014 Microsoft