Important: The information in this document is obsolete and should not be used for new development.
Creating a Query Document
A query document is a file of type'qery'
that contains a'qrsc'
resource and one or more'wstr'
resources, and may contain a'qdef'
resource plus other resources. Query documents make it possible for you to write applications that can communicate with data servers without requiring familiarity with the command language used by the data server. Because a query document is most useful if it can be used by many different applications, no query document should depend on the presence of a particular application in order to function.An application can call the
DBGetNewQuery
function to convert a'qrsc'
resource into a query record in memory. A query record specifies connection information and also contains a handle to an array of queries; each query can be either a complete query or a template for a query. If the'wstr'
resource is a template, it contains the commands and data necessary to create a query, without any information that the user must add just before the query is sent. The'qdef'
resource contains a query definition function, which can modify the query record and, if necessary, fill in the query template to create a complete query. TheDBStartQuery
function sends the query pointed to by a query record to a data server. The following sections describe the contents of a query document, describe query records, and define the'qrsc'
,'wstr'
, and'qdef'
resources.
Subtopics
- User Interface Guidelines for Query Documents
- Contents of a Query Document
- Query Records and Query Resources
- Writing a Query Definition Function