ODAC

TCustomOraQuery Class

A base class defining functionality for descendent classes which access database using SQL statements.

For a list of all members of this type, see TCustomOraQuery members.

Unit

Ora

Syntax

TCustomOraQuery = class(TOraDataSet);

Remarks

TCustomOraQuery is a base class that defines functionality for descendent classes which access database using SQL statements. Applications never use TCustomOraQuery objects directly. Instead they use descendants of TCustomOraQuery, such as TOraQuery, TSmartQuery, TOraStoredProc and TOraTable.

TCustomOraQuery implements functionality for an insertion, deletion, and update of a record by dynamically generated SQL statements. It offers such features as automatic blocking of records, checking records before edit, refreshing records after post.

To modify records of TCustomOraQuery SELECT statement in the SQL property should retrieve ROWID of updating table. When the KeyFields property is modified, TCustomOraQuery is updated too. TCustomOraQuery can update only one Oracle table. Updating table is defined by the UpdatingTable property or used by the first table in the FROM clause.

SQLInsert, SQLDelete, SQLUpdate, SQLLock, SQLRefresh properties support automatic binding of parameters which have names identical to the fields captions. To retrieve the value of a field as it was before operation, use the field name with 'OLD_'. This is particularly useful when doing field comparisons in the WHERE clause of a statement. Use the TCustomDADataSet.BeforeUpdateExecute event to assign the value to additional parameters and the TCustomDADataSet.AfterUpdateExecute event for reading them.

TCustomOraQuery is read-only when none of the SQLInsert, SQLDelete, SQLUpdate properties are defined.

Inheritance Hierarchy

TMemDataSet
   TCustomDADataSet
      TOraDataSet
         TCustomOraQuery

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback