TApolloQuery

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloQuery >

TApolloQuery

 

image\TAPOLLOQUERY.gif

 

image\tip.gif In previous releases, ApolloQuery required that developers explicitly specified the tables used in the query statement. This is no longer the case. The Apollo SQL engine automatically parses the tables referenced by in the SQL statement.

Read more here: Automatic table referencing in SQL with TApolloQuery

 

The TApolloQuery component is similar to Delphi's TQuery and allows your applications to communicate with remote data through an Apollo Database Sever or local data through the Apollo SQL add-in, and quickly pull back result sets using a subset of SQL-92. TApolloQuery also supports the use of SQL for updating and creating tables and indexes. The TApolloQuery component communicates to the remote Apollo Database Server and/or Apollo SQL add-in by connecting to a TApolloConnection component.

 

Apollo Database Server and the Apollo SQL add-on engine are sold separately. Visit the Vista Software web site for product information.

 

Properties

Description

AccessMethod

Indicates if the query is to be executed locally (amLocal) or through the server (amServer).

Active

Executes or closes a SQL SELECT statement.

ApolloConnection

Identifies the TApolloConnection component to attach this TApolloQuery to. The TApolloConnection is then connected to the Apollo Server.

CommitLevel

Determines how Apollo will manage buffers.

clFull or 0 = Always write data to disk. Flushes both Apollo and Windows buffers. Slowest mode, but most secure.

clNormal or 1 = Always flush Apollo buffers but let Windows decide when to write data to disk. Normal mode of operation and recommended.

clNone or 2 = Do not flush any buffers, letting Apollo and Windows manage the writing of data to disk. Fastest mode but should be used in single user mode only. Note: C++B must use the number 2 instead of clNone.

DatabaseName

List of available database names on the remote server.

FetchCount

The number of records to fetch in each batch read from the server.

Params

Contains the parameters for a query’s SQL statement.

Password

The default password for all encrypted tables accessed via the SQL statement.

RecCount

The total number of records in the result set.

RecNo

The current record number within the result set.

OEMTranslate

Automatically translates all tables referenced by the SQL result set record buffers in the OEM character set to Windows ANSI.

SQL

The Structured Query Language (SQL) statement to be executed.

TableNames

The optional names, types, aliases, and passwords of tables to be used within the SQL statement.

TableType

The default table type for all tables accessed via the SQL statement.

Version

Internal version number of TApolloQuery.

 

 

Methods

Description

Close

Closes the active query.

ExecSQL

Executes a SQL statement that does not return a result set.

Locate

Searches the dataset for a specified record and makes that record the current record.

Open

Executes a SQL statement that does return a result set.

Prepare

Prepares a SQL statement for execution by ExecSQL.

Refresh

Refreshes the display of the dataset.

Unprepare

Frees resources allocated by a previous call to Prepare.

 

 

Events

Description

 

All standard TDataSet events are supported as usual with the exception of OnFilterRecord, which is not supported at this time. Please note that filtering should be implemented using the SELECT and WHERE clause of TApolloQuery.

See Also

TApolloConnection, TApolloTable, TApolloServerDLL, TApolloEnv, TApolloDatabase, Using Apollo VCL with Apollo SQL , Apollo SQL Notes