Overview

Oracle Data Access Components Send comments on this topic
Overview

Oracle Data Access Components (ODAC) is a library of components that provides native connectivity to Oracle from Delphi, Delphi for .NET, C++Builder, Free Pascal, and Kylix. The ODAC library is designed to help programmers develop faster and cleaner Oracle database applications. ODAC is a complete replacement for standard Oracle connectivity solutions and presents an efficient native alternative to the Borland Database Engine and dbExpress for access to Oracle.

The ODAC library is actively developed and supported by the Devart Team. If you have questions about ODAC, email the developers at odac@crlab.com or visit ODAC online at http://www.crlab.com/odac/.

Advantages of ODAC Technology

ODAC is a direct database connectivity wrapper built specifically for the Oracle server. ODAC offers wide coverage of the Oracle feature set, supports both Client and Direct connection modes, and emphasizes optimized data access strategies.

Wide Coverage of Oracle Features

By providing access to the most advanced database functionality, ODAC allows developers to harness the full capabilities of the Oracle and optimize their database applications. ODAC stands out as the set of components with the widest support of Oracle functionality. It is the only component to support Oracle distributed transactions and implements support for controlling statement caching, OCI pooling, and Oracle Advanced Queuing. Get a full list of supported Oracle features in the Features topic.

Native Connection Options

ODAC offers two connection modes to the Oracle server: connection through the Oracle Call Interface and direct connection over TCP/IP. ODAC-based database applications are easy to deploy, do not require installation of other data provider layers (such as BDE), and tend to be faster than those that use standard data connectivity solutions. See the How does ODAC Work section.

Optimized Code

The goal of ODAC is to enable developers to write efficient and flexible database applications. The ODAC library is implemented using optimized code and advanced data access algorithms. Component interfaces undergo comprehensive performance tests and are designed to help you write thin and efficient product data access layers. Find out more about using ODAC to optimize your database applications in Increasing Performance. To see the results of ODAC performance tests, consult the performance comparison section on the ODAC website.

Compatibility with Other Connectivity Methods

The ODAC interface retains compatibility with standard VCL data access components like BDE. Existing BDE-based applications can be easily migrated to ODAC and enhanced to take advantage of Oracle-specific features like alerts, pipes, and the direct-path interface. Project migration can be automated with the BDE Migration Wizard. Find out more about Migration Wizard in Using Migration Wizard.

Development and Support

ODAC is an Oracle connectivity solution that has been actively developed and supported since 1998. ODAC comes with full documentation, demo projects, and fast (usually within one business day) technical support by the ODAC development team. Find out more about getting help or submit feedback and suggestions to the ODAC development team in the Getting Support topic.

The description of the ODAC components is provided in the Component List.

Key Features

  • Direct access to server data. Does not require installation of other data provider layers (such as BDE and ODBC)
  • In Direct mode does not require Oracle client software and works directly through TCP/IP
  • VCL, VCL.NET, and CLX versions of library available
  • Full support of the latest versions of Oracle
  • Support for all Oracle data types
  • Disconnected Model with automatic connection control for working with data offline
  • Local Failover for detecting connection loss and implicitly re-executing certain operations
  • Oracle Transparent Application Failover support
  • All types of local sorting and filtering, including by calculated and lookup fields
  • Automatic data updating with TOraQuery, TSmartQuery, and TOraTable components
  • Unicode and national charsets support
  • Distributed transaction support
  • Oracle Advanced Queuing support
  • Support for many Oracle-specific features, such as alerts, pipes and direct path interface
  • Advanced script execution functionality with TOraScript component
  • Support for using Macros in SQL
  • Integration with OraDeveloper Tools for performing advanced database development and administration tasks
  • Easy migration from BDE with Migration Wizard
  • Lets you use Professional Edition of Delphi, C++Builder, and Kylix to develop client/server applications Included annual ODAC Subscription with Priority Support
  • Licensed royalty-free per developer, per team, or per site

The full list of ODAC features you can find in the Features topic.

Editions

Oracle Data Access Components comes in four basic edition levels: ODAC Standard Edition, ODAC Professional Edition, ODAC Developer Edition, and ODAC Trial Edition.

ODAC Standard Edition includes the ODAC basic connectivity components and the ODAC Migration Wizard. ODAC Standard Edition is a cost-effective solution for database application developers who need general connectivity functionality for Oracle.

ODAC Professional Edition shows off the full power of ODAC, enhancing ODAC Standard Edition with support for Oracle-specific functionality, access to Direct mode for connecting to the Oracle server directly over TCP/IP, and some advanced connection management features.

ODAC Developer Edition is a bundle package of ODAC Professional Edition with OraDeveloper Tools, an advanced add-in for Oracle database development and administration. ODAC Developer Edition is the best choice for overall.

ODAC Trial Edition is the evaluation version of ODAC. It includes all the functionality of ODAC Professional Edition with a trial limitation of 60 days. Kylix, C++Builder, and supported .NET IDEs have additional trial limitations.

You can get Source Access to the Client mode implementation of all the component classes in ODAC by purchasing the special ODAC Professional Edition with Source Code or ODAC Developer Edition with Source Code**.

For more information about getting the ODAC edition you want, visit the How to Order section.

ODAC Edition Matrix

Feature | Developer** | Professional** | Standard | Trial
Base Components (TOraSession, TOraQuery, TSmartQuery, TOraSQL, TOraTable, TOraStoredProc, TOraUpdateSQL, TOraNestedTable, TOraDataSource, TOraScript, TOraSQLMonitor, TConnectDialog, TVirtualTable, TCRDBGrid, OraDataAdapter) | + | + | + | +
Additional Components (TOraPackage, TOraAlerter, TOraLoader, TOraTransaction, TOraQueue, TOraQueueTable, TOraQueueAdmin, TOraChangeNotification, TOraTrace, TOraErrorHandler, TOraProvider, TBDESession, TOraMetaData, TCRBatchMove) | + | + |  | +
Direct connectivity with the Direct mode (connection without Oracle client) | + | + |  | +
Design-time features, including component editors and property editors | + | + | + | +
DataSet Manager*** | + | + |  | +
Migration Wizard*** | + | + | + | +
Smart Refresh in TSmartQuery component | + | + |  | +
OraDeveloper Tools**** | + |  |  | +
Trial limitations* |  |  |  | +

* Trial Edition is a fully working version of ODAC Professional Edition for a trial period of 60 days on most supported IDEs. After the trial period expires you must either register or uninstall ODAC. ODAC Trial Edition for Kylix has an additional nag screen trial limitation. ODAC Trial Edition requires the launched IDE on the target workstation when testing .NET applications and applications written on C++Builder. For more information about trial limitations see the Ordering topic.

** Developer and Professional editions with source code for all Component classes are available. Distributed component source code does not include Direct mode implementation. Migration Wizard, DataSet Manager, and code for other products, including OraDeveloper Tools and OraTools, are not distributed.

*** Not available for C++Builder, Delphi 8, FreePascal or Kylix.

**** OraDeveloper Tools is not compatible with all IDEs. A full list of supported environments can be found in Using OraDeveloper Tools

© 1997-2009 Devart. All Rights Reserved.


Getting Started

Getting Started

This page contains a quick introduction to setting up and using the Oracle Data Access Components library. It gives a walkthrough for each part of the ODAC usage process and points out the most relevant related topics in the documentation.

  • What is ODAC?
  • How does ODAC work?
  • Installing ODAC.
  • Working with the ODAC demo projects.
  • Compiling and deploying your ODAC project.
  • Using the ODAC documentation.
  • How to get help with ODAC.

What is ODAC?

Oracle Data Access Components (ODAC) is a component library which provides direct connectivity to Oracle for Delphi, Delphi for .NET, C++Builder, and Kylix, and helps you to develop fast Oracle-based database applications with these environments.

Many ODAC classes are based on VCL, VCL for .NET, and CLX classes and interfaces. ODAC is a replacement for the Borland Database Engine, it provides native database connectivity, and is specifically designed as an interface to the Oracle database.

The introduction to ODAC is provided in the Overview section.

The list of the ODAC features you may find useful is listed in the Features section.

The overview of the ODAC component classes is provided in the Components List section.

How does ODAC work?

ODAC allows you to connect to Oracle in two ways: in Client mode, using Oracle Client software, or in Direct mode, over TCP/IP. The chosen connection mode is regulated by the ODAC Direct mode.

In Client mode, ODAC connects to Oracle through the Oracle Call Interface (OCI). OCI is an application programming interface that allows an application developer to use a third-generation language's native procedure or function calls to access the Oracle database server and control all phases of SQL statement execution. OCI is a library of standard database access and retrieval functions in the form of a dynamic-link library.

In Direct mode, ODAC connects to Oracle directly without using Oracle client software. In this mode, ODAC requires only TCP/IP support, and lets you build really thin database application.

In comparison, the Borland Database Engine (BDE) uses several layers to access Oracle, and requires additional data access software to be installed on client machines.

The BDE data transfer protocol is shown below.

BDE Connection Protocol

Using ODAC in Client mode allows your application to connect to OCI directly.

ODAC Connection Flow [Client Mode]

Using ODAC in Direct mode provides the optimal transfer route.

ODAC Connection Flow [Direct Mode]

Installing ODAC

To install ODAC, complete the following steps.

  1. Choose and download the version of the ODAC installation program that is compatible with your IDE. For instance, if you are installing ODAC 6.00, you should use the following files:

    For BDS 2006 and Turbo - odac600d10*.exe

    For Delphi 7 - odac600d7*.exe

    For more information, visit the the ODAC download page.

  2. Close all running IDEs.
  3. Launch the ODAC installation program you've downloaded and follow the instructions.

By default, the ODAC installation program should install compiled ODAC libraries automatically on all IDEs except for Kylix. To view the installation instructions for Kylix cilck here.

To check if ODAC has been installed properly, launch your IDE and make sure that Oracle Access page has been added to the Component palette and that Oracle menu was added to the Menu bar.

If you have bought ODAC Professional Edition with Source Code or ODAC Developer Edition with Source Code, you will be able to download both the compiled version of ODAC and the ODAC source code. The installation process for the compiled version is standard.The ODAC source code must be compiled and installed manually. For more details, consult the supplied ReadmeSrc.txtfile.

To find out what gets installed with ODAC or to troubleshoot your ODAC installation, visit the Installation topic.

Working with the ODAC demo projects

The ODAC installation package includes a number of demo projects that demonstrate ODAC capabilities and use patterns. The ODAC demo projects are automatically installed in the ODAC installation folder.

To get started working with ODAC quickly, launch and explore the introductory ODAC demo project, OdacDemo, from your IDE. This demo project is a collection of demos that show how ODAC can be used. The project creates a form which contains an explorer panel for browsing the included demos and a view panel for launching and viewing the selected demo.

OdacDemo Walkthrough

  1. Launch your IDE.
  2. From the menu bar choose File | Open Project
  3. Find the ODAC directory and open the OdacDemo project. This project should be located in the Demos\OdacDemo folder.

    For example, if you are using Borland Developer Studio 2006, the demo project may be found at

    \Program Files\Devart\ODAC for Delphi 2006\Demos\Win32\OdacDemo\OdacDemo.bdsproj

  4. Select Run | Run or press F9 to compile and launch the demo project. OdacDemo should start, and a full-screen ODAC Demo window with a toolbar, an explorer panel, and a view panel will open. The explorer panel will contain a list of all the demo sub-projects included in OdacDemo, and the view panel will contain an overview of each included demo.

    At this point, you will be able to browse through the available demos, read their descriptions, view their source code, and see the functionality provided by each demo for interacting with Oracle. However, you will not be able to actually retrieve data from Oracle or execute commands until you connect to the database.

  5. Choose your method of connecting to the Oracle server. To connect in Client mode, leave the Direct checkbox in the toolbar unselected. To connect to Oracle in Direct mode over TCP/IP, select the Direct checkbox.
  6. Click on the "Connect" button in the OdacDemo toolbar. A Connect dialog box will open. Enter the connection parameters you use to connect to your Oracle server and click "Connect" in the dialog box.

    When connecting in Client mode, enter your Oracle username, password, and the name of your server

    (e.g., user/pwd/ora).

    When connecting in Direct mode, enter your Oracle username, password, and the full Host:Port:SID network path to your server.

    e.g., user/pwd/db:1521:orcl920)

    Note: For this step to work properly when connecting in Client mode, you must have the Oracle Client installed and properly configured tnsnames.ora file. To connect in Direct mode, you need to be using a version of ODAC with Direct connectivity support. For more information, see the ODAC Feature Matrix.

    Now you have a fully functional interface to your Oracle server. You will be able to go through the different demos, browse tables, create and drop objects, and execute PL/SQL commands.

    Warning! All changes you make to the database you are connected to, including creating and dropping objects used by the demo, will be permanent. Make sure to specify a test database in the connection step.

  7. To create any object that will be used by OdacDemo, click the "Create" button. If some of these objects already exist in the database you have connected to, the following error message will appear.

    "An error has occurred: ORA00955: name is already being used by an existing object. ... Ignore this exception?"

    This is a standard warning from the object execution script. Click "Yes to All" to ignore this message. OdacDemo will create the OdacDemo objects on the server you have connected to.

  8. Choose a demo that demonstrates an aspect of working with Oracle that you are interested in, and play with the demo frame in the view window on the right. For example, to find out more about working with Oracle tables, select the Table demo from the "Working with Components" folder. A simple Oracle table browser will open in the view panel that will let you open a table in your database by specifying its name and clicking on the "Open" button.
  9. To find out how the demo you've selected was implemented click on the "Demo source" button in the OdacDemo toolbar. The source code behind the demo project will appear in the view panel. Try to find the places where ODAC components are used to connect to the database.
  10. Click on the "Form as text" button in the OdacDemo toolbar to view the code behind the interface to the demo. Try to find the places where ODAC components are created on the demo form.
  11. Repeat these steps for other demos listed in the explorer window. Available demos are organized in three folders.

    Working with components

    A collection of projects that show how to work with the basic ODAC components.

    General demos

    A collection of projects that show off the ODAC technology and demonstrate some ways to work with data.

    Oracle-specific demos

    A collection of projects that demonstrate how to incorporate Oracle features in database applications.

  12. When you have finished working with the project, click on the "Drop" button in the OdacDemo toolbar to remove all the schema objects added in Step 7.

Other ODAC demo projects

ODAC is accompanied by a number of other demo projects. The description of all ODAC demos is located in the Demo Projects topic.

Compiling and deploying your ODAC project

Compiling ODAC-based projects

By default, to compile a project that uses ODAC classes, your IDE compiler needs to have access to the ODAC dcu (obj) files. If you are compiling runtime packages, the compiler will also need to have access to the ODAC bpl files. All appropriate settings for both these scenarios should take place automatically during the installation of ODAC. If you are using one of the ODAC editions that come with source code - ODAC Professional Edition with Source Code or ODAC Developer Edition with Source Code, you should just need to modify your environment manually.

You can check if your environment is properly configured by trying to compile one of the ODAC demo projects. If you have no problem compiling and launching the ODAC demos, your environment has been configured properly.

For more information on which library files and environment changes needed for compiling ODAC-based projects, consult the Installation topic.

Deploying ODAC-based projects

To deploy an application that uses ODAC, you will need to make sure the target workstation has access to the following files.

  • The Oracle Client software, if connecting in Client mode.
  • The ODAC bpl files, if compiling with runtime packages.
  • The ODAC assembly files, if using VCL for .NET components.

If you are evaluating deploying projects with ODAC Trial Edition, you will also need to deploy some additional .bpl files with your application even if you are compiling without runtime packages. As another trial limitation for C++Builder, applications written with ODAC Trial Edition for C++Builder will only work if the C++Builder IDE is launched. More information about ODAC Trial Edition limitations is provided here.

The list of the files which may need to be deployed with ODAC-based applications is included in the Deployment topic.

Using the ODAC documentation

The ODAC documentation describes how to install and configure ODAC, how to use ODAC Demo Projects, and how to use the ODAC libraries.

The ODAC documentation includes a detailed reference of all the ODAC components and classes. Many of the ODAC components and classes inherit or implement members from other VCL, VCL for .NET, CLX classes and interfaces. The product documentation also includes the summary of all members within each of these classes. To view a detailed description of a particular component, look it up in the Components List section. To find out more about the specific standard VCL/CLX class the ODAC component is inherited from, see the corresponding topic in your IDE documentation.

At installation time, the ODAC documentation is integrated into your IDE. It can be invoked from the Oracle menu added to the Menu Bar, or by pressing F1 in the object inspector or on a selected code segment.

How to get help with ODAC

There are a number of resources for finding help on using ODAC classes in your project.

  • If you have any questions about ODAC installation or licensing, consult Licensing and FAQ section.
  • You can get community assistance and ODAC technical support on the ODAC Support Forum.
  • To get help through the ODAC Priority Support program, send an email to the ODAC development team at odac@devart.com.
  • If you have any questions about ordering ODAC or any other Devart product, contact sales@devart.com.

For more information, consult the Getting Support topic.


Features

Features

General usability:

  • Direct access to server data. Does not require installation of other data provider layers (such as BDE and ODBC)
  • Interface compatible with standard data access methods, such as BDE and ADO
  • VCL, VCL for .NET, and CLX versions of library available
  • Separated run-time and GUI specific parts allow you to create pure console applications such as CGI
  • Unicode and national charset support

Network and connectivity:

  • In Direct mode does not require Oracle client software and works directly through TCP/IP
  • Disconnected Model with automatic connection control for working with data offline
  • Local Failover for detecting connection loss and implicitly reexecuting certain operations
  • Support for setting connection timeout values for Direct mode

Compatibility:

  • Full support of the latest versions of Oracle
  • Support for all Oracle data types
  • Compatible with all IDE versions starting with Delphi 5, C++Builder 5, Free Pascal, and Kylix 2 (except Delphi 8)
  • Includes provider for UniDAC Standard Edition
  • Wide reporting component support, including support for InfoPower, ReportBuilder, FastReport
  • Support of all standard and third-party visual data-aware controls
  • Allows you to use Professional Edition of Delphi and C++Builder to develop client/server applications.

Oracle technology support:

  • Oracle Advanced Queuing support
  • Distributed transactions support with TOraTransaction component
  • Oracle package support
  • Support for Oracle alerts and pipes with TOraAlerter component
  • Support for Direct Path interface with TOraLoader component
  • Support for DBMS_TRACE package and SQLTrace functionality with TOraTrace
  • Support for Oracle Change notifications functionality of Oracle 10g with TOraChangeNotification component
  • Oracle Transparent Application Failover support
  • Oracle 9i scrollable cursor support
  • Multiple Oracle Homes support
  • Oracle sequence support
  • DML array operations support
  • Direct lob access support
  • Temporary LOB management routines
  • Temporary LOBs for updating LOB fields
  • OCI Connection Pooling, Proxy Session Pooling, and Statement Caching
  • Oracle optimizer control
  • ProxySession support
  • External Procedure support
  • CLIENT_IDENTIFIER support

Oracle data types:

  • Oracle Object (including NOT FINAL objects) types support
  • Nested table support
  • PL/SQL table support
  • XMLTYPE datatype support
  • Oracle 9i TIMESTAMP and INTERVAL data types support

Performance:

  • High overall performance
  • Fast controlled fetch of large data blocks
  • Optimized string data storing
  • Advanced connection pooling
  • High performance applying of cached updates with batches
  • Caching of calculated and lookup fields
  • Expanded fields in TSmartQuery
  • Fast Locate in a sorted DataSet
  • Preparation of user-defined update statements

Local data storage operations:

  • Database-independent data storage with TVirtualTable component
  • CachedUpdates operation mode
  • Local sorting and filtering, with included calculated and lookup fields
  • Local master/detail relationship
  • Master/detail relationship in CachedUpdates mode

Data access and data management automation:

  • Automatic data updating with TOraQuery, TSmartQuery and TOraTable components
  • Automatic record refreshing and locking
  • Automatic query preparing
  • SmartRefresh option allows you to synchronize two or more datasets automatically
  • Support for ftWideMemo field type in Delphi 2006 and higher

Extended data access functionality:

  • Separate component for executing SQL and PL/SQL blocks
  • Simplified access to table data with TOraTable component
  • BLOB compression support
  • Support for using macros in SQL
  • NonBlocking mode allows background executing and fetching data in separate threads
  • Ability to customize update commands by attaching external components to TOraUpdateSQL objects
  • Deferred detail DataSet refresh in master/detail relationships
  • LargeInt fields support
  • MIDAS technology support
  • OraDataAdapter component for WinForms and ASP.NET applications
  • Ability to customize Oracle error messages with TOraErrorHandler

Data exchange:

  • Transferring data between all types of TDataSet descendants with TCRBatchMove component
  • Data export and import to/from XML (ADO format)
  • Ability to synchronize positions in different DataSets

Script execution:

  • Advanced script execution features with TOraScript component
  • Support for executing individual statements in scripts
  • Support for executing huge scripts stored in files with dynamic loading
  • Ability to use standard SQL*Plus tool syntax in scripts

SQL execution monitoring:

  • Extended SQL tracing capabilities provided by TOraSQLMonitor component and DBMonitor
  • Borland SQL Monitor support
  • Ability to send messages to DBMonitor from any point in your program

Visual extensions:

  • Includes source code of enhanced TCRDBGrid data-aware grid control
  • Customizable connection dialog
  • Cursor changes during non-blocking execution

Design-time enhancements:

  • DataSet Manager tool to control DataSet instances in the project
  • Oracle Package Wizard that simplifies working with PL/SQL Packages
  • Advanced design-time component and property editors
  • Integration with OraDeveloper Tools for browsing database schemas, manipulating database objects and visual building of queries
  • Automatic design-time component linking
  • OraTools Add-in extends design-time capabilities and lets you build and test queries, design and debug PL/SQL blocks and explore database schemas
  • Easy migration from BDE with Migration Wizard
  • More convenient data source setup with the TOraDataSource component
  • Syntax highlighting in design-time editors

Product clarity:

  • Complete documentation sets
  • Printable documentation in PDF format
  • A large amount of helpful demo projects

Licensing and support:

  • Included annual ODAC Subscription with Priority Support
  • Licensed royalty-free per developer, per team, or per site
© Devart. All Rights Reserved.


What's New

What's New

10-Sep-09 New Features in Oracle Data Access Components 6.90:

  • Embarcadero RAD Studio 2010 suppored

02-Apr-09 New Features in Oracle Data Access Components 6.80:

  • Free Pascal under Linux supported
  • Added NoPreconnect property to TOraScript for executing CONNECT and CREATE DATABASE commands

23-Oct-08 New Features in Oracle Data Access Components 6.70:

  • Delphi 2009 and C++Builder 2009 supported
  • Extended Unicode support for Delphi 2007 added (special Unicode build)
  • Free Pascal 2.2 supported
  • Powerful design-time editors implemented in Lazarus
  • Optimized LOB processing in Direct mode
  • Completed with more comprehensive structured Help

23-May-08 New Features in Oracle Data Access Components 6.50:

  • Improved support of default field values
  • The new component for metadata receiving added
  • Added support of TWideMemoField
  • The BCD types supported

14-Nov-07 New Features in Oracle Data Access Components 6.25:

  • Oracle 11g supported

27-Sep-07 New Features in Oracle Data Access Components 6.20:

  • CodeGear RAD Studio 2007 supported
  • Added ability to customize whether update SQL statements should be prepared
  • Added ability to set number of rows to be prefetched by OCI
  • Added the OnProgress event in TOraLoader

12-Jun-07 New Features in Oracle Data Access Components 6.10:

  • C++Builder 2007 supported

16-May-07 New Features in Oracle Data Access Components 6.05:

  • Added Oracle Package Wizard that simplifies working with PL/SQL Packages

22-Mar-07 New Features in Oracle Data Access Components 6.00:

New functionality:

  • Delphi 2007 for Win32 supported
  • Implemented Disconnected Model for working offline and automatically connecting and disconnecting
  • Implemented Local Failover for detecting connection loss and implicitly re-executing some operations
  • LargeInt fields supported
  • WideMemo field type in Delphi 2006 supported
  • Added DataSet Manager to control project datasets
  • Integration with OraDeveloper Tools 2.00 added
  • New TCRBatchMove component for transferring data between all types of TDataSet descendants added
  • Data export and import to/from XML supported
  • Support for sending messages to DBMonitor from any point in your program added

Support for more Oracle server functionality:

  • Distributed transactions supported
  • Advanced Queuing support added
  • Change notifications functionality of Oracle 10g supported
  • DBMS_TRACE package and SQLTrace functionality supported
  • OCI Connection Pooling, Statement Caching, and Proxy Session Pooling added
  • External Procedures support added

Extensions and improvements to existing functionality:

  • General performance improved
  • Master/detail functionality extensions:
    • Local master/detail relationship support added
    • Support for master/detail relationships in CachedUpdates mode added
  • Connection pool functionality improvements:
    • Efficiency significantly improved
    • API for draining the connection pool added
  • TOraScript component improvements:
    • Support for executing individual statements in scripts added
    • Support for executing huge scripts stored in files with dynamic loading added
    • Ability to use standard SQL*Plus tool syntax added
  • Greatly increased performance of applying updates in CachedUpdates mode
  • Working with calculated and lookup fields improvements:
    • Local sorting and filtering added
    • Record location speed increased
    • Improved working with lookup fields
  • Ability to customize update commands by attaching external components to TOraUpdateSQL objects added
  • Support for using BeforeFetch and AfterFetch events in NonBlocking mode added
  • Temporary LOBs for updating LOB fields supported
  • Support for setting connection timeout values for Direct mode added
  • Ability to include all fields in automatically generated update SQLs added
  • Support for default field value expressions added

Usability improvements:

  • Syntax highlighting in design-time editors added
  • Completely restructured and clearer demo projects

26-Jan-06 New Features in Oracle Data Access Components 5.70:

  • Delphi 2006 supported

31-May-05 New Features in Oracle Data Access Components 5.55:

  • Added ability to automatically prepare queries (TCustomDADataSet.Options.AutoPrepare)
  • Added ability to synchronize positions in different DataSets (TCustomDADataSet.GotoCurrent)

24-Jan-05 New Features in Oracle Data Access Components 5.50:

  • Delphi 2005 supported
  • Performance of Net-option improved
  • Added Schema property for TOraSession component
  • Added ProxySession property for TOraSession component

30-Jun-04 New Features in Oracle Data Access Components 5.10:

  • Local sort ability using IndexFieldNames property added
  • OraDataAdapter component for Delphi 8 added

09-Apr-04 New Features in Oracle Data Access Components 5.00:

  • Support for Delphi 8 added
  • Oracle 10g support added
  • Connection pooling supported
  • Character conversion supported in Oracle 9i in Direct mode
  • Unicode character data supported in Direct mode
  • Support TIMESTAMP, INTERVAL data types in Direct mode
  • Support for Oracle internal NUMBER datatype added in Direct mode
  • Performance improved
  • TCRGrid sources in Standard and Net editions
  • .NET Windows Forms demo project added
  • ASP.NET demo project added

08-Oct-03 New Features in Oracle Data Access Components 4.50:

  • XMLTYPE datatype support added
  • WideString support added to work with Unicode character data
  • Transparent Application Failover support added

05-Jun-03 New Features in Oracle Data Access Components 4.15:

  • Support for Oracle internal NUMBER datatype added. Allows to work with high precision numbers without accuracy losses

30-Jan-03 New Features in Oracle Data Access Components 4.10:

  • Support for Oracle 9i NOT FINAL objects added
  • TIMESTAMP and INTERVAL support for Oracle objects added

25-Dec-02 Oracle Data Access Components 4.05 new features:

  • Transaction control schema changed. Now TOraSession.InTransaction shows actual user transaction state on server (implicit commit and rollback are considered).
  • DBMonitor client implementation moved to COM server. Now ODAC is incompatible with DBMonitor 2.02 or lower.
  • LOB attributes support for object fields added
  • Temporary LOBs support added
  • Constants ftTimeStampTZ and ftTimeStampLTZ added. Used in TOraTimeStampField.
  • UROWID support for index organized tables added
  • Option ConvertEOL added

30-Sep-02 New Features in Oracle Data Access Components 4.00:

  • Delphi 7 support
  • Kylix 3 for C++ support
  • Oracle 9 scrollable cursors support
  • New memory management model for ftString and ftVarBytes types. Allows significantly decrease memory usage on large tables fetch. Controlled by FlatBuffers dataset option;
  • RAW datatype support (as ftVarBytes)
  • Support for complex fields (blobs, objects etc.) in CachedUpdates mode
  • New 'Prepare' schema. Now if user does not explicitly call Prepare method before opening dataset there is no additional roundtrip to server for select-list describe (OCIStmtExecute(DESCRIBE_ONLY) call). I.e. Open (Execute for SELECT) without Prepare is performed in a more optimal way.

30-Aug-02 New Features in Oracle Data Access Components 3.90:

  • Kylix 3 support

09-Aug-02 New Features in Oracle Data Access Components 3.85:

  • DBMonitor support
  • New version of OraTools support (v. 2.50)

18-Jul-02 New Features in Oracle Data Access Components 3.80:

  • Oracle9 timestamp and interval datatypes support
  • Performance optimization for queries with many fields, especially for TSmartQuery and TOraTable
  • Runtime packages division for Delphi6, C++Builder6, Kylix, Kylix2, see manual
  • Auto generation RETURNING clause for LOBs added to design-time component editor

21-Mar-02 New Features in Oracle Data Access Components 3.60:

  • supports C++Builder 6

14-Dec-01 New Features in Oracle Data Access Components 3.50:

  • supports Kylix 2
  • multibytes charsets support
  • direct lob access support
  • using OraTools Add-in

12-Oct-01 New Features in Oracle Data Access Components 3.30:

  • supports Oracle 9i
  • Net edition for Kylix

08-Aug-01 New Features in Oracle Data Access Components 3.20:

  • supports Delphi 6
  • new version of OraDesigner
  • OraExplorer
  • printed documentation
  • BDE Migration Wizard

20-Feb-01 New Features in Oracle Data Access Components 3.00:

  • using standard TParam object
  • separate run- and design-time packages
  • get original name of fields
  • retrieve field's default value
  • in Direct mode support
  • Kylix ready

11-Jul-00 New Features in Oracle Data Access Components 2.50:

  • supports multiple Oracle Homes
  • supports Borland SQL Monitor
  • TOraSQLMonitor component
  • default session
  • customizable connect dialog
  • ConnectDialog and Threads demos added

30-Mar-00 New Features in Oracle Data Access Components 2.20:

  • supports C++Builder 5
  • macros in update SQL

10-Jan-00 New Features in Oracle Data Access Components 2.10:

  • customized TSmartQuery data updating
  • supports DML array operations
  • macros in TOraSQL and TOraScript
  • TOraLoader component
  • supports Oracle 8 Lite
  • easy installation

14-Oct-99 New Features in Oracle Data Access Components 2.00:

  • supports Oracle8 Objects
  • supports Oracle8 REFs
  • supports Oracle8 Arrays
  • supports Oracle8 Nested tables
  • supports Oracle8 BFiles
  • using RETURNING with Oracle8
  • smart refreshing
  • TOraNestedTable component
  • TOraScript component
  • TOraAlerter component
  • TBFileField component
  • TOraFile class
  • TOraLob class
  • TOraType class
  • TOraObject class
  • TOraRef class
  • TOraArray class
  • TOraNestTable class
  • Alerter, Arrays, BFile, BLOBPics, DLL, DMLArray, FetchCursors, NestedTables, Objects, Refs demos added

26-May-99 New Features in Oracle Data Access Components 1.85:

  • TOraProvider component
  • TBDESession component
  • Supports Oracle 8i
  • C++Builder 4 package

12-Mar-99 New Features in Oracle Data Access Components 1.75:

  • TOraTable component
  • TStoredProc component

01-Mar-99 New Features in Oracle Data Access Components 1.70:

  • Supports BLOB and CLOB data types Oracle 8
  • Supports nested tables
  • TVirtualTable component
  • Embeded SQL Designer with PL/SQL debugger
  • C++Builder version

05-Feb-98 New Features in Oracle Data Access Components 1.50:

  • Supports native interface Oracle 8.0
  • Supports PL/SQL tables
  • TOraErrorHandler


Demo Projects

Demo Projects

ODAC includes a number of demo projects that show off the main ODAC functionality and development patterns.

The ODAC demo projects consist of one large project called OdacDemo with demos for all main ODAC components, use cases, and data access technologies, and a number of smaller projects on how to use ODAC in different IDEs and how to integrate ODAC with third-party components.

Most demo projects are built for Delphi, Borland Developer Studio, and Kylix. There are only two ODAC demos for C++Builder. However, the C++Builder distribution includes source code for all other demo projects as well.

Where are the ODAC demo projects located?

In most cases all the ODAC demo projects are located in "%Odac%\Demos\".

In Delphi 2007 for Win32 under Windows Vista all the ODAC demo projects are located in "My Documents\Devart\Odac for Delphi 2007\Demos", for example "C:\Documents and Settings\All Users\Documents\Devart\Odac for Delphi 2007\Demos\".

The structure of the demo project directory depends on the IDE version you are using.

For most new IDEs with .NET support, the structure will be as following.

Demos

|—dotNet

|  |—OdacDemo [.NET version of the main ODAC demo project]

|  |—Miscellaneous

|     |— [Some other .NET demo projects]

|

|-Win32

|—OdacDemo [Win32 version of the main ODAC demo project]

|—Performance [Demo project, that compares performance of ODAC with another components (BDE, ADO, dbExpress)]

|—ThirdParty

|  |— [A collection of demo projects on integration with third-party components]

|—Miscellaneous

   |— [Some other Win32 demo projects on design technologies]

In Delphi 5, 6, 7, C++Builder 5, 6, Kylix, , and FreePascal .NET is not supported, and the root directories is omitted. For these IDEs you will see the following structure.

Demos

|—OdacDemo [The main ODAC demo project]

|—Performance [Demo project, that compares performance of ODAC with another components (BDE, ADO, dbExpress)]

|—ThirdParty

|  |— [A collection of demo projects on integration with third-party components]

|—Miscellaneous

   |— [Some other demo projects on design technologies]

OdacDemo is the main demo project that shows off all the ODAC functionality. The other directories contain a number of supplementary demo projects that describe special use cases. The list of all samples in the ODAC demo project and the description for the supplementary projects is provided in the following section.

Note: This documentation describes ALL the ODAC demo projects. The actual demo projects you will have installed on your computer depends on your ODAC version, ODAC edition, and the IDE version you are using. The integration demos may require installation of third-party components to compile and work properly.

Instructions for using the ODAC demo projects

To explore an ODAC demo project,

  1. Launch your IDE.
  2. In your IDE, choose File|Open Project from the menu bar.
  3. Find the directory you have installed ODAC to and open the Demos folder.
  4. Browse through the demo project folders located here and open the project file of the demo you would like to use.
  5. Compile and launch the demo. If it exists, consult the ReadMe.txt file for more details.

The executed version of the demo will contain a sample application written with ODAC or a navigable list of samples and sample descriptions. To use each sample properly, you will need to connect to a working Oracle server.

The included sample applications are fully functional. To use the demos, you have to set up a connection to Oracle first. You can do that by clicking on the "Connect" button.

Many demos may also use some database objects. If so, they will have two object manipulation buttons, "Create" and "Drop". If your demo requires additional objects, click "Create" to create necessary database objects. When you are done with the demo, click "Drop" to remove all the objects used for the demo from your Oracle database.

Note: The ODAC demo directory includes two sample SQL scripts for creating and dropping all the test schema objects used in the ODAC demos. You can modify and execute this script manually, if you want. This will not change the behavior of the demos.

You can find a complete walkthrough for the main ODAC demo project in the Getting Started topic. Other ODAC demo projects include a ReadMe.txt file with individual building and launching instructions.

Demo project descriptions

OdacDemo

OdacDemois one large project which includes three collections of demos.

Working with components

A collection of samples that show how to work with the basic ODAC components.

General demos

A collection of samples that show off the ODAC technology and demonstrate some ways to work with data.

Oracle-specific demos

A collection of samples that demonstrate how to incorporate Oracle features in database applications.

OdacDemo can be opened from %Odac%\Demos\OdacDemo\odacdemo.dpr (.bdsproj). The following table describes all demos contained in this project.

Working with Components

Name | Description
Alerter | Uses the TOraAlerter component to send messages between sessions through DBMS_ALERT and DBMS_PIPE Oracle package functionality. Note: Requires execute privileges on DBMS_ALERT.
BDESession | Demonstrates how to integrate ODAC with an existing BDE connection using the TBDESession ODAC component.
ChangeNotification | Demonstrates how to subscribe, receive, and reflect DML or DDL changes on objects associated with queries. Note: Requires CHANGE NOTIFICATION privilege. This functionallity is available only for Oracle 10.2g or higher.
ConnectDialog | Demonstrates how to customize the ODAC connect dialog. Changes the standard ODAC connect dialog to two custom connect dialogs. The first customized sample dialog is inherited from the TForm class, and the second one is inherited from the default ODAC connect dialog class.
CRDBGrid | Demonstrates how to work with the TCRDBGrid component. Shows off main TCRDBGrid features, like filtering, searching, stretching, using compound headers, and more.
ErrorHandler | Demonstrates using the TOraErrorHandler for exception handling and translating error messages.
Loader | Uses the TOraLoader component to load data into a server table quickly. Demonstrates Direct and DML modes for loading data. In Direct mode, data is loaded through DirectPath API, which loads big volumes of data into a table faster than while using INSERT statement. In DML mode, data is processed with the DML array feature of Oracle. It also compares two TOraLoader data loading handlers: GetColumnData and PutData.
Query | Demonstrates working with TOraQuery, which is one of the most useful ODAC components. Includes many TOraQuery usage scenarios. Demonstrates how to execute queries in both standard and NonBlocking mode and how to edit data and export it to XML files. Note: This is a very good introductory demo. We recommend starting with it when first becoming familiar with ODAC.
Queue | Demonstrates how to use ODAC to work with Oracle Streams Advanced Queuing. Implements notification on new messages. Shows how to create and manage Oracle Queues. Demonstrates the TOraQueue, TOraQueueTable, and TOraQueueAdmin components. Note: Requires DBMS_AQ and DBMS_AQADM privileges.
Smart | Uses TSmartQuery to customize refreshing, sorting, and server-side record management in a data grid. Shows how to perform local filtering, demonstrates several different kinds of record locking and refreshing, and working with FetchAll mode.
Sql | Uses TOraSQL to execute SQL statements and PL/SQL blocks. Demonstrates how to work in standard and NonBlocking modes, how to work with parameters in SQL, and how to break long-duration query execution.
StoredProc | Uses TOraStoredProc to access an editable recordset represented by an Oracle cursor from an Oracle stored procedure in the client application.
Table | Demonstrates how to use TOraTable to work with data from a single table on the server without writing any SQL queries manually. Performs server-side data sorting and filtering and retrieves results for browsing and editing.
Trace | Uses TOraTrace to work with Oracle SQL and PL/SQL tracing.
Transaction | Demonstrates main approaches for setting up distributed transactions with the TOraTransaction component. Shows how to manage transactions, tune the transaction isolation level, and select the coordinator for a distributed transaction.
UpdateSQL | Demonstrates using the TOraUpdateSQL component to customize update commands. Lets you optionally use TOraSQL and TOraQuery objects for carrying out insert, delete, query, and update commands.
VirtualTable | Demonstrates working with the TVirtualTable component. This sample shows how to fill virtual dataset with data from other datasets, filter data by a given criteria, locate specified records, perform file operations, and change data and table structure.

General Demos

Name | Description
CachedUpdates | Demonstrates how to perform the most important tasks of working with data in CachedUpdates mode, including highlighting uncommitted changes, managing transactions, and committing changes in a batch.
FilterAndIndex | Demonstrates ODAC's local storage functionality. This sample shows how to perform local filtering, sorting and locating by multiple fields, including by calculated and lookup fields.
MasterDetail | Uses ODAC functionality to work with master/detail relationships. This sample shows how to use local master/detail functionality. Demonstrates different kinds of master/detail linking, including linking by SQL, simple fields, and calculated fields.
Pictures | Uses ODAC functionality to work with BLOB fields and graphics. The sample demonstrates how to retrieve binary data from Oracle database and display it on visual components. Sample also shows how to load and save pictures to files and to the database.
Threads | Demonstrates how ODAC can be used in multithreaded applications. This sample allows you to set up several threads and test ODAC's performance with multithreading.

Oracle-specific Demos

Name | Description
Arrays | Demonstrates working with Oracle arrays. This sample lets you view and control how arrays are represented in dataset fields by the SparseArrays and ObjectView properties.
BFile | Shows the basics of working with file binary data stored in file systems located outside Oracle databases. This sample uses the TBFileField field type of ODAC.
BlobPictures | Demonstrates working with Oracle BLOB data types. The sample shows how to get binary data from the table, how to change BLOB fields using UPDATE statements, and how to insert a new record by executing stored procedure with a BLOB parameter. Also it shows off some extended BLOB handling functionality like local caching control, compression type changing, and more.
Clob | Demonstrates working with Oracle CLOB data types. The sample shows how to get a character stream from a table, how to change CLOB fields using UPDATE statements, and how to save and load data to/from a file. It also demonstrates several different ways of performing CLOB insertion.
Cursor | Uses ODAC functionality to work with Oracle Cursors. Shows how to fetch data from a Cursor parameter by setting TOraDataSet.Cursor to the TOraParam.AsCursor.
DMLArray | Demonstrates how to multiply execute SQL statements with different parameters by using ODAC functionality for the Oracle DML array feature.
FetchCursors | Uses TOraQuery to retrieve several Oracle cursors at once, fetch data in a batch, and close the cursors.
Long | Demonstrates working with Oracle LONG data types. The sample shows how to get character string from a table, update LONG fields and insert a new record. Also shows how to perform file operations with LONG fields.
LongStrings | Demonstrates ODAC functionality for working with long string fields (fields that have more than 256 characters). Shows different ways of their displaying as memo fields and string fields.
MultiCursors | Shows how to use one TOraQuery object to retrieve and update data from several tables by using several REF CURSOR parameters.
MultiQueries | Shows how Oracle queries are handled in multithreaded applications. This sample project lets you compare opening multiple queries within a single session or different sessions by setting NonBlocking and FetchAll=False modes.
NestedTables | Demonstrates using the TOraNestedTable component to work with Oracle nested tables. This sample project fills a TOraNestedTable dataset instance with the result set of a query to a table with a nested table field. It shows how to work with the data contained in nested table fields. Note that the nested table accessing interface is similar to the interface for accessing cursor data in a dataset representation of a table with CURSOR fields.
Objects | Demonstrates working with Oracle object fields. This sample shows how to clone objects and access and modify object field properties.
Pipes | Uses TOraAlerter in Pipe mode to organize cross-session message exchanging.
PLSQLTable | Demonstrates using PL/SQL Table types as parameters. Working with PL/SQL Table types in PL/SQL lets you imitate array functionality provided by other programming languages.
Progressor | Uses TOraAlerter in Pipe mode to indicate the progress of long-duration Oracle processes.
ProxySession | Demonstrates connecting to Oracle with the Oracle Proxy session functionality. This type of connection allows to quickly establish connections without specifying a password. Note: Requires the CONNECT THROUGH privilege
Refs | Demonstrates using the REF Oracle data type in queries.
SmartRefresh | Uses the Smart Refresh features of TSmartQuery to notify your data changes to other subscribed users. This sample is based on the TOraAlerter component. Note: Smart Refresh is only available in ODAC Professional Edition and ODAC Developer Edition.
XMLType | Uses the TOraXMLField class to work with Oracle SYS.XMLTYPE type LOB or Schema-based data. This sample project shows how to perform all the basic operations with this data type.

Supplementary Demo Projects

ODAC also includes a number of additional demo projects that describe some special use cases, show how to use ODAC in different IDEs and give examples of integrating it with third-party components. These supplementary ODAC demo projects are sorted into subfolders in the %Odac%\Demos\ directory.

Location | Name | Description
dotNet/ |  | [folder appears only for IDEs with support for .NET]
Miscellaneous | AspNet | OraDataAdapter to create a simple ASP .NET application. This demo shows how to create an ASP.NET application that lets you connect to a database and execute queries. Application displays query results in DataGrid and sends user changes back to the database.
 | WinForms | Shows how to use ODAC to create WinForms application. This demo project creates simple WinForms application and fills data grid from OraDataAdapter data source.
OdacDemo | OdacDemo | [.NET version of the main ODAC demo project - see above]
Win32/ |  | [folder appears only for IDEs with support for .NET. For all other IDEs contents appear in root]
ThirdParty | FastReport | Demonstrates how ODAC can be used with FastReport components. This project consists of two parts. The first part consists of several packages that integrate ODAC components into the FastReport editor. The second part is a demo application that lets you design and preview reports with ODAC technology in the FastReport editor.
 | InfoPower | Uses InfoPower components to display recordsets retrieved with ODAC. This demo project displays an InfoPower grid component and fills it with the result of an ODAC query. Shows how to link ODAC data sources to InfoPower components.
 | IntraWeb | A collection of sample projects that show how to use ODAC components as data sources for IntraWeb applications. Contains IntraWeb samples for setting up a connection, querying a database and modifying data and working with CachedUpdates and MasterDetail relationships. Starting with Oracle 10.2g and higher lets you see the effect of setting TOraCachedUpdates.
 | QuickReport | Lets you launch and view a QuickReport application based on ODAC. This demo project lets you modify the application in design-time.
 | ReportBuilder | Uses ODAC data sources to create a ReportBuilder report that takes data from an Oracle database. Shows how to set up a ReportBuilder document in design-time and how to integrate ODAC components into the Report Builder editor to perform document design in run-time.
Miscellaneous | CBuilder | General demo project that shows how to create ODAC-based applications with C++Builder. Lets you execute SQL scripts and work with result sets in a grid. This is one of the two ODAC demos for C++Builder.
 | Dll | Demonstrates creating and loading DLLs for ODAC-based projects. This demo project consists of two parts - an OraDll project that creates a DLL of a form that sends a query to the server and displays its results, and an OraExe project that can be executed to display a form for loading and running this DLL. Allows you to build a dll for one ODAC-based project and load and test it from a separate application.
 | ExternalProc | Uses external procedures to save LOB data to file on an Oracle server and store the file name and file date in a database. This demo project uses the external procedure DLL file described in the Writing Oracle external procedures with ODAC topic.
 | FailOver | Demonstrates the recommended approach to working with unstable networks. This sample lets you perform transactions and updates in several different modes, simulate sudden session termination, and view what happens to your data state when connections to the server are unexpectedly lost. Shows off CachedUpdates, LocalMasterDetail, FetchAll, Pooling, and different Failover modes.
 | Geometry | Demonstrates using the SDO_GEOMETRY Oracle type with ODAC. This project reads SDO_GEOMETRY objects from the database and draws figures stored in these objects. The project allows you to edit figures and save them to the database.
 | Midas | Demonstrates using MIDAS technology with ODAC. This project consists of two parts: a MIDAS server that processes requests to the database and a thin MIDAS client that displays an interactive grid. This demo shows how to build thin clients that display interactive components and delegate all database interactions to the server application for processing.
 | Performance | Measures ODAC performance on several types of queries. This project lets you compare ODAC performance to BDE, ADO, and dbExpress. Tests the following functionality: Fetch, Master/Detail, Stored Procedure Call, Data Loading, Multi Executing, and Insert/Post.
 | VirtualTableCB | Demonstrates working with the TVirtualTable component. This sample shows how to fill virtual dataset with data from other datasets, filter data by a given criteria, locate specified records, perform file operations, and change data and table structure. This is one of the two demo projects for C++Builder.
OdacDemo | OdacDemo | [Win32 version of the main ODAC demo project - see above]


Component List

Component List

This topic presents a brief description of the components included in the Oracle Data Access Components library. Click on the name of each component for more information. These components are added to the Oracle Access page of the Component palette except for TCRBatchMove and TVirtualTable components. TCRBatchMove and TVirtualTable components are added to the Data Access page of the Component palette. Basic ODAC components are included in all ODAC editions. ODAC Professional and Developer Edition components are not included in ODAC Standard Edition.

Basic ODAC components

OraSession | TOraSession | Lets you set up and control connections to Oracle.
OraQuery | TOraQuery | Uses SQL statements to retrieve data from Oracle tables and pass it to one or more data-aware components through a TDataSource object. This component provides a mechanism for updating data in Oracle.
SmartQuery | TSmartQuery | A more efficient query component. This component is aware of all the fields that belong to a table being updated and performs on-demand full row retrieval with Expand Fields. A traffic-efficient alternative to TOraQuery for working with large tables with lots of fields. Includes Smart Refresh functionality in Professional and Developer Editions.
OraSQL | TOraSQL | Executes SQL statements, PL/SQL blocks, and stored procedures, which do not return rowsets.
OraTable | TOraTable | Lets you retrieve and update data in a single table without writing SQL statements.
OraStoredProc | TOraStoredProc | Executes stored procedures and functions. Lets you edit cursor data returned as parameter.
OraNestedTable | TOraNestedTable | Component for controlling nested table data.
OraUpdateSQL | TOraUpdateSQL | Lets you tune update operations for a DataSet component.
OraDataSource | TOraDataSource | Provides an interface for connecting data-aware controls on a form and ODAC dataset components.
OraScript | TOraScript | Executes sequences of SQL and PL/SQL statements.
OraSQLMonitor | TOraSQLMonitor | Interface for monitoring dynamic SQL execution in ODAC-based applications.
ConnectDialog | TConnectDialog | Allows you to build custom prompts for usernames, passwords, and server names.
VirtualTable | TVirtualTable | Provides dataset functionality for data that has no real database connection. This component is placed on the Data Access page of the Component palette, not on the Oracle Access page.
OraDataAdapter | OraDataAdapter | .NET component for transferring data between TDataSets and System.Data.DataSets.

ODAC Professional and Developer Edition components

OraPackage | TOraPackage | Provides a straightforward way to access Oracle packages.
OraAlerter | TOraAlerter | Allows you to transfer messages between sessions.
OraLoader | TOraLoader | Allows you to quickly load data into Oracle databases.
OraTransaction | TOraTransaction | Provides discrete transaction control over sessions. Can be used to manipulate both simple and distributed transactions.
OraQueue | TOraQueue | Lets you monitor the message queue. Provides an interface for enqueuing and dequeuing messages.
OraQueueTable | TOraQueueTable | Component for managing queue tables.
OraQueueAdmin | TOraQueueAdmin | Component for managing queues.
OraChangeNotification | TOraChangeNotification | Allows you to use Oracle Database Change Notifications.
OraTrace | TOraTrace | Allows you to start and stop the SQL trace for a specified session. This component provides access to the DBMS_TRACE package.
OraErrorHandler | TOraErrorHandler | Translates error messages.
OraProvider | TOraProvider | Loads data to and from a dataset.
BDESession | TBDESession | Integrates ODAC components into BDE-based applications.
OraMetaData | TOraMetaData | Retrieves metadata on specified SQL object.
CRBatchMove | TCRBatchMove | Transfers data between all types of TDataSet descendants. This component is placed on the Data Access page of the Component palette, not on the Oracle Access page.


Hierarchy Chart

Hierarchy Chart

Many ODAC classes are inherited from standard VCL/CLX classes. The inheritance hierarchy chart for ODAC is shown below. The ODAC classes are represented by hyperlinks that point to their description in this documentation. The description of the standard classes can be found in the documentation of your IDE.

TObject

|—TPersistent

|—TComponent

|   |—TCustomConnection

|   |   |—TCustomDAConnection

|   |       |—TOraSession

|   |           |—TBDESession

|   |—TDataSet

|   |   |—TMemDataSet

|   |       |—TCustomDADataSet

|   |       |   `|—TOraDataSet

|   |       |        |—TCustomOraQuery

|   |       |            |—TCustomSmartQuery

|   |       |            |   |—TOraTable

|   |       |            |   |—TSmartQuery

|   |       |            |—TOraQuery

|   |       |            |—TOraStoredProc

|   |       |–TOraNestedTable

|   |       |—TDAMetaData

|   |           |—TOraMetaData

|   |       |—TVirtualTable

|   |—TDataSource

|   |   |—TCRDataSource

|   |       |—TOraDataSource

|   |—DADataAdapter

|   |   |—OraDataAdapter

|   |—TCRBatchMove

|   |—TCustomConnectDialog

|   |   |—TConnectDialog

|   |—TCustomDASQL

|   |   |—TOraSQL

|   |—TCustomDASQLMonitor

|   |   |—TOraSQLMonitor

|   |—TDALoader

|   |   |—TOraLoader

|   |—TDAScript

|   |   |—TOraScript

|   |—TOraAlerter

|   |—TOraChangeNotification

|   |—TOraErrorHandler

|   |—TOraPackage

|   |—TOraQueue

|   |—TOraQueueAdmin

|   |—TOraQueueTable

|   |—TOraTrace

|   |—TOraTransaction

|—TSharedObject

|—TBlob

|   |—TCompressedBlob

|       |—TOraLob

|           |—TOraFile

|—TOraObject

|   |—TOraArray

|   |  |—TOraNestTable

|   |—TOraRef

|   |—TOraXML

|—TOraCursor

|—TOraInterval

|—TOraNumber

|—TOraTimeStamp


Compatibility

Compatibility

Oracle compatibility

ODAC supports Oracle servers 11g, 10g, 9i, 8i, 8.0, and 7.3, including Oracle 10g Express.

ODAC supports x86 versions of the following Oracle clients: 11g, 10g, 9i, 8i, 8.0, and 7.3.

IDE compatibility

ODAC can be used with the following integrated development environments:

  • CodeGear Delphi 2009 for Win32
  • CodeGear C++Builder 2009
  • CodeGear RAD Studio 2007
  • CodeGear C++Builder 2007
  • CodeGear Delphi 2007 for Win32
  • Borland Turbo Delphi Professional
  • Borland Turbo Delphi for .NET Professional
  • Borland Turbo C++ Professional
  • Borland Developer Studio 2006 including support of Delphi for Win32, Delphi for .NET and C++Builder
  • Borland Delphi 2005
  • Borland Delphi 7
  • Borland Delphi 6
  • Borland Delphi 5
  • Borland C++Builder 6
  • Borland C++Builder 5
  • Free Pascal*
  • Borland Kylix 3
  • Borland Kylix 2

Only Architect, Enterprise, and Professional editions are supported.

Note:

Update Pack 2 is required for Borland Delphi 6 (Build 6.240)

ODAC does not support Kylix Open Edition.

*Note:

  • For users of Trial Edition and Edition with Source Code only
  • Direct Mode is not available

OraDeveloper Tools compatibility

The current version of ODAC is compatible with OraDeveloper Tools 2.00 and higher versions for Borland Delphi 2005, Borland Developer Studio 2006, and Delphi 2007.

Compatibility with other DAC products

You can run into a problem if you have incompatible UniDAC, ODAC, MyDAC, SDAC, IBDAC, or PgDAC versions installed on your machine, because these products share common base packages. For more information, see Using several DAC products in one IDE.


Installation

Installation

This topic contains the environment changes made by the ODAC installer. If you are having problems with using ODAC or compiling ODAC-based products, check this list to make sure that your system is properly configured.

Compiled versions of ODAC are installed automatically by the ODAC Installer for all supported IDEs except for Kylix and Lazarus. Versions of ODAC with Source Code must be installed manually. Installation of ODAC from sources is described in the supplied ReadMeSrc.txt file.

Before installing ODAC ...

Two versions of ODAC cannot be installed in parallel for the same IDE, and, since the Devart Data Access Components products have some shared bpl files, newer versions of ODAC may be incompatible with older versions of MyDAC, IBDAC, and SDAC.

So before installing a new version of ODAC, uninstall any previous version of ODAC you may have, and check if your new install is compatible with other Devart Data Access Components products you have installed. For more information please see Using several products in one IDE. If you run into problems or have any compatibility questions, please email odac@devart.com

Note: You can avoid performing ODAC uninstallation manually when upgrading to a new version by directing the ODAC installation program to overwrite previous versions. To do this, execute the installation program from the command line with a /force parameter (Start | Run and type odacXX.exe /force, specifying the full path to the appropriate version of the installation program).

Installed packages

The ODAC package libraries are divided into Win32 project files and .NET project files.

Note: %ODAC% denotes the path to your ODAC installation directory.

Delphi/C++Builder Win32 project packages

Name | Description | Location
dacXX.bpl | DAC run-time package | Windows\System32
dcldacXX.bpl | DAC design-time package | Delphi\Bin
dacvclXX.bpl* | DAC VCL support package | Delphi\Bin
odacXX.bpl | ODAC run-time package | Windows\System32
dclodacXX.bpl | ODAC design-time package | Delphi\Bin
odacvclXX.bpl* | VCL support package | Delphi\Bin
oraprovXX.bpl | TOraProvider component | Delphi\Bin
crcontrolsXX.bpl | TCRDBGrid component | Delphi\Bin

* Not included in Borland Delphi 5 and C++Builder 5. In these IDEs this functionality is distributed among the other packages.

Delphi for .NET project packages

Name | Description | Location
Devart.Dac.dll | DAC run-time package | Global Assembly Cache
Devart.Dac.Design.dll | DAC design-time package | %ODAC%\Bin
Devart.Dac.AdoNet.dll | Data provider core package | Delphi\Bin
Devart.Odac.dll | ODAC Delphi for .NET run-time package | Global Assembly Cache
Devart.Odac.Design.dll | ODAC design-time package | %ODAC%\Bin
Devart.Vcl.dll | TCRDBGrid component | Global Assembly Cache
Devart.Odac.AdoNet.dll | Data provider for Oracle package | Global Assembly Cache

Additional packages for using ODAC managers and wizards

Name | Description | Location
datasetmanagerXX.bpl | DataSet Manager package | Delphi\Bin
oramigwizardXX.dll | ODAC BDE Migration wizard | %ODAC%\Bin

Additional .NET packages for using ODAC managers and wizards

Name | Description | Location
Devart.Dac.DsManager.dll | DataSet Manager Assembly | Global Assembly Cache
Devart.Odac.MigWizard.dll* | ODAC BDE Migration wizard Assembly | Global Assembly Cache

* Included in Borland Delphi 8 only

Environment Changes

To compile ODAC-based applications, your environment must be configured to have access to the ODAC libraries. Environment changes are IDE-dependent.

For all instructions, replace %ODAC% with the path to your ODAC installation directory

Delphi

  • %ODAC%\Lib should be included in the Library Path accessible from Tools | Enviroment options | Library.

The ODAC Installer performs Delphi environment changes automatically for compiled versions of ODAC.

Delphi for .NET

  • Devart.Dac and Devart.Odac should be included in the Namespace prefixes.
  • %ODAC%\Lib should be included in the Library Path accessible from Tools | Options | Library - NET.
  • %ODAC%\Bin should be included in the Library Path accessible from Tools | Options | Library - NET.
  • %ODAC%\Bin should be included in the Component | Installed .NET components | Assembly Search Path.

The ODAC Installer performs Delphi for .NET environment changes automatically for compiled versions of ODAC.

C++Builder

C++Builder 5, 6:

  • $(BCB)\ODAC\Lib should be included in the Library Path of the Default Project Options accessible from Project | Options | Directories/Conditionals.
  • $(BCB)\ODAC\Include should be included in the Include Path of the Default Project Options accessible from Project | Options | Directories/Conditionals.

C++Builder 2006, 2007:

  • $(BCB)\ODAC\Lib should be included in the Library search path of the Default Project Options accessible from Project | Default Options | C++Builder | Linker | Paths and Defines.
  • $(BCB)\ODAC\Include should be included in the Include search path of the Default Project Options accessible from Project | Default Options | C++Builder | C++ Compiler | Paths and Defines.

The ODAC Installer performs C++Builder environment changes for compiled versions of ODAC automatically.

Kylix

Kylix is the only IDE which you will have to configure manually to use both compiled ODAC libraries and versions of ODAC with Source Code. Complete the following steps to configure your Kylix environment. Replace %ODAC% with the path to your ODAC installation directory.

  1. Make ODAC packages reachable for Kylix. Add the directory where ODAC packages are installed to LD_LIBRARY_PATH

    2. LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%ODAC%

    Alternatively, you can copy all the ODAC packages (*.so) to any directory reachable by Kylix, such as kylix/bin.

  2. Install ODAC in Kylix. Select Component | Install Packages from the Kylix menu. Press Add button and select bpldclodacX.so.X.XX package. On pressing OK, the ODAC components will be available in the Oracle Access group.
  3. Add %ODAC%/lib directory to the Search Path of your project.

Lazarus

The ODAC installation program only copies ODAC files. You need to install ODAC packages to Lazarus IDE manually. Open %ODAC%\Source\Lazarus1\dclodac.lpk file in Lazarus and press the Install button. After that Lazarus IDE will be rebuilded with ODAC packages.

Do not press the Compile button for the package. Compiling will fail because there are no ODAC sources.

To check that your environment has been properly configured, try to compile one of the demo projects included with ODAC. The ODAC demo projects are located in %ODAC%/Demos.

Installation of Additional Components and Add-ins

TOraProvider

If you use Delphi Enterprise Edition, Delphi Architect Edition, or C++Builder Enterprise Edition, you can install the TOraProvider component by compiling and installing the oraprovXX.bpk package.

OraDeveloper Tools

OraDeveloper Tools is a powerful database development and administration tool for Oracle. OraDeveloper tools is available as an add-in for Borland Delphi 2005, 2006, and 2007 or as a standalone application. For more information, visit the OraDeveloper Tools page online.

OraTools

OraTools is a separate add-in. It is installed once and can be used by both Delphi and C++Builder. Support for using OraTools in Kylix is not available. For more information, visit the OraTools page online.

DBMonitor

DBMonitor is a an easy-to-use tool to provide visual monitoring of your database applications. It is provided as an alternative to Borland SQL Monitor which is also supported by ODAC. DBMonitor is intended to hamper an application that is being monitored as little as possible. For more information, visit the DBMonitor page online.


Deployment

Deployment

ODAC applications can be built and deployed with or without run-time libraries. Using run-time libraries is managed with the "Build with runtime packages" check box in the Project Options dialog box.

Deploying Win32 applications built without run-time packages

You do not need to deploy any files with ODAC-based applications built without run-time packages, provided you are using a registered version of ODAC.

You can check your application does not require run-time packages by making sure the "Build with runtime packages" check box is not selected in the Project Options dialog box.

Trial Limitation Warning

If you are evaluating deploying Win32 applications with ODAC Trial Edition, you will need to deploy the following BPL files and their dependencies (required IDE BPL files) with your application, even if it is built without run-time packages:

dacXX.bpl | always
dacXX.bpl | always
odacXX.bpl | always

Deploying Win32 applications built with run-time packages

You can set your application to be built with run-time packages by selecting the "Build with runtime packages" check box in the Project Options dialog box before compiling your application.

In this case, you will also need to deploy the following BPL files with your Win32 application:

dacXX.bpl | always
dacXX.bpl | always
odacXX.bpl | always
dacvclXX.bpl | if your application uses the OdacVcl unit
odacvclXX.bpl | if your application uses the OdacVcl unit
crcontrolsXX.bpl | if your application uses the CRDBGrid component

Deploying .NET applications

By default you should deploy the following assemblies with your ODAC .NET application:

dacXX.bpl | always
Devart.Dac.dll | always
Devart.Odac.dll | always
Devart.Dac.AdoNet.dll | If your application uses OraDataAdapter component
Devart.Odac.AdoNet.dll | If your application uses OraDataAdapter component

If you remove the names of these assemblies from the References list of your project, these files will not be required on the target computer.


Licensing and Subscriptions

Licensing and Subscriptions

Oracle Data Access Components are licensed, not sold. Please read the end-user license agreement (EULA) carefully before using the product. You can find the EULA in the License.rtf file in the ODAC installation folder.

Licensing

There are three types of full licenses for ODAC: Single Licenses, Team Licenses, and Site Licenses.

Single Licenses must be purchased for each developer working on a project that uses ODAC.

Purchasing a Team License automatically gives four developers a Single License.

Purchasing a Site License automatically gives all developers in a company a Single License.

For evaluation purposes only, you may also use ODAC Trial Edition under a temporary Evaluation License, which allows you to test ODAC Trial Edition for a period of 60 days, after which you must either remove all files associated with ODAC or purchase a full license.

Licenses can be purchased for the following editions of ODAC: ODAC Standard Edition, ODAC Professional Edition, and ODAC Professional Edition with Source Code, ODAC Developer Edition, and ODAC Developer Edition with Source Code. An edition comparison chart can be found here.

To purchase a license for ODAC, please visit www.devart.com/odac/ordering.html.

If you have any questions regarding licensing, please contact sales@devart.com.

Editions

Full licenses can be purchased for the following editions of ODAC: ODAC Standard Edition, ODAC Professional Edition, and ODAC Professional Edition with Source Code, ODAC Developer Edition, and ODAC Developer Edition with Source Code.

Users can evaluate ODAC with ODAC Trial Edition under Evaluation License.

A comparison chart can be found here.

Subscriptions

The ODAC Subscription program is an annual maintenance and support service for ODAC users.

Users with a valid ODAC Subscription get the following benefits:

  • Product support through the ODAC Priority Support program
  • Access to new versions of ODAC when they are released
  • Access to all ODAC updates and bug fixes
  • Notification of new product versions

If you have any questions regarding licensing or subscriptions not covered with Help, please contact sales@devart.com.

Trial Limitations

ODAC Evaluation License lets you try ODAC Trial Edition for a period of 60 days.

There are no functionality limitations in ODAC Trial Edition during the trial period for most supported IDEs, except the following:

  • .NET applications and applications written in C++Builder require the corresponding IDE to be launched on the client workstation if they use ODAC Trial Edition
  • If you are deploying a project built with ODAC Trial Edition, you will need to include the ODAC library files in your application deployment package. For more information, consult the Deployment topic.


Getting Support

Getting Support

This page lists several ways you can find help with using ODAC and describes the ODAC Priority Support program.

Support Options

There are a number of resources for finding help on installing and using ODAC.

  • You can find out more about ODAC installation or licensing by consulting the Licensing and FAQ sections.
  • You can get community assistance and technical support on the ODAC Community Forum.
  • You can get advanced technical assistance by ODAC developers through the ODAC Priority Support program.

If you have a question about ordering ODAC or any other Devart product, please contact sales@devart.com.

ODAC Priority Support

ODAC Priority Support is an advanced product support service for getting expedited individual assistance with ODAC-related questions from the ODAC developers themselves. Priority Support is carried out over email and has two business days response policy. Priority Support is available for users with an active ODAC Subscription.

To get help through the ODAC Priority Support program, please send an email to odac@devart.com describing the problem you are having. Make sure to include the following information in your message:

  • The version of Delphi, C++Builder or Kylixyou are using.
  • Your ODAC Registration number.
  • Full ODAC edition name and version number. You can find both of these in the About sheet of TOraConnection Editor or from the Oracle | About menu.
  • Versions of the Oracle server and client you are using.
  • A detailed problem description.
  • If possible, a small test project that reproduces the problem. It is recommended to use Scott or SYS schema objects only. Please include definitions for all and avoid using third-party components.


Frequently Asked Questions

Frequently Asked Questions

This page contains a list of Frequently Asked Questions for Oracle Data Access Components.

If you have encounter a question with using ODAC, please browse through this list first. If this page does not answer your question, refer to the Getting Support topic in ODAC help.

Installation and Deployment
  1. I'm having a problem with installing ODAC or compiling ODAC-based projects...

    You may be having a compatibility issue that shows up in one or more of the following forms:

    • Get a "Setup has detected already installed DAC packages which are incompatible with current version" message during ODAC installation.
    • Get a "Procedure entry point ... not found in ... " message when starting IDE.
    • Get a "Unit ... was compiled with a different version of ..." message on compilation.

    You can have such problems if you installed incompatible ODAC, SDAC, MyDAC or IBDAC versions. All these products use common base packages. The easiest way to avoid the problem is to uninstall all installed DAC products and then download from our site and install the last builds.
  2. What software should be installed on a client computer so that my applications that use ODAC can run?
    To use the full set of Oracle features, the client computer has to have Oracle client software (OCI) installed. If you do not want to install OCI, you can use Direct mode, in which ODAC communicates with Oracle server without intermediate libraries. In order to use the Direct mode, the operating system on the client computer must have TCP/IP protocol support installed.
  3. How can I quickly convert a project from BDE to ODAC?

    To quickly migrate your project from BDE you can use the BDE Migration Wizard. To start it, open your project and choose BDE Migration Wizard from the Oracle menu of your IDE.
  4. How can I compile an ODAC with Sources Edition so that ODAC packages do not require BDE packages?
    Find and comment the following line in the Odac.inc file:
    {$DEFINE BDESESSION}
    In this case ODAC will be compiled without the TBDESession component.
Licensing and Subscriptions
  1. Am I entitled to distribute applications written with ODAC?

    If you have purchased a full version of ODAC, you are entitled to distribute pre-compiled programs created with its use. You are not entitled to propagate any components inherited from ODAC or using ODAC source code. For more information see the License.rtf file in your ODAC installation directory.
  2. Can I create components using ODAC?

    You can create your own components that are inherited from ODAC or that use the ODAC source code. You are entitled to sell and distribute compiled application executables that use such components, but not their source code and not the components themselves.
  3. What licensing changes can I expect with ODAC 6.00?

    The basic ODAC license agreement will remain the same. With ODAC 6.00, the ODAC Edition Matrix will be reorganized and a new ODAC Subscription Program will be introduced.
  4. What do the ODAC 6.00 Edition Levels correspond to?

    ODAC 6.00 will come in six editions: Trial, Standard, Professional, Professional with Sources, Developer, and Developer with Sources.

    When you upgrade to the new version, your edition level will be automatically updated using the following Edition Correspondence Table.

    Edition Correspondence Table for Upgrading to ODAC 6.00

    Old Edition Level | New Edition Level
    - No Correspondence - | ODAC Standard Edition
    ODAC Standard Edition | ODAC Professional Edition
    ODAC Net Edition | ODAC Professional Edition
    ODAC Professional Edition | ODAC Professional Edition with Sources
    - No Correspondence - | ODAC Developer Edition
    - No Correspondence - | ODAC Developer Edition with Sources
    ODAC Trial Edition | ODAC Trial Edition

    The feature list for each edition can be found in the ODAC documentation and the ODAC website.
  5. I have a registered version of ODAC. Will I need to pay to upgrade to future versions?

    After ODAC 6.00, all upgrades to future versions are free to users with an active ODAC Subscription.

    Users that have a registration for versions of ODAC prior to ODAC 6.00 will have to first upgrade to ODAC 6.00 to jump in on the Subscription Program.
  6. What are the benefits of the ODAC Subscription Program?

    The ODAC ODAC Subscription Program is an annual maintenance and support service for ODAC users.

    Users with a valid ODAC Subscription get the following benefits:

    • Access to new versions of ODAC when they are released
    • Access to all ODAC updates and bug fixes
    • Product support through the ODAC Priority Support program
    • Notification of new product versions

    Priority Support is an advanced product support program which offers you expedited individual assistance with ODAC-related questions from the ODAC developers themselves. Priority Support is carried out over email and has a guaranteed two business day response policy.

    The ODAC Subscription Program is available for registered users of ODAC 6.00 and higher.
  7. Can I use my version of ODAC after my Subscription expires?

    Yes, you can. ODAC version licenses are perpetual.
  8. I want a ODAC Subscription! How can I get one?

    You can renew your ODAC Subscription on the ODAC Ordering Page. For more information, please contact sales@crlab.com.

    You will be able to renew your ODAC Subscription by email or on the ODAC website. For more information, please contact sales@crlab.com.
  9. Does this mean that if I upgrade to ODAC 6 from ODAC 5, I'll get an annual ODAC Subscription for free?
    Yes.
  10. How do I upgrade to ODAC 6.00?

    To upgrade to ODAC 6.00, you can get a Version Update from the ODAC Ordering Page. For more information, please contact sales@crlab.com.
Performance
  1. How productive is ODAC?

    From time to time we compare ODAC with other products, and ODAC always takes first place. For more information, please refer to the ODAC performance comparison results posted on the ODAC website

  2. Why does the Locate function work so slowly the first time I use it?

    Locate is performed on the client. So if you had set FetchAll to False when opening your dataset, cached only some of the rows on the client, and then invoked Locate, ODAC will have to fetch all the remaining rows from the server before performing the operation. On subsequent calls, Locate should work much faster.

    If the Locate method keeps working slowly on subsequent calls or if you are working with FetchAll=True, try the following. Perform local sorting by a field that is used in the Locate method. Just assign corresponding field name to the IndexFieldNames property.
How To
  1. How can I enable syntax highlighting in ODAC component editors at design time?

    Download and install OraDeveloper Tools. In addition to syntax highlighting, OraDeveloper Tools provides a lot of additional features.
    Alternatively, you can download and install the freeware SynEdit component set.
  2. How can I find out which version of ODAC I am using ?

    You can determine your ODAC version number in several ways:

    • During installation of ODAC, consult the ODAC Installer screen.
    • After installation, see the history.html file in your ODAC installation directiory.
    • At design-time, select Oracle | About ODAC from the main menu of your IDE.
    • At run-time, check the value of the OdacVersion and DACVersion constants.
  3. How can I stop the cursor from changing to an hour glass during query execution?

    Just set the DBAccess.ChangeCursor variable to False anywhere in your program. The cursor will stop changing after this command is executed.
  4. How can I execute a query saved in the SQLInsert, SQLUpdate, SQLDelete, or SQLRefresh properties of a ODAC dataset?

    The values of these properties are templates for query statements, and they cannot be manually executed. Usually there is no need to fill these properties because the text of the query is generated automatically.

    In special cases, you can set these properties to perform more complicated processing during a query. These properties are automatically processed by ODAC during the execution of the Post, Delete, or RefreshRecord methods, and are used to construct the query to the server. Their values can contain parameters with names of fields in the underlying data source, which will be later replaced by appropriate data values.

    For example, you can use the SQLInsert template to insert a row into a query instance as follows.

    1. Fill the SQLInsert property with the parametrized query template you want to use.
    2. Call Insert.
    3. Initialize field values of the row to insert.
    4. Call Post.

    The value of the SQLInsert property will then be used by ODAC to perform the last step.

    Setting these properties is optional and allows you to automatically execute additional SQL statements, add calls to stored procedures and functions, check input parameters, and/or store comments during query execution. If these properties are not set, the ODAC dataset object will generate the query itself using the appropriate insert, update, delete, or refresh record syntax.
  5. My program allows users to edit records directly in a DBGrid instance. How can I disable record deletion?
    If TOraQuery acts as TDataSet, it is very simple to prohibit deleting, inserting and/or updating of records. Simply clear the relevant property (SQLDelete, SQLInsert,SQLUpdate). The action with empty SQL statement will not be allowed.
  6. How do I allow users to delete, insert, and edit records (e.g. in DBGrid), but ensure deletions are not represented in the database?
    Assign the following PL/SQL block to TOraQuery.SQLDelete:
    begin
  Null;
end;
  7. How can I tune the NUMBER fields definition in ODAC?
    There are three typed constants in the OraClasses.pas module: IntegerPrecision, LargeIntPrecision and FloatPrecision. Using the values of these constants and the EnableIntegers and EnableNumbers options, the Oracle NUMBER type is mapped to ODAC field classes as follows.

    Conditions | Field class
    Precision <= IntegerPrecision, Scale = 0, EnableIntegers = True | TIntegerField
    IntegerPrecision < Precision <= LargeIntPrecision, Scale = 0, EnableIntegers = True | TLargeIntField
    Precision > FloatPrecision, Scale > 0, EnableNumbers = True | TOraNumberField
    In other cases | TFloatField
    The default values of these constants are:

    IntegerPrecision = 9, LargeIntPrecision = 0, FloatPrecision = 15
  8. How to enable support of TLargeIntField?
    Set the value of the global constant LargeIntPrecision to 18.
General Questions
  1. What are the advantages of ODAC compared to BDE?

    BDE provides a more or less uniform way for accessing different servers (SQL Server, MySQL, Oracle and so on)

    ODAC is a set of components optimized for working specifically with Oracle, and has a server-specific component interface and advanced design-time support.

    As a result, there are a number of reasons why ODAC may be better than BDE for your Oracle-based application. Some of them are enumerated here. For more information refer to the ODAC feature list.

    • Incomparably higher speed of data access, fetching, and processing
    • Possibility to individually adjust and optimize execution parameters for every query
    • Complete support of PL/SQL
    • Return of cursor from a stored procedure or anonymous PL/SQL block (by parameter)
    • Return of PL/SQL result sets from a stored procedure or anonymous PL/SQL block
    • Support for asynchronous execution of queries
    • Possibility to break the execution of long-duration queries
    • Built-in system for debugging in run-time
    • Convenient and simple-to-use standardized error processing mechanism
    • No need to install and configure BDE on client machines during deployment
  2. What happened to the ODAC Net option and the TOraSession.Options.Net property?
    As of ODAC 6.00, the ODAC Net Option has been renamed to ODAC Direct mode, and TOraSession.Options.Net has been replaced with TOraSession.Options.Direct. You can configure ODAC to connect directly to Oracle over TCP/IP by setting TOraSession.Options.Direct to True.

    Note TOraSession.Options.Net has been retained for backwards-compatibility. This property is depreciated as of ODAC 6.00. Use TOraSession.Options.Direct instead.

  3. Are the ODAC connection components thread-safe?
    In Client mode, ODAC is thread-safe. In Direct mode, we do not guarantee complete thread safety and recommend setting up a separate Connection set for each thread that uses ODAC.
  4. Behaviour of my application has changed when I upgraded ODAC. How can I restore the old behaviour with the new version?

    We always try to keep ODAC compatible with previous versions, but sometimes we have to change behaviour of ODAC in order to enhance its functionality, or avoid bugs. If either of changes is undesirable for your application, and you want to save the old behaviour, please refer to the "Compatibility with previous versions" topic in ODAC help. This topic describes such changes, and how to revert to the old ODAC behaviour.
  5. When editing a DataSet, I get an exception with the message 'Update failed. Found %d records.' or 'Refresh failed. Found %d records.'

    This error occurs when the database server is unable to determine which record to modify or delete. In other words, there are either more than one record or no records that suit the UPDATE criteria. Such situation can happen when you omit the unique field in a SELECT statement (TCustomDADataSet.SQL) or when another user modifies the table simultaneously. This exception can be suppressed. Refer to TCustomDADataSet.Options topic in ODAC help for more information.
  6. I would like to use MIDAS technology. Does ODAC support the IProvider interface?
    Yes. Check out the Provider property of the TOraProvider component.
  7. What's the difference between TOraQuery, TSmartQuery, and TOraTable?
    All these components are inherited from TDataSet and have all its capabilities. However, each component has a number of differences.
    • TOraQuery represents the most general way of executing queries and editing data. It is the most universal component, while TSmartQuery and TOraTable are designed for convenience only.
    • TSmartQuery includes all the functionality of TOraQuery component, and provides additional features: expand fields, that lets all data controls be aware of all the fields belonging to updating table an not only those requested in SELECT clause, and smart refresh (in Professional and Developer editions only).
    • TOraTable makes it unnecessary to write SQL statements to perform both data updates and data selection and emulates working with a local table. With TOraTable, you do not have to use SQL at all, and only have to specify the name of the appropriate table or view.
  8. Can ODAC and BDE functions be used side-by-side in a single application?
    Yes. There is no problem with using both ODAC and BDE functions in the same application.
  9. I get an access violation when using the TBDESession component.
    This problem may occur if the BDE driver for ORACLE is not configured properly. Run BDE Administrator, go to the Configuration tab, select Configuration\Drivers\Native\ORACLE in the tree, make sure that the DLL32 driver property is set to SQLORA32.DLL.


Connecting in Direct Mode

Connecting in Direct Mode

ODAC Developer Edition and ODAC Professional Edition allow you to connect to Oracle in two ways: in Client mode, using Oracle Client software, or in Direct mode, over TCP/IP. The chosen connection mode is regulated by the TOraSession.Options.Direct property.

ODAC connection modes

By default, ODAC, like most applications that work with Oracle, uses the Oracle Call Interface (OCI) to connect to the Oracle database server. This is referred to as connecting in Client mode, and it is the usual way to develop Oracle applications with a third-generation language. All OCI routines are stored in external libraries, so the executables for applications that work through OCI are small. However, working through OCI requires Oracle client software to be installed on target workstations. It is inconvenient and causes additional installation and administration expenses. Furthermore, there are some situations in which installation of Oracle client is not advisable or may be even impossible; for example, when deploying an application to remote machines which do not have qualified administration.

To overcome these problems, ODAC Developer Edition and ODAC Professional Edition include an option to connect to Oracle directly over the network using the TCP/IP protocol. This is referred to as connecting in Direct mode. Connecting in Direct mode does not require Oracle client software to be installed on target machines. The only requirement for running an ODAC-based application that uses the Direct mode is that the operating system must support the TCP/IP protocol.

Setting up Direct mode connections

To connect to Oracle server using Direct mode, set up your TOraSession object as follows.

  • Set your TOraSession object's Options.Direct property to True
  • Set your TOraSession object's Server property to a string that contains the host address of the database server, port number, and the Oracle System Identifier (SID) in the following format:

Host:Port:SID

Where

Host is the server's IP address or DNS name

Port is the port number that the server listens to

SID is the Oracle System Identifier of the server

Note that the syntax used to set up the Server property is different in Direct mode and in Client mode. In Client mode, the Server property must be set to the TNS name of the Oracle server.

Here is an example that illustrates connecting to Oracle in Direct mode. The Oracle server's IP address is 205.227.44.44, its port number is 1521 (this is the most commonly used port for Oracle), and 'orcl' is the SID (this is the standard Oracle SID).

var
  Session: TOraSession;
. . .
Session.Options.Direct := True;
Session.Username := 'Scott';
Session.Password := 'tiger';
Session.Server := '205.227.44.44:1521:orcl';
Session.Connect;

This is all you need to do to enable Direct mode connections in your application. You do not have to rewrite other parts of your code.

To return to working through OCI, just set TOraSession.Options.Direct to False and update the Session to the TNS name of your server.

You can connect to Multi-Threaded Server using Direct mode. The server must be configured to use specific port and TTC protocol. This can help you avoid firewall conflicts.

Note: Direct mode is available in ODAC Developer Edition and ODAC Professional Edition, and can be evaluated with Oracle Trial Edition. Attempting to set the TOraSession.Options.Direct property to True in ODAC Standard Edition will generate a "Feature is not supported" error.

Comparison of Client mode vs. Direct mode

Applications that use Client mode and those that use Direct mode have similar size and performance. The security of using the Direct mode is the same as using Client without Oracle Advanced Security. ODAC in Direct mode uses DES authentication and does not now support Oracle Advanced Security.

Advantages of using Direct mode

  • Installation and administration of Oracle client software are not required.
  • System requirements are reduced.

Direct mode limitations

  • Connect using TCP/IP protocol only
  • Some types are not available, like OBJECT, ARRAY, REF, XML, BINARY_DOUBLE, BINARY_FLOAT.
  • The RowsAffected property is not returned correctly for queries with RETURNING clause
  • TOraLoader direct loading is not supported.
  • Certain problems may occur when using firewalls.
  • Direct mode does not support NLS conversion on the client side.
  • Transparent Application Failover is not supported.
  • statement caching is not available.
  • OS authentication and changing expired passwords features are not available.
  • We do not guarantee stability of multithreaded applications. It is highly recommended to use separate TOraSession component for each thread when using ODAC from different threads.

Please note that we do not guarantee ODAC Direct mode compatibility with all Oracle servers and in every network. We have tested Direct mode for all versions of Oracle servers for Windows and Linux since 7.3 on a local network. Other platforms may cause some incompatibility issues.

Connecting in Direct mode is managed transparently by the TOraSession object, and you can easily return to connecting through OCI in Client mode at any time if restrictions above become critical for you.

See Also

  • TOraSession.Server
  • TOraSession.Options
  • TOraDataSet.BreakExec
  • TOraSQL.BreakExec


Updating Data with ODAC Dataset Components

Updating Data with ODAC Dataset Components

ODAC dataset components which descend from TCustomDADataSet provide different ways for reflecting local changes on the server.

The first approach is to use automatic generation of update SQL statements. When using this approach you should either specify Key Fields (the KeyFields property) or include RowID field into you SELECT SQL statement to avoid requesting of KeyFields from the server. When SELECT statement uses multiple tables, you can use UpdatingTable property to specify which table will be updated. If UpdatingTable is blank, the first table of the FROM clause will be used. When using sophisticated SELECT SQL statements (statements that use multiple tables, Synonyms, DBLinks, aggregated fields) we recommend to enable ExtendedFieldsInfo option. When this option is enabled, additional requests to the server may be performed to obtain more information about updating objects. This helps to generate correct updating SQL statements but may result in performance decrease. To avoid editing the fields that will not be used in update SQL statements use the SetFieldsReadOnly option. You can increase performance by refreshing fields using RETURNING clause when insert or update is performed. To enable this feature enable DMLRefresh and ReturnParams options.

Another approach is to set update SQL statements using SQLInsert, SQLUpdate and SQLDelete properties. Use them to specify SQL statements that will be used for corresponding data modifications. It is useful when generating data modification statements is not possible (for example when working with data of a cursor, returned by a stored procedure) or you need to execute some specific statements. You may also assign TOraUpdateSQL component to the UpdateObject property. TOraUpdateSQL component holds all updating SQL statements in one place. You can generate all these SQL statements using ODAC design time editors. For more careful customization of data update operations you can use InsertObject, ModifyObject and DeleteObject properties of TOraUpdateSQL component.

See Also

  • TSmartQuery
  • TOraQuery
  • TOraStoredProc
  • TOraTable
  • TOraUpdateSQL


Working with Master/Detail Relationships

Working with Master/Detail Relationships

Master/detail (MD) relationship between two tables is a very widespread one. So it is very important to provide an easy way for database application developer to work with it. Lets examine how ODAC implements this feature.

Suppose we have classic MD relationship between "Department" and "Employee" tables.

"Department" table has field Dept_No. Dept_No is a primary key.

"Employee" table has a primary key EmpNo and foregin key Dept_No that binds "Employee" to "Department".

It is necessary to display and edit these tables.

ODAC provides two ways to bind tables. First code example shows how to bind two TCustomOraDataSet components (TOraQuery, TSmartQuery, TOraTable or even TOraStoredProc) into MD relationship via parameters.

procedure TForm1.Form1Create(Sender: TObject);
var
  Master, Detail: TOraQuery;
  MasterSource: TDataSource;
begin
  // create master dataset
  Master := TOraQuery.Create(Self);
  Master.SQL.Text := 'SELECT * FROM Department';

  // create detail dataset

  Detail := TOraQuery.Create(Self);
  Detail.SQL.Text := 'SELECT * FROM Employee WHERE Dept_No = :Dept_No';

  // connect detail dataset with master via TDataSource component
  MasterSource := TDataSource.Create(Self);
  MasterSource.DataSet := Master;
  Detail.MasterSource := MasterSource;

  // open master dataset and only then detail dataset
  Master.Open;
  Detail.Open;
end;

Pay attention to one thing: parameter name in detail dataset SQL must be equal to the field name in the master dataset that is used as foreign key for detail table. After opening detail dataset always holds records with Dept_No field value equal to the one in the current master dataset record.

There is an additional feature: when inserting new records to detail dataset it automatically fills foreign key fields with values taken from master dataset.

Now suppose that detail table "Department" foregin key field is named DepLink but not Dept_No. In such case detail dataset described in above code example will not autofill DepLink field with current "Department".Dept_No value on insert. This issue is solved in second code example.

procedure TForm1.Form1Create(Sender: TObject);
var
  Master, Detail: TOraQuery;
  MasterSource: TDataSource;
begin
  // create master dataset
  Master := TOraQuery.Create(Self);

  Master.SQL.Text := 'SELECT * FROM Department';

  // create detail dataset
  Detail := TOraQuery.Create(Self);
  Detail.SQL.Text := 'SELECT * FROM Employee';

  // setup MD
  Detail.MasterFields := 'Dept_No';   // primary key in Department
  Detail.DetailFields := 'DepLink'; // foreign key in Employee

  // connect detail dataset with master via TDataSource component
  MasterSource := TDataSource.Create(Self);
  MasterSource.DataSet := Master;

  Detail.MasterSource := MasterSource;

  // open master dataset and only then detail dataset
  Master.Open;
  Detail.Open;
end;

In this code example MD relationship is set up using MasterFields and DetailFields properties. Also note that there are no WHERE clause in detail dataset SQL.

To defer refreshing of detail dataset while master dataset navigation you can use DetailDelay option.

Such MD relationship can be local and remote, depending on the TCustomDADataSet.Options.LocalMasterDetail option. If this option is set to True, dataset uses local filtering for establishing master-detail relationship and does not refer to the server. Otherwise detail dataset performs query each time when record is selected in master dataset. Using local MD relationship can reduce server calls number and save server resources. It can be useful for slow connection. CachedUpdates mode can be used for detail dataset only for local MD relationship. Using local MD relationship is not recommended when detail table contains too many rows, because in remote MD relationship only records that correspond to the current record in master dataset are fetched. So, this can decrease network traffic in some cases.

See Also

  • TCustomDADataSet.Options
  • TMemDataSet.CachedUpdates


Automatic Key Field Value Generation

Automatic Key Field Value Generation

When editing dataset it is often convenient to generate key field(s) values automatically instead of filling them manually. In the most common way application developer generates primary key value basing it on previously created sequence. There are three ways to do it.

First, application independent way - developer creates AFTER INSERT trigger that fills the field value. But here he faces the problem with getting value inserted by trigger back to dataset. This problem can be easily solved in ODAC by specifying return parameters. For instance:

...
// suppose that AFTER INSERT trigger fills DepNo field
OraQuery.SQL.Text := 'SELECT DepNo, DepName, Location FROM Department';
OraQuery.SQLInsert.Text := 'INSERT INTO Department (DepNo, DepName, Location)' +
                           'VALUES(DepNo, DepName, Location) ' +
                           'RETURNING DepNo INTO :DepNo';
...

Second way is custom key field value generation. Developer can fill key field value in TOraDataSet.BeforePost event handler. But in this case he should manually execute query and retrieve sequence value. So this way may be useful only if some special value processing is needed.

The third way, using KeySequence is the simplest. Developer only needs to specify two properties and key field values are generated automatically. There is no need to create trigger or perform custom BeforePost processing.

...
OraQuery.SQL.Text := 'SELECT DepNo, DepName, Location FROM Department';
OraQuery.KeyFields := 'DepNo';         // key field
OraQuery.KeySequence := 'DepSequence'; // sequence that will generate values
...

See also

  • KeySequence


Working with TOraLoader Component

Working with TOraLoader Component

There are ceses when you need to put large amount of data to Oracle database. Of course, you may construct INSERT SQL statement and execute it with TOraSQL component. But it takes a lot of time. You can greatly speed up loading time of data by using DML array features. Oracle 8i has better way to do it. With Oracle 8i using the direct path load interface is possible. The direct path load interface allows to access the direct path load engine of the Oracle database server to perform the functions of the Oracle SQL*Loader utility. This functionality provides the ability to load data from external files into Oracle database objects, either a table or a partition of a partitioned table.

ODAC simplifies using direct path load interface by TOraLoader component. TOraLoader allows you to load various formatted data. The capability of TOraLoader component to load various formatted data is reached by reading external data in writing method itself.

To write your own loader you should:

  • create TOraLoader component;
  • set name of loading table to TableName;
  • create and customize columns which will be loaded (use TOraLoader component editor at design time);
  • write your own event handler: OnGetColumnData or OnPutData
  • call Load method to start loading.

See Also

  • TOraLoader

    • TDPColumn


Working with TOraTransaction Component

Working with TOraTransaction Component

TOraTransaction component can be used to manage either local or distributed (global) transactions.

To start local transaction with TOraTransaction component, set DefaultSession property of the component to a session on which transaction will be performed. Set IsolationLevel property optionally. Then call StartTransaction method of the TOraTransaction component. To manage transaction use Commit, Rollback, Savepoint, RollbackToSavepoint methods.

Global transactions can be performed on one or more sessions connected to the same or to the different databases. These sessions can be established from different applications and computers. On each of these sessions a separate branch of transaction is performed. Global transaction can be coordinated either by internal mechanism of TOraTransaction or Microsoft Transaction Manager DTC. This behavior can be tuned by GlobalCoordinator property. In case of using internal mechanism you should specify TransactionId and BranchQualifier for each session to identify global transaction. Global transaction can be managed using Commit, Rollback, Savepoint, RollbackToSavepoint, Detach and Resume methods of TOraTransaction. If an OraSession uses global transaction, it must have non-empty InternalName property. For more information about global transaction please refer to Oracle documentation.

Note: transaction will be global if either TransactionId or TransactionName property is set or if GlobalCoordinator property is gcMTS.

Here is a sample code that starts and commits global transaction:

var
Id: TBytes;
begin
  OraSession1.InternalName := 'SampleName1';
  OraSession2.InternalName := 'SampleName2';

  OraSession1.Connect;
  OraSession2.Connect;

  SetLength(Id, 2);
  id[0] := 7; id[1] := 3;
  OraTransaction.TransactionId := Id;

  SetLength(Id, 1);
  id[0] := 1;
  OraTransaction.AddSession(OraSession1, Id);
  id[0] := 2;
  OraTransaction.AddSession(OraSession2, Id);

  OraTransaction.StartTransaction;

  OraSQL1.Session := OraSession1;
  OraSQL2.Session := OraSession2;
  OraSQL1.Execute;
  OraSQL2.Execute;

  OraTransaction.Commit;
end;

The following example demonstrates a global transaction with two branches created from different applications. After performing update these applications detach their transaction branches. Then third application (transaction manager) resumes all branches of the transaction and performs two-phase commit.

// Appication 1
var
  Id: TBytes;
begin
  OraSession.InternalName := 'SampleName1';
  OraSession.Connect;

  SetLength(Id, 2);
  id[0] := 7; id[1] := 3;
  OraTransaction.TransactionId := Id;

  SetLength(Id, 1);
  id[0] := 1;
  OraTransaction.AddSession(OraSession, Id);

  OraTransaction.StartTransaction;

  OraSQL.Execute;

  OraTransaction.Detach;
end;

// Appication 2
var
  Id: TBytes;
begin
  OraSession.InternalName := 'SampleName2';
  OraSession.Connect;

  SetLength(Id, 2);
  id[0] := 7; id[1] := 3;
  OraTransaction.TransactionId := Id;

  SetLength(Id, 1);
  id[0] := 2;
  OraTransaction.AddSession(OraSession, Id);

  OraTransaction.StartTransaction;

  OraSQL.Execute;

  OraTransaction.Detach;
end;

// Application 3 (transaction manager that commits transaction)
var
  Id: TBytes;
begin
  OraSession1.Connect;
  OraSession2.Connect;

  SetLength(Id, 2);
  id[0] := 7; id[1] := 3;
  OraTransaction.TransactionId := Id;

  SetLength(Id, 1);
  id[0] := 1;
  OraTransaction.AddSession(OraSession1, Id);
  id[0] := 2;
  OraTransaction.AddSession(OraSession2, Id);

  OraTransaction.Resume;

  OraTransaction.Commit;
end;

The next example demonstrates using distributed transaction coordinated by MTS DTC:

begin
  OraSession1.InternalName := 'SampleName1';
  OraSession2.InternalName := 'SampleName2';

  OraSession1.Connect;
  OraSession2.Connect;

  OraTransaction.GlobalCoordinator := gcMTS;

  OraTransaction.AddSession(OraSession1);
  OraTransaction.AddSession(OraSession2);

  OraTransaction.StartTransaction;

  OraSQL1.Session := OraSession1;
  OraSQL2.Session := OraSession2;
  OraSQL1.Execute;
  OraSQL2.Execute;

  OraTransaction.Commit;
end;


Working with TOraQueue, TOraQueueAdmin and TOraQueueTable Components

Working with TOraQueue, TOraQueueAdmin and TOraQueueTable Components

TOraQueue, TOraQueueAdmin and TOraQueueTable components provide access to Oracle Streams Advanced Queuing. Oracle Streams AQ provides database-integrated message queuing functionality. It is built on top of Oracle Streams and leverages the functions of Oracle Database so that messages can be stored persistently, propagated between queues on different computers and databases, and transmitted using Oracle Net Services and HTTP(S).

Because Oracle Streams AQ is implemented in database tables, all operational benefits of high availability, scalability, and reliability are also applicable to queue data. Standard database features such as recovery, restart, and security are supported by Oracle Streams AQ. Like other database tables, queue tables can be imported and exported.

When applications communicate with each other, producer applications enqueue messages and consumer applications dequeue messages. At the basic level of queuing, one producer enqueues one or more messages into one queue. Each message is dequeued and processed once by one of the consumers. A message stays in the queue until a consumer dequeues it or the message expires. A producer may stipulate the delay before the message is available for the consumption, and the time after which the message expires. Likewise, a consumer may wait when trying to dequeue a message if no message is available. An agent program or application may act both as a producer and a consumer.

TOraQueue component provides access to functionality of DBMS_AQ Oracle package. User must have AQ_USER_ROLE to work with this component. TOraQueue component can be used to enqueue and dequeue messages from the given queue. Queue message includes a payload and message properties. Type of payload is defined for each queue. This can be Oracle object type or 'RAW' type. RAW payload contains any array of bytes. To use TOraQueue component set its Session and QueueName properties. Then one of Enqueue method overloads can be used to enqueue message.

To enqueue message with RAW payload use the Enqueue method overload with string or TBytes Payload parameter. For example:

var
  MsgProp: TQueueMessageProperties;
begin
  MsgProp := TQueueMessageProperties.Create;
  try
    MsgProp.Priority := 2;
    MsgProp.Delay := 30; // delay in sec before message can be dequeued
    MsgProp.Expiration := 180; // message expiration in sec

    OraQueue.Enqueue('123', MsgProp);
  finally
    MsgProp.Free;
  end;
end;

To enqueue message to queue with object payload use Enqueue method overload with TOraObject Payload parameter. For example:

var
  MsgProp: TQueueMessageProperties;
  Payload: TOraObject;
begin
  MsgProp := TQueueMessageProperties.Create;
  try
    MsgProp.Priority := 2;
    MsgProp.Delay := 30; // delay in sec before message can be dequeued
    MsgProp.Expiration := 180; // message expiration in sec

    Payload := TOraObject.Create;
    try
      Payload.AllocObject(OraSession.OCISvcCtx, 'OBJ_MES');
      Payload.AttrAsInteger['A'] := 3;
      Payload.AttrAsString['B'] := 'Hello';

      OraQueue.Enqueue(Payload, MsgProp);
    finally
      Payload.Free;
    end;
  finally
    MsgProp.Free;
  end;
end;

To dequeue message, use one of TOraQueue.Dequeue method overloads. If there are no messages available for dequeuing, Dequeue method will wait until a message will be available. The following example demonstrates the usage of Dequeue method for a queue with object payload:

var
  Payload: TOraObject;
  a: integer;
  b: string;
begin
  Payload := TOraObject.Create;
  try
    OraQueue.Dequeue(Payload);

    a := Payload.AttrAsInteger['A'];
    b := Payload.AttrAsString['B'];
  finally
    Payload.Free;
  end;
end;

To get notification when a message available to dequeuing appears in the queue use TOraQueue.Listen method or set AsyncNotification property to True and write OnMessage event handler.

Listen method listens on one or more queues on behalf of a list of agents. This method waits until a message is available in one of the queues and then returns the agent that corresponds this queue. Listen method should be called in separate thread to avoid program blocking. For example:

procedure TListenThread.Execute;
var
  Agents: TQueueAgents;
  Agent: TQueueAgent;
  Message: string;
begin
  Agents := TQueueAgents.Create;
  try
    Agents.Add.Address := 'QUEUE1'; // Address property should contain the queue name
    Agents.Add.Address := 'QUEUE2';

    Agent := TQueueAgent.Create;
    try
      while not Terminated do begin
        OraQueue.Listen(Agents, Agent);
        OraQueue.Dequeue(Message);
      end;
    finally
      Agent.Free;
    end;
  finally
    Agents.Free;
  end;
end;

TOraQueueAdmin and TOraQueueTable components are used to administrate queues. User must have AQ_ADMINISTRATOR_ROLE to work with these components. TOraQueueAdmin and TOraQueueTable components can be used to create and drop queues and queue tables, alter queue properties.

Queue can be persistent or non-persistent. To create persistent queue first a queue table must be created. Use TOraQueueTable component to create a queue table. Set properties of the component to required values and then call CreateQueueTable method. Use AlterQueueTable method to alter a queue table properties and DropQueueTable method to drop a queue table.

When a queue table is created, TOraQueueAdmin component can be used to create a queue. Set properties of the component to required values and then call CreateQueue method. Use AlterQueue method of TOraQueueAdmin to alter a queue properties and DropQueue method to drop a queue.

Before messages can be enqueued and dequeued enqueuing and dequeuing must be started on the queue. Use StartQueue method of TOraQueueAdmin to start enqueuing and dequeuing on the queue.


Working with TOraChangeNotification Component

Working with TOraChangeNotification Component

TOraChangeNotification component is used to register queries with the database and receive notifications in response to DML or DDL changes on the objects associated with the queries. The notifications are published by the database when the DML or DDL transaction commits.

When the database issues change notification, it can contain some or all of the following information:

- Names of the modified objects. For example, the notification can specify that the hr.employees table was changed.

- The type of change. For example, the message specifies whether the change was caused by an INSERT, UPDATE, DELETE, ALTER TABLE, or DROP TABLE.

- The ROWIDs of the changed rows and the type of DML that changed them.

- Global events such as STARTUP and SHUTDOWN (consistent only). In a Real Applications Cluster, the database delivers a notification when the first instance on the database starts or the last instance shuts down.

The notification contains only metadata about the changed rows or objects rather than the changed data itself. For example, the database does not notify the client that monthly salary increased from 5000 to 6000. To obtain more recent values for the changed objects or rows, the client must query the database based on the information contained in the notification.

Database Change Notification is useful for an application that caches query result sets on mostly read-only objects in the mid-tier to avoid network round trips to the database. Such application can create a registration on the queries it is interested in caching using the change notification service. On changes to objects referenced inside those queries, the database publishes a change notification when the underlying transaction commits. In response to the notification, the application can refresh its cache by re-executing the queries.

TOraChangeNotification component represents dependency between an application and an Oracle database based on the database events in which the application is interested. To create subscription place on the form TOraChangeNotification component and assign it to ChangeNotification properties of datasets. When you open a dataset subscription on changes to database tables that dataset selects data from will be created. All datasets that use one TOraChangeNotification component share one change notification subscription. A dataset is registered in subscription when you open this dataset.

Components derived from TOraDataSet can automatically refresh their data in response to change notification. To enable autorefresh set ReflectChangeNotify in TOraDataSet.Options to True. Dataset refreshes when data in one of the tables that appear in query FROM clause is changed. If dataset's SQL has ROWID in SELECT clause and changed table corresponds UpdatingTable property of TOraDataSet then only changed rows are refreshed with RefreshRecord method. If TOraDataSet.SQLRefresh property is set it must use ROWID. Otherwise refreshing may be incorrect. If TOraDataSet.SQL property doesn't contain ROWID in SELECT clause or data is changed not in UpdatingTable but in other table that appears in query FROM clause the dataset performs full refresh with Refresh method.

Change notification can be handled manually using OnChange event of TOraChangeNotification component. For example:

procedure TForm1.OraChangeNotificationChange(Sender: TObject;
  NotifyType: TChangeNotifyEventType; TableChanges: TNotifyTableChanges);
var
  i, j: integer;
begin
  if NotifyType <> cneObjChange then
    Exit;

  for i := 0 to TableChanges.Count - 1 do begin
    Memo.Lines.Add(TableChanges[i].TableName);

    if cnoAllRows in TableChanges[i].Operations then
      Continue;

    for j := 0 to TableChanges[i].RowChanges.Count - 1 do
      Memo.Lines.Add(TableChanges[i].RowChanges[j].RowId);
  end;
end;

For the best performance of change notification, the following guidelines are presented. Registered objects are few and mostly read-only and modifications to these objects are rather an exception than a rule. If the object is extremely volatile, then it will cause a large number of invalidation notifications to be sent, and potentially a lot of storage in the invalidation queue on the server. If there are frequent and a large numbers of notifications, the OLTP throughput can be slowed down due to the overhead of the notifications generation.It is also a good idea to keep the number of duplicate registrations on any given object low (ideally one) in order to avoid the same notification message being replicated to multiple recipients.

See Also

  • TOraDataSet.Options
  • TOraChangeNotification


Working with BLOB and CLOB Data Types

Working with BLOB and CLOB Data Types

ODAC components support Oracle 8 BLOB and CLOB data types. You can retrieve values of LOB fields using TOraQuery component the same way as you do for LONG or LONG RAW fields. The difference with usage of LOB data type becomes evident when you need to access these fields in SQL DML and PL/SQL statements.

For BLOB and CLOB data types only LOB locators (pointers to data) are stored in table columns; actual BLOB and CLOB data is stored in separate tablespace. This is the difference to the way that data of LONG or LONG RAW types is stored in database – tables hold their immediate values.

When accessing LOB column, it is the locator which is returned, not the value itself as in the case with LONG or LONG RAW data types.

For example consider this table definition.

CREATE TABLE ClobTable (
  Id NUMBER,
  Name VARCHAR2(30),
  Desc CLOB
)

To update Desc column of this table we need to create CLOB, get its locator, write CLOB data using this locator and excecute UPDATE statement to write the locator into the table field.

The following SQL statement can be used to update ClobTable:

UPDATE ClobTable
SET
  Name = :Name,
  Desc = EMPTY_CLOB()
WHERE
  Id = :Id
RETURNING
  Desc
INTO
  :Desc

You can use EMPTY_BLOB or EMPTY_CLOB Oracle function to create empty LOB. After executing this statement LOB locator is returned into Desc parameter. Then ODAC writes LOB data into database using this locator. You must set ParamType of Desc parameter to ptInput.

It is important for ODAC to use ParamType property of parameters in LOB operations. If ParamType is ptInput ODAC writes data to a server, if ParamType is ptOutput it reads data.

Another way to update ClobTable is using temporary LOB. Set TemporaryLobUpdate in TOraDataSet.Options to True. Then ODAC will create temporary LOB and write data to it before executing SQL statement.

When TemporaryLobUpdate option is True following statement can be used to update ClobTable:

UPDATE ClobTable
SET
  Name = :Name,
  Desc = :Desc
WHERE
  Id = :Id

ODAC will initialize Desc parameter with locator of temporary LOB before executing this statement.

TemporaryLobUpdate option should be set to True when calling stored procedure with IN or IN OUT LOB parameter. To call procedure:

CREATE OR REPLACE
PROCEDURE ClobTableUpdate (p_Id IN NUMBER, p_Name IN VARCHAR2,
                           p_Desc IN CLOB)
IS
BEGIN0
  UPDATE ClobTable
  SET
    Name = p_Name,
    Desc = p_Desc
  WHERE
    Id = p_Id;
END;

the following code can be used:

OraStroredProc.Options.TemporaryLobUpdate := True;
OraStroredProc.StoredProcName := 'ClobTableUpdate';
OraStroredProc.Prepare;
OraStroredProc.ParamByName('p_Id').AsInteger := Id;
OraStroredProc.ParamByName('p_Name').AsString := Name;
OraStroredProc.ParamByName('Desc').ParamType := ptInput;
OraStroredProc.ParamByName('Desc').AsOraClob.LoadFromFile(FileName);
OraStroredProc.Execute;

Note that LOB parameter can have ptInputOutput type only when TemporaryLobUpdate option is set toTrue. Otherwise the type of LOB parameter must be ptInput or ptOutput.

You can also use dtBlob and dtMemo datatypes with LOB parameters to write ordinary DML statements. In this case Oracle automatically converts LONG and LONG ROW values to CLOB or BLOB data.

It is possible to control the way LOB objects are handled while the application fetches records from the database. LOBs can be fetched either with other fields to the application or on demand.This is determined by DeferredLobRead option in TOraDataSet component. Setting TOraDataSet.Options.DeferredLobRead to false allows to reduce traffic over the network since LOBs are only transferred on demand and to use less memory on the client side because returned record sets do not hold contents of LOB fields.

For managing LOB compression, use P:Devart.Dac.TDADataSetOptions.CompressBlobMode. LOBs can be stored compressed on the client side, on the server side (in database) or on both sides. By default it has cbNone value, that means no compression is provided. Use cbClient value to store compressed LOBs on client side. This saves client memory. LOB data is stored unchanged in a database, other applications can read these LOBs as usual. If cbServer value is used, LOB data is stored compressed in the database. It's decompressed on the client side. This saves server disk space and network traffic. Other application can't process compressed LOB data as usual. To use compressed LOB data both on the client and server sides use cbClientServer value. To use cbClient, cbServer, cbClientServer and cbNone constants you should add the MemData unit to the uses clause.

Set TOraDataSet.Options.CacheLobs to False to access streamed LOB values on the server side without caching LOBs on the client side. Only requested portions of data are fetched in that case. Setting CacheBlobs to False may bring up the following benefits for time-critical applications: reduced traffic over the network since only required data are fetched, less memory is needed on the client side because LOB data is not cached on client side. This option doesn't make sense if DeferredLobRead is set to False because in that case all LOB values are fetched to the dataset.

Note: Internal compression functions are available in Borland Developer Studio 2006, Delphi 2005, Delphi 8 (for .NET) and Delphi 7. To use BLOB compression under Delphi 6, Delphi 5 and C++Builder you should use your own compression functions. To use them set CompressProc and UncompressProc variables declared in MemUtils unit.

type
  TCompressProc = function(dest: IntPtr; destLen: IntPtr;
  const source: IntPtr; sourceLen: longint): longint;
  TUncompressProc = function(dest: IntPtr; destlen: IntPtr;
  source: IntPtr; sourceLne: longint): longint;

var
  CompressProc: TCompressProc;
  UncompressProc: TUncompressProc;

You can compress and decompress a single LOB. To do it set the P:Devart.Dac.TCompressedBlob.Compressed property. Set it to True to compress LOB data and to False to decompress LOB data.

Note that using compression and decompression operations will raise CPU usage and can reduce application performance.

See Also

  • Oracle8 Application Developer's Guide - Large Objects (LOBs)
  • DBMS_LOB package
  • TOraLob
  • TDAParam.ParamType
  • TCustomDADataSet.Options
  • TOraDataSet.Options
  • BlobPic demo
  • Clob demo


Working with Unicode Character Data

Working with Unicode Character Data

Symbolic information in Oracle can be retrieved for the user as a different character encoding according to the query. Oracle supports a number of encoding formats including Unicode. ODAC components support UTF-16 Unicode encoding formats for data fields with OCI 8.0 or higher. Any character of any language can be represented in UTF-16.

ODAC allows to represent string data using string and WideString types. You can use TOraSession.UseUnicode property to enable this behaviour.This property value affects the description of queries and stored procedures. TOraSession.UseUnicode property does not influence the parameters' types that were set manually.

Suppose that SIMPLE_TYPES table is created as:

CREATE TABLE SIMPLE_TYPES (
  ID NUMBER(6) NOT NULL,
  F_CHAR CHAR(250),
  F_VARCHAR VARCHAR2(300),
  F_RAW RAW(250),
)

Suppose we open following SELECT statement in dataset

SELECT a.RowId, a.* FROM SIMPLE_TYPES a

If TOraSession.UseUnicode is set to False you get the next fields list after dataset open:

RowId:     TStringField
ID:        TIntegerField
F_CHAR:    TStringField
F_VARCHAR: TStringField
F_RAW:     TVarBytesField

When you set TOraSession.UseUnicode to True the string fields' type changes:

RowId:     TWideStringField
ID:        TIntegerField
F_CHAR:    TWideStringField
F_VARCHAR: TWideStringField
F_RAW:     TWideStringField

Fields of TWideStringField type hold rows in UTF-16 Unicode format. To get the value of the fields you can use TWideStringField.Value property. You can use FlatBuffers, LongString, FieldsAsString, RawAsString, TrimFixedChar options of TOraDataSet which are compatible with TOraSession.UseUnicode.

To use Unicode values as parameters previously you need to set the value of data type field to ftWideString or ftFixedWideChar for the fields of VARHAR or CHAR types accordingly. Otherwise after the execution of AsWideString or AsString operation data type field will be ftString by default.

var
  WS: WideString;
begin
...
  with OraQuery1 do begin
    Close;
    SQL.Text:=
      'SELECT * from SIMPLE_TYPES '+
      'WHERE '+
      '  F_CHAR = :F_CHAR';

    Params[0].DataType := ftFixedWideChar;
    Params[0].AsWideString := WS;
    Open;
...

If parameter has Unicode data type value, assigning value by using AsString property converts String to WideString. And vice versa, if parameter doesn't have Unicode data type value, assigning value by AsWideString property converts WideString into String.

Also Unicode encoding is supported for ROWID, NUMBER, INTERVAL, TIMESTAMP, RAW, CLOB.

CLOB data type supports string data in UTF-16 Unicode encoding. You can set TOraSession.UseUnicode property to True and get TMemoField of ftOraClob blob type. You can update CLOB field and set its value to Unicode string the following way:

var
  WS: WideString;
begin
...
  with OraQuery1 do begin
    SQL.Text:=
      'UPDATE ODAC_CLOB '+
      'SET '+
      '  Value = EMPTY_CLOB() '+
      'WHERE '+
      '    ID = :ID '+
      'RETURNING '+
      '  Value '+
      'INTO '+
      '  :Value ';
    ParamByName('ID').AsFloat:=1;
    ParamByName('Value').ParamType := ptInput;
    ParamByName('Value').AsCLOBLocator.IsUnicode := True;

    ParamByName('Value').AsCLOBLocator.Write(0, Length(WS)*2, PWideChar(WS));
    // or
    ParamByName('Value').AsWideString := WS;
    Execute;
...

See Also

  • TOraSession.Options
  • TOraDataSet.Options
  • TOraDataSet.OptionsDS


Working with Objects

Working with Objects

ODAC allows you to query and update columns of Oracle object type. You can access to attributes of object column as to fields of dataset using TDataSet.FieldByName or TDataSet.Fields. Dataset represents object attributes in two ways depending on the value of ObjectView property. If ObjectView is True attributes are stored hierarchically in the Fields property, that means any attributes of the object column are represented by child field of the object field and don't appear sequentially after the object field in the TFields.Fields array. When ObjectView is False, the attributes are stored sequentially in the Fields property, that means any child fields of the object field are stored after the object field as siblings in the Fields array.

For example we have such types and table

CREATE TYPE TAddress AS OBJECT (
  Country VARCHAR2(30),
  City VARCHAR2(30),
  Street VARCHAR2(30),
  Apartment NUMBER
);

CREATE TYPE TPerson AS OBJECT (
  Name VARCHAR2(30),
  Address TAddress,
  Phone VARCHAR2(20),
  BirthDate DATE
);

CREATE TABLE ODAC_Emp (
  Person TPerson,
  Job VARCHAR2(9),
  HireDate DATE,
  Sal NUMBER(7,2)
);

If you execute this query

SELECT * FROM ODAC_Emp

to learn the name of an employee you can write

Value:= Query.FieldByName('PERSON.NAME').AsString;

If ObjectView is True object column is represented by TADTField and to access the object attribute use child field by TADTField.Fields

Value:= TADTField(Query.FieldByName('PERSON')).
        Fields.FieldByName('NAME')).AsString;

Another way to get the value of an attribute is using TOraObject. Use TOraDataSet.GetObject method to get reference to the needed object.

So, the previous example may be rewritten this way

Value := Query.GetObject('PERSON').AttrAsString['NAME'];

Also ODAC supports object parameters. Use this feature when writing statements to update dataset rows. So, to insert a new row in ODAC_Emp table it is enough to assign this statement to SQLInsert property.

INSERT INTO ODAC_Emp
  (PERSON, JOB, HIREDATE, SAL)
VALUES
  (:PERSON, :JOB, : HIREDATE, :SAL)

To execute this INSERT statement only by TOraQuery or TOraSQL component use TOraParam.AsObject property to set attributes' value of PERSON parameter. But before you should assign dtObject to TOraParam.DataType property and allocate object handle by TOraParam.AllocObject method.

var
  OraSQL: TOraSQL;
. . .
  OraSQL.SQL.Text := 'INSERT INTO ODAC_Emp' +
                     '(PERSON, JOB, HIREDATE, SAL)' +
                     'VALUES (:PERSON, :JOB, : HIREDATE, :SAL)';

  with OraSQL.ParamByName('Person').AsObject do begin
    AllocObject(OraSession.OCISvcCtx, 'TPerson');
    AttrAsString['Name'] := 'JON';
    AttrAsString['Address.Country'] := 'USA';
    AttrAsString['Address.City'] := 'Boston';
    AttrAsInteger['Address.Apartment'] := 133;
    AttrAsDateTime['BirthDate'] := EncodeDate(1970, 7, 23);
  end;
  OraSQL.ParamByName('Job').AsString := 'MANAGER';
  OraSQL.ParamByName('HireDate').AsDateTime := EncodeDate(1998, 5, 14);
  OraSQL.ParamByName('Sal').AsInteger := 1700;
  OraSQL.Execute;

See Also

  • TOraObject
  • Object demo


Working with XMLTYPE Data Type

Working with XMLTYPE Data Type

Oracle 9i introduced a new data type, XMLTYPE, to facilitate native handling of XML data in the database. XMLTYPE has built-in member functions that operate on XML content. For example, you can use XMLTYPE functions to create, extract, and index XML datastored in Oracle 9i database. XMLTYPE data type can be used as the data type of columns in tables and views. XMLTYPE data type uses following storage methods:

  • Large objects (LOBs). LOB storage maintains content accuracy to the original XML (white spaces and all). Here the XML documents are stored composed as whole documents like files. XML stored as a whole document in the database and retrieve it as a whole document. You do not need to perform piece-wise updates on XML documents.
  • Structured storage (tables and views). Structured storage maintains DOM (Document Object Model) fidelity.

ODAC can work with fields of XMLTYPE data type. For example,suppose we have following table with XMLTYPE field:

CREATE TABLE xml_tab(
  ID NUMBER(10),
  XMLField XMLTYPE
)

After creating TOraQuery and execution of the next SELECT statement

SELECT * FROM xml_tab

TOraXMLField object will be created for XMLTYPE type which holds retrieved XML document. XMLTYPE fields are cached in ODAC on opening a table. Update of XMLTYPE fields will be posted to the server after the execution of corresponding DML query.

You can update or append XMLTYPE fields to the table the following way:

Edit; // or Insert, Append;
TOraXMLField(FieldByName('X')).AsXML.AsString :=
  '<root> <node1>v1</node1> <node2 name1=''222''>v2</node2> <node1>v3</node1> </root>';
Post;

Or you can write:

Edit; // or Insert, Append;
TOraXMLField(FieldByName('X')).AsString :=
  '<root> <node1>v1</node1> <node2 name1=''222''>v2</node2> <node1>v3</node1> </root>';
Post;

You can use TOraXMLField.AsXML property to get XMLTYPE document as an TOraXML object. Using this object you can query XMLTYPE data and extract its portions by calling TOraXML.Exists and TOraXML.Extract functions. Both these functions use a subset of the W3C XPath recommendation to navigate through the document. XMLTYPE uses the built-in Oracle XML parser and processor, and that's why it provides better performance and scalability when used inside the server. TOraXML.Transform function takes in XMLTYPE instance and XSLT stylesheet. It applies the stylesheet to the XML document and returns a transformed XML instance.

You can treat the XMLTYPE as a parameter in DML statements as shown below.

Close;
SQL.Text := 'UPDATE xml_tab SET  XMLField = :XMLField WHERE ID = 101';
with Params[0].AsXML do begin
  OCISvcCtx := OraSession1.OCISvcCtx;
  AsString := '<test></test>';
end;
Execute;

Or you can create the XMLTYPE value from TOraLob.

with Params[0].AsXML do begin
  OraLob := TOraLob.Create(OraSession1.OCISvcCtx);
  try
    OraLob.CreateTemporary(ltClob);
    OraLob.Write(0, Length('<test_lob></test_lob>'), PChar('<test_lob></test_lob>'));
    OraLob.WriteLob;
    AllocObject(OraSession1.OCISvcCtx, OraLob);
  finally
    OraLob.Free;
  end;
end;
Execute;

XML Schema is a schema definition language written in XML. It can be used to describe the structure and other various semantics of conforming instance documents. When using Oracle XML DB, you must first register your XML schema. Than you can use the XML schema URLs while creating XMLTYPE tables, columns, and views. You can use XML schema to declare which elements and attributes can be used and what kinds of element nesting, and data types are allowed in the XML documents that are being stored or processed. For example, user can create XML document based on the following schema, create table with XMLTYPE field and initialize the field value.

declare
doc varchar2(1000) :=
'<schema targetNamespace="http://www.oracle.com/PO.xsd"
  xmlns:po="http://www.oracle.com/PO.xsd"
  xmlns="http://www.w3.org/2001/XMLSchema">
  <complexType name="PurchaseOrderType">
    <sequence>
      <element name="PONum" type="decimal"/>
      <element name="Company">
        <simpleType>
          <restriction base="string">
            <maxLength value="100"/>
          </restriction>
        </simpleType>
      </element>
    </sequence>
  </complexType>
  <element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
  dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', doc);
end;
/
create table po_tab(
  id number,
  po sys.XMLTYPE
)

XMLTYPE column po
  XMLSCHEMA "http://www.oracle.com/PO.xsd"
  element "PurchaseOrder";

insert into po_tab values(
  1,
  XMLTYPE(
    '<PurchaseOrder xmlns="http://www.oracle.com/PO.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.oracle.com/PO.xsd">
      <PONum>1001</PONum>
      <Company>Oracle Corp</Company>
    </PurchaseOrder>'
  )
);

ODAC supports schema-based XML documents processing. You can open TOraQuery and get TOraXML object with schema-based document the same way as for LOB-based XMLTYPE. You can get value document calling TOraXMLField.AsString or TOraXML.AsString. Extract, Exists, Transform,
GetSchema, Validate, and IsSchemaBased functions of TOraXML are available for this XML document type.

with OraQuery1 do begin
  RetDoc := TOraXML.Create();
  RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
  try
    with TOraXMLField(FieldByName('XMLTYPE')).AsXML do begin
      GetSchema(RetDoc, SchemaURL, RootElem);
      Str := RetDoc.AsString;
    end;
  finally
    RetDoc.Free;
  end;
end;

See Also

  • TOraXML
    •

  • TOraXMLField
    •

  • TOraLob
    •


Working with VARRAY Data Type

Working with VARRAY Data Type

Everything considered in Working with objects is right for Arrays. Some problems appear when you need to use large arrays in dataset. As ODAC creates one field for each array item great number of TField objects are created. As a result the perfomance decreases. So ODAC has the limitation and creates fields for first 1000 items. However you can access all items with TOraArray object. Another way is to set TOraQuery.SparseArray to True and access array items by TArrayField object.

If such types are created

CREATE TYPE TODACArray1 AS VARRAY (5) OF NUMBER;

CREATE TYPE TODACArray2 AS VARRAY (4) OF CHAR(10);

CREATE TABLE ODAC_Array (
  Code NUMBER,
  Title VARCHAR2(10),
  Arr1 TODACArray1,
  Arr2 TODACArray2,
);

To access array items you can call FieldByName method. For example

Value := Query.FieldByName('Arr1[0]').AsInteger;

If ObjectField property is True this code is correct

Value := TArrayField(Query.FieldByName('Arr1')).Fields[0].AsInteger;

Using TOraDataSet.GetArray you can access array items through TOraArray object

Value:= Query.GetArray('Arr1').ItemAsInteger[0];

You can use VARRAY type for parameters of SQL and PL/SQL statements. You need to assign dtArray to TOraParam.DataType and use TOraParam.AsArray property to access array items.

For example:

var
  OraSQL: TOraSQL;
. . .
OraSQL.SQL.Text := 'INSERT INTO ODAC_Array (Code, Arr1, Arr2)' +
                   'VALUES (:Code, :Arr1, :Arr2)';

OraSQL.ParamByName('Code').AsInteger := 10;

with OraSQL.ParamByName('Arr1').AsArray do begin
  AllocObject(OraSession.OCISvcCtx, 'TODACArray1');
  ItemAsInteger[0] := 12;
  AttrAsInteger['[1]'] := 10;
  ItemAsInteger[3] := 133;
end;

with OraSQL. ParamByName('Arr2').AsArray do begin
  OCISvcCtx:= OraSession.OCISvcCtx;
  AllocObject('TODACArray2');
  AttrAsString['[2]']:= 'eeee';
  ItemAsString[0]:= 'FFFFF';
end;

OraSQL.Execute;

See Also

  • TOraArray
  • Array demo


Working with DML Array

Working with DML Array

Using of array binding feature can greatly speed up the execution of the application on insert or update big volume of data. The main advantage is that array binding allows you to execute several INSERT SQL statements with the different parameters at once. Note that you access server only once - that increases speed of update a lot.

The following is a sample of using DML Array.

The following table is used in this sample.

CREATE TABLE dept
(
  deptno NUMBER(2) CONSTRAINT pk_dept PRIMARY KEY,
  dname VARCHAR2(14),
  loc VARCHAR2(13)
);

At first, you should open a session:

  OraSession.UserName := 'scott';
  OraSession.Password := 'tiger';
  OraSession.Server := 'Ora';
  OraSession.Connect;

After that you should specify SQL statement for the execution:

  OraSQL.SQL.Text := 'INSERT INTO dept VALUES(:deptno_p, :dname_p, :loc_p)';

Colons in the SQL text mean parameters with the values which will be specified later.

Now you should specify parameter type for each parameter from the SQL text and the Length property of the parameters, which should be equal to the number of SQL statement executions.

  OraSQL.ParamByName('deptno_p').DataType := ftInteger;
  OraSQL.ParamByName('deptno_p').Length := 4;

  OraSQL.ParamByName('dname_p').DataType := ftString;
  OraSQL.ParamByName('dname_p').Length := 4;

  OraSQL.ParamByName('loc_p').DataType := ftString;
  OraSQL.ParamByName('loc_p').Length := 4;

You should call Prepare method before specifying values for the highest efficiency.

  OraSQL.Prepare;

Each item of the array must correspond to the single execution of the SQL statement.

  OraSQL.ParamByName('deptno_p').ItemAsInteger[1] := 10;
  OraSQL.ParamByName('dname_p').ItemAsString[1] := 'ACCOUNTING';
  OraSQL.ParamByName('loc_p').ItemAsString[1] := 'NEW YORK';

  OraSQL.ParamByName('deptno_p').ItemAsInteger[2] := 20;
  OraSQL.ParamByName('dname_p').ItemAsString[2] := 'RESEARCH';
  OraSQL.ParamByName('loc_p').ItemAsString[2] := 'DALLAS';

  OraSQL.ParamByName('deptno_p').ItemAsInteger[3] := 30;
  OraSQL.ParamByName('dname_p').ItemAsString[3] := 'SALES';
  OraSQL.ParamByName('loc_p').ItemAsString[3] := 'CHICAGO';

  OraSQL.ParamByName('deptno_p').ItemAsInteger[4] := 40;
  OraSQL.ParamByName('dname_p').ItemAsString[4] := 'OPERATIONS';
  OraSQL.ParamByName('loc_p').ItemAsString[4] := 'BOSTON';

After accomplishing previous steps you should call Execute method that assumes a parameter specifying how many times SQL statement will be executed. Note that the value of this method argument must be equal to the number of parameters value elements. Now you can execute SELECT * FROM Dept with any Oracle tool (you can use OraTools for this purpose) and see four new records appended.

  OraSQL.Execute(4);


Working with PL/SQL Tables

Working with PL/SQL Tables

ODAC allows you to use PL/SQL arrays known as PL/SQL Tables as parameters of anonymous PL/SQL blocks or as parameters of stored procedures. As ordinary arrays, PL/SQL arrays can be used for storing the same data accessible by index.

We will use standard Dept table in our sample. If you don't have this table at your database see SQL script at Demos\InstallDemoObjects.sql folder. Following sample demonstrates how to update several records from Dept table simultaneously using parameter of PL/SQL Table type.

Here is a PL/SQL block used in our sample:

DECLARE
  i INTEGER;
BEGIN
  i:= 1;
  FOR rec IN (SELECT DeptNo FROM Scott.Dept
    WHERE RowNum <= 10 ORDER BY DeptNo)
  LOOP
    UPDATE Scott.Dept
      SET DName = :NameArr(i)
      WHERE DeptNo = Rec.DeptNo;
    i:= i + 1;
  END LOOP;
END;

There is one parameter in the text of the sample PL/SQL block with NameArr name. It has PL/SQL Table type. This SQL updates DName field of Dept table with the values from NameArr array.

At first, you should open a session:

  OraSession.UserName := 'scott';
  OraSession.Password := 'tiger';
  OraSession.Server := 'Ora';
  OraSession.Connect;

After that you should specify SQL statement for the execution:

  OraSQL.SQL.Add('DECLARE');
  OraSQL.SQL.Add('  i INTEGER;');
  OraSQL.SQL.Add('BEGIN');
  OraSQL.SQL.Add('  i:= 1;');
  OraSQL.SQL.Add('  FOR rec IN (SELECT DeptNo FROM Scott.Dept');
  OraSQL.SQL.Add('    WHERE RowNum <= 10 ORDER BY DeptNo)');
  OraSQL.SQL.Add('  LOOP');
  OraSQL.SQL.Add('    UPDATE Scott.Dept');
  OraSQL.SQL.Add('      SET DName = :NameArr(i)');
  OraSQL.SQL.Add('      WHERE DeptNo = Rec.DeptNo;');
  OraSQL.SQL.Add('    i:= i + 1;');
  OraSQL.SQL.Add('  END LOOP;');
  OraSQL.SQL.Add('END;');

The NameArr parameter value should be specified later.

Then you need to specify that the parameter with NameArr name has PL/SQL Table type. To do it, you should set Table property to True and Length property of the parameter to the required value. If Dept table has four records, the size of the array also must be four.

  OraSQL.ParamByName('NameArr').Table := True;
  OraSQL.ParamByName('NameArr').DataType := ftString;
  OraSQL.ParamByName('NameArr').Length := 4;

After that you need to set values for the array items of NameArr parameter. The amount of array items must be equal to the value of Length property.

  OraSQL.ParamByName('NameArr').ItemAsString[1] := 'London';
  OraSQL.ParamByName('NameArr').ItemAsString[2] := 'Berlin';
  OraSQL.ParamByName('NameArr').ItemAsString[3] := 'Geneva';
  OraSQL.ParamByName('NameArr').ItemAsString[4] := 'Vienna';

Now you can execute SQL by calling Execute method of TOraSQL component.

  OraSQL.Execute;


Writing Oracle External Procedures with ODAC

Writing Oracle External Procedures with ODAC

External procedure is a procedure stored in a dynamic link library (DLL), or libunit in the case of a Java class method. Different programming languages can be used for external procedures creation - C, C++, Object Pascal, Java. External procedure can be called directly from PL/SQL and SQL. You can use ODAC components for writing external procedures for Oracle database. A small example of external procedure using ODAC components is listed below.

For example, let's create an external procedure that saves LOB to file and stores the file name and the file date in a database. Suppose we have the following table to store file names and dates:

CREATE TABLE scott.odac_file_list
(
  id integer PRIMARY KEY,
  file_name VARCHAR2(100),
  file_date TIMESTAMP
)

Let's create a DLL ExtProc containing our external procedure add_file.

All external procedures and functions in DLL must be listed in the library exports clause. Before calling any OCI functions in DLL InitOCI procedure must be called. When OCI is no longer needed FreeOCI procedure must be called.

In declaration of procedure add_file cdecl directive must be used. It is necessary to call OCIExtProcGetEnv function, that returns environment, service context and error handles. A call to OCIExtProcGetEnv function is required to make OCI callbacks to database.

Then we will create a data module with TOraSession and TOraQuery components. TOraSession component can be linked to external procedure service context by assigning service context pointer to OCISvcCtx property of TOraSession. After such assignment we can execute queries through OraSession.

An external procedure must not raise Delphi exceptions. All these exceptions must be processed inside the procedure and procedure can raise PL/SQL exceptions with OCIExtProcRaiseExcpWithMsg OCI function.

The source code of DLL, that contains add_file procedure is the following:

library ExtProc;

uses
  SysUtils,
  Classes,
  DB, Ora, OraCall, OraError, OraClasses,
  Data in 'Data.pas' {dmData: TDataModule};

{$R *.res}

procedure add_file(Context: pOCIExtProcContext; Id: pOCINumber;
  FileName: PChar; FileDate: pOCIDateTime; FileText: pOCILobLocator); cdecl;
var
  hEnv: pOCIEnv;
  hSvcCtx: pOCISvcCtx;
  hError: pOCIError;
  dmData: TdmData;
  OraLob: TOraLob;
begin
  try
    // get OCI service context
    Check(OCIExtProcGetEnv(Context, hEnv, hSvcCtx, hError));
    dmData := TdmData.Create(nil);
    try
      // set sevice context handle in OraSession
      dmData.OraSession.OCISvcCtx := hSvcCtx;
      with dmData.OraSQL do begin
        ParamByName('ID').DataType := TFieldType(ftNumber);
        ParamByName('ID').AsNumber.OCINumberPtr := Id;
        ParamByName('FILE_NAME').AsString := FileName;
        ParamByName('FILE_DATE').DataType := ftTimeStamp;
        ParamByName('FILE_DATE').AsTimeStamp.OCIDateTime := FileDate;
        Execute;
        OraLob := TOraLob.Create(hSvcCtx);
        try
          OraLob.OCILobLocator := FileText;
          OraLob.ReadLob;
          OraLob.SaveToFile(FileName);
        finally
          OraLob.Free;
        end;
      end;
    finally
      dmData.Free;
    end;
  except
    on e: EOraError do
      OCIExtProcRaiseExcpWithMsg(Context, e.ErrorCode, PChar(e.Message), Length(e.Message));
    on e: Exception do
      OCIExtProcRaiseExcpWithMsg(Context, 20000, PChar(e.Message), Length(e.Message));
  end;
end;

exports
  add_file;

begin
  // Load oci.dll and link OCI functions
  InitOCI;
end.

To use this external procedure compile the DLL and copy it to Oracle server. The DLL must be copied to ORACLE_HOME\bin (Windows) or ORACLE_HOME/lib (UNIX). See Oracle documentation about making the external procedures agent load external procedure libraries from other paths.

External procedures DLL must be defined with CREATE LIBRARY statement. In our ExternalProc Demo the library is created as follows:

CREATE OR REPLACE LIBRARY Scott.ExtProcDemo AS
 'C:\oracle\product\10.2.0\db_1\bin\ExtProc.dll'

Note: the path to the DLL passed to CREATE LIBRARY statement is case sensitive.

Then we define the external procedure:

CREATE PROCEDURE scott.add_file(
   id NUMBER,
   file_name VARCHAR2,
   file_date TIMESTAMP,
   file_text CLOB
  )
  AS LANGUAGE C
  NAME "add_file"
  LIBRARY scott.ExtProcDemo
  WITH CONTEXT
  PARAMETERS (CONTEXT, id OCINUMBER, file_name STRING, file_date OCIDATETIME, file_text OCILOBLOCATOR);

The "LANGUAGE C" option shows that it is an external procedure written in the language compatible with the C language call specification. The "NAME" option is the name of the procedure in the DLL. "WITH CONTEXT" option enables OCI callbacks to the database during an external procedure execution. That means an additional CONTEXT parameter is passed to the procedure. It allows the procedure to use a connection to the database.

Now the add_file procedure can be called from an SQL query.

Note to execute external procedures Oracle Net files listener.ora and tnsnames.ora must be configured for external procedures. See Oracle documentation about the configuration Oracle net for external procedures.

SeeAlso

  • ExternalProc demo


Transparent Application Failover Support

Transparent Application Failover Support

Transparent application failover (TAF) is the ability of applications to automatically reconnect to the database if the connection fails. If the server fails, the connection also fails. The next time the client tries to use the connection to execute a new SQL statement, for example, the operating system displays an error to the client. At this point, the user must log in to the database again. With TAF, however, Oracle automatically obtains a new connection to the database. This allows the user to continue to work using the new connection as if the original connection had never failed. If the client is not involved in a database transaction, then users may not notice the failure of the server. Because this reconnection happens automatically, the client application code may not need changes to use TAF. TAF automatically restores:

  • Client-Server Database Connections;
  • Users' Database Sessions;
  • Executing Commands;
  • Open Cursors Used for Fetching;
  • Active Transactions;
  • Server-Side Program Variables.

Unfortunately, TAF cannot automatically restore some session properties. If the application issued ALTER SESSION commands, then the application must reissue them after TAF processing is complete

Frequently failure of one instance and failover to another takes time. Because of this delay, you may want to inform users that failover is in progress. Additionally, the session on the initial instance may have received some ALTER SESSION commands. These will not be automatically reissued on the second instance. You may need to reissue these commands on the second instance.

To address such problems, you can use TOraSession.OnFailover event. The event is raised during the session recovery process when connection is lost. When connection failure is detected TOnFailover event is raised first time. Then application keeps raising it until connection is restored or user stops failover process.

Transparent Application Failover Restrictions:

  • All PL/SQL package states on the server are lost at failover.
  • ALTER SESSION statements are lost.
  • If failover occurs when a transaction is in process, then each subsequent call causes an error message until the user issues Rollback call. Then a success message is issued. Be sure to check this informational message to see if you must perform any additional operations.
  • Continuing work on failed over cursors may cause an error message.
  • If the first command after failover is not a SELECT statement or fetch operation, an error message results.
  • Failover only takes effect for Oracle 8.0 or higher.
  • At failover time, any queries in progress are reissued and processed again from the beginning. This may result in the next query taking a long time if the original query took a long time.

Preparing and Running the Sample

The tnsnames.ora file should be suitably modified for your database entry so that TAF tries to reconnect when the database connection is lost. The tnsnames.ora file is located in the <Oracle_Home>/network/Admin directory. Your database TNS entry should look like this :

<DBFAILOVER.US.ORACLE.COM> =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <myhostname>)(PORT = <1521>))
    )
    (CONNECT_DATA =
            (SERVICE_NAME = <dbfailover>)
      (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES=100)
      (DELAY=1))

    )
  )

where <Oracle_Home> is the directory where your database or SQL* Plus client is installed. Replace the values for the database parameters highlighted in bold with your database parameters.

Build and run the Query project from the ODAC demos. (Please ensure to perform the following steps). Set TOraSession.Options.UseOCI7 to False. Write TOraSession.OnFailover event as follows.

procedure TfmMain.OraSessionFailover(Sender: TObject;
  FailoverState: TFailoverState; FailoverType: TFailoverType;
  var Retry: Boolean);
begin
  case FailoverState of
    fsBegin: begin
      ShowMessage('Failover Begin');
      StatusBar1.Panels[0].Text := 'Trying to reconnect, Please wait...';
    end;
    fsAbort: begin
      ShowMessage('Failover Aborted');
      StatusBar1.Panels[0].Text := 'Failover Aborted';
    end;
    fsEnd:
      ShowMessage('Failover End');
    fsError: begin
      StatusBar1.Panels[0].Text := 'Failover Error. Retrying to connect ' +
        'to database. Please wait... ';
      Retry:=true;
    end;
    fsReauth: begin
      ShowMessage('Failover reauthenticating');
      StatusBar1.Panels[0].Text := 'Failover reauthenticating';
    end;
  else
    ShowMessage('Bad Failover');
    StatusBar1.Panels[0].Text := 'Bad Failover';
  end;
end;

When run, the sample shows a form with a blank data grid. The user should click "Open" button to start fetching the Dept table records.

For demonstrating TAF, user should restart the database from SQL* Plus using following command:

  • To login as a DBA user type
    SQL> Connect sys/<your_sys_password>@<Your_TNSName> as sysdba
  • To shutdown and restart database type
    SQL> startup force

After restarting the database, the user should return to the application and refresh the data by clicking "RefreshRecords". The Failover event is called and the Failover handler method displays the appropriate messages in a message box and in the status bar of application. The query will be executed again against the database using a new connection, data fetched and displayed in the data grid.

See Also

  • TOraSession.OnFailover


Working in an Unstable Network

Working in an Unstable Network
﻿

The following settings are recommended for working in an unstable network:

TCustomDAConnection.Options.LocalFailover = True
TCustomDAConnection.Options.DisconnectedMode = True
TDataSet.CachedUpdates = True
TCustomDADataSet.FetchAll = True
TCustomDADataSet.Options.LocalMasterDetail = True
AutoCommit = True

These settings minimize the number of requests to the server. Using TCustomDAConnection.Options.DisconnectedMode allows DataSet to work without an active connection. It minimizes server resource usage and reduces connection break probability. I. e. in this mode connection automatically closes if it is not required any more. But every explicit operation must be finished explicitly. That means each explicit connect must be followed by explicit disconnect. Read Working with Disconnected Mode topic for more information.

Setting the FetchAll property to True allows to fetch all data after cursor opening and to close connection. If you are using master/detail relationship, we recommend to set the LocalMasterDetail option to True.

It is not recommended to prepare queries explicitly. Use the CachedUpdates mode for DataSet data editing. Use the TCustomDADataSet.Options.UpdateBatchSize property to reduce the number of requests to the server.

If a connection breaks, a fatal error occurs, and the OnConnectionLost event will be raised if the following conditions are fulfilled:

  • There are no active transactions;
  • There are no opened and not fetched datasets;
  • There are no explicitly prepared datasets or SQLs.

If the user does not refuse suggested RetryMode parameter value (or does not use the OnConnectionLost event handler), ODAC can implicitly perform the following operations:

  Connect;
  DataSet.ApplyUpdates;
  DataSet.Open;

I.e. when the connection breaks, implicit reconnect is performed and the corresponding operation is reexecuted. We recommend to wrap other operations in transactions and fulfill their reexecuting yourself.

The using of Pooling in Disconnected Mode allows to speed up most of the operations because of connecting duration reducing.

See Also

  • FailOver demo
  • Working with Disconnected Mode
  • TCustomDAConnection.Options
  • TCustomDAConnection.Pooling


Working with Disconnected Mode

Working with Disconnected Mode

In disconnected mode a connection opens only when it is required. After performing all server calls connection closes automatically until next server call is required. Datasets remain opened when connection closes. Disconnected Mode may be useful for saving server resources and operating in an unstable or expensive network. Drawback of using disconnected mode is that each connection establishing requires some time for authorization. If connection is often closed and opened it can slow down application work. We recommend to use pooling to solve this problem. For additional information see TCustomDAConnection.Pooling.

To enable disconnected mode set TCustomDAConnection.Options.DisconnectedMode to True.

In disconnected mode a connection is opened for executing requests to the server (if it was not opened already) and is closed automatically if it is not required any more. If the connection was explicitly opened (the Connect method was called or the Connected property was explicitly set to True), it does not close until the Disonnect method is called or the Connected property is set to False explicitly.

The following settings are recommended to use for working in disconnected mode:

TDataSet.CachedUpdates = True
TCustomDADataSet.FetchAll = True
TCustomDADataSet.Options.LocalMasterDetail = True
AutoCommit = True

These settings minimize the number of requests to the server.

Disconnected mode features

If you perform a query with the FetchAll option set to True, connection closes when all data is fetched if it is not used by someone else. If the FetchAll option is set to false, connection does not close until all data blocks are fetched.

If explicit transaction was started, connection does not close until the transaction is committed or rolled back.

If the query was prepared explicitly, connection does not close until the query is unprepared or its SQL text is changed.

If dataset uses TCustomDADataSet.LockMode set to lmLockImmediate, connection opens when user starts to edit the record, and closes after user posts or cancels changes.

See Also

  • TCustomDAConnection.Options
  • FetchAll
  • Devart.Odac.TOraQuery.LockMode
  • TCustomDAConnection.Pooling
  • TCustomDAConnection.Connect
  • TCustomDAConnection.Disonnect
  • Connected
  • Working in unstable network


Increasing Performance

Increasing Performance

This topic considers basic stages of working with DataSet and ways to increase performance on each of these stages.

Connect

If your application performs Connect/Disconnect operations frequently, additional performance can be gained using pooling mode (TCustomDAConnection.Pooling = True). It reduces connection reopening time greatly (hundreds times). Such situation usually occurs in web applications.

Execute

If your application executes the same query several times, you can use the TCustomDADataSet.Prepare method or set the TDADataSetOptions.AutoPrepare property to increase performance. For example, it can be enabled for Detail dataset in Master/Detail relationship or for update objects in TDAUpdateSQL. The performance gain achieved this way can be anywhere from several percent to several times, depending on the situation.

To execute SQL statements a TOraSQL component is more preferable than TOraQuery. It can give several additional percents performance gain.

Using DML Array parameters, combined with query preparing can give a considerable performance gain. For example if you need to perform an insert query plenty of times, it is recommended to do it the following way to get the best performance. At first, set parameter data types, and then prepare the query. After that, set param Lengths and fill them with values. Finally, execute the query. For instance:

OraSQL1.ParamByName('Param1').DataType := ftInteger;
OraSQL1.Prepare;
OraSQL1.ParamByName('Param1').Param[0].Length := 1000;
for i := 1 to 1000
  OraSQL1.ParamByName('Param1').Param[0].ItemAsInteger[i] := 123;
OraSQL1.Execute;

If you execute many different SELECT statements, you can gain additional performance by setting the TOraSQL.StatementCache property to True. This feature is available only with Oracle 9.2i and higher. The TOraSession.Options.StatementCache property should be set to True to use this feature. But using the StatementCache property you may easy step over maximum open cursors on Oracle server. And thus you must be attentive when using this option.

If the TCustomDADataSet.Options.StrictUpdate option is set to False, the RowsAffected property is not calculated and becomes equal zero. This can improve performance of query executing, so if you need to execute many data updating statements at once and you don't mind affected rows count, set this option to False.

Fetch

In some situations you can increase performance a bit by using P:Devart.Dac.TDADataSetOptions.CompressBlobMode. Sometimes using TOraDataSet.Options.DeferredLobRead can give some additional performance, because Lobs will be read when they are required. You can also set TOraSession.Options.OptimizerMode to adjust the fetch performance.

Oracle optimizer can be tuned to increase performance of SQL statements executing and data fetching.

You can also tweak your application performance by using the following properties of TCustomDADataSet descendants:

  • FetchRows
  • Options.FlatBuffers
  • Options.LongStrings
  • UniDirectional

See the descriptions of these properties for more details and recommendations.

Navigate

The Locate function works faster when dataset is locally sorted on KeyFields fields. Local dataset sorting can be set with the IndexFieldNames property. Performance gain can be large if the dataset contains a large number of rows.

Lookup fields work faster when lookup dataset is locally sorted on lookup Keys.

Setting the TDADataSetOptions.CacheCalcFields property can improve performance when locally sorting and locating on calculated and lookup fields. It can be also useful when calculated field expressions contain complicated calculations.

Setting the TDADataSetOptions.LocalMasterDetail option can improve performance greatly by avoiding server requests on detail refreshes. Setting the TDADataSetOptions.DetailDelay option can be useful for avoiding detail refreshes when switching master DataSet records frequently.

Update

If your application updates datasets in the CachedUpdates mode, then setting the TCustomDADataSet.Options.UpdateBatchSize option to more than 1 can improve performance several hundred times more by reducing the number of requests to the server.

Specifying update SQL statements in a dataset improves performance because of omitting SQL statements generation and automatic preparation of internal updating datasets that are created for every kind of update SQL statements.

You can also increase the data sending performance a bit (several percents) by using Dataset.UpdateObject.ModifyObject, Dataset.UpdateObject, etc. Little additional performance improvement can be reached by setting the AutoPrepare property for these objects.

Insert

If you are about to insert a large number of records into a table, you should use the TDevart.Odac.TOraLoader component instead of Insert/Post methods, or execution of the INSERT commands multiple times in a cycle. Sometimes usage of TDevart.Odac.TOraLoader improves performance several times.


Using Connection Pooling

Using Connection Pooling

Connection pooling enables an application to use a connection from a pool of connections that do not need to be reestablished for each use. Once a connection has been created and placed in a pool, an application can reuse that connection without performing the complete connection process.

Using a pooled connection can result in significant performance gains, because applications can save the overhead involved in making a connection. This can be particularly significant for middle-tier applications that connect over a network or for applications that connect and disconnect repeatedly, such as Internet applications.

To use connection pooling set the Pooling property of the TCustomDAConnection component to True. Also you should set the PoolingOptions of the TCustomDAConnection. These options include MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime. Connections belong to the same pool if they have identical values for the following parameters: MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime, Server, Username, Password , TOraSession.Username, TOraSession.Server, TOraSession.ConnectMode, TOraSession.Options.UseOCI7 . When a connection component disconnects from the database the connection actually remains active and is placed into the pool. When this or another connection component connects to the database it takes a connection from the pool. Only when there are no connections in the pool, new connection is established.

ODAC connection pool is thread safe. Multiple threads of an application can connect to the database and disconnect from it using TCustomDAConnection components with pooling enabled at the same time. Connection pool uses the most optimal algorithms for fast and reliable work.

Connections in the pool are validated to make sure that a broken connection will not be returned for the TCustomDAConnection component when it connects to the database. The pool validates connection when it is placed to the pool (e. g. when the TCustomDAConnection component disconnects). If connection is broken it is not placed to the pool. Instead the pool frees this connection. Connections that are held in the pool are validated every 30 seconds. All broken connections are freed. If you set the PoolingOptions.Validate to True, a connection also will be validated when the TCustomDAConnection component connects and takes a connection from the pool. When some network problem occurs all connections to the database can be broken. Therefore the pool validates all connections before any of them will be used by a TCustomDAConnection component if a fatal error is detected on one connection.

The pool frees connections that are held in the pool during a long time. If no new connections are placed to the pool it becomes empty after approximately 4 minutes. This pool behaviour is intended to save resources when the count of connections in the pool exceeds the count that is needed by application. If you set the PoolingOptions.MinPoolSize property to a non-zero value, this prevents the pool from freeing all pooled connections. When connection count in the pool decreases to MinPoolSize value, remaining connection will not be freed except if they are broken.

The PoolingOptions.MaxPoolSize property limits the count of connections that can be active at the same time. If maximum count of connections is active and some TCustomDAConnection component tries to connect, it will have to wait until any of TCustomDAConnection components disconnect. Maximum wait time is 30 seconds. If active connections' count does not decrease during 30 seconds, the TCustomDAConnection component will not connect and an exception will be raised.

You can limit the time of connection's existence by setting the PoolingOptions.ConnectionLifeTime property. When the TCustomDAConnection component disconnects, its internal connection will be freed instead of placing to the pool if this connection is active during the time longer than the value of the PoolingOptions.ConnectionLifeTime property. This property is designed to make load balancing work with the connection pool.

To force freeing of a connection when the TCustomDAConnection component disconnects, the RemoveFromPool method of TCustomDAConnection can be used. You can also free all connection in the pool by using the class procedures Clear or AsyncClear of TOraConnectionPoolManager. These procedures can be useful when you know that all connections will be broken for some reason.

It is recommended to use connection pooling with the DisconnectMode option of the TCustomDAConnection component set to True. In this case internal connections can be shared between TCustomDAConnection components. When some operation is performed on the TCustomDAConnection component (for example, an execution of SQL statement) this component will connect using pooled connection and after performing operation it will disconnect. When an operation is performed on another TCustomDAConnection component it can use the same connection from the pool.

Also, ODAC supports proxy connection pooling. When proxy pooling is used, TOraSession components can connect to a database with different Username and Password properties but all connections in the pool use PoolingOptions.ProxyUsername and PoolingOptions.ProxyPassword. When connecting, TOraSession component creates a new connection. It uses Username, Password properties and a connection from the pool as a proxy connection. The proxy connection pool allows you to use a single pool for all sessions with different Username and Password properties.

You can use OCI connection pooling or MTS connection pooling. To use these types of pooling set the PoolingOptions.PoolType to ptOCI or ptMTS. In this case the pool is created and managed by the Oracle client or by MTS.

See Also

  • TCustomDAConnection.Pooling
  • TCustomDAConnection.PoolingOptions
  • TOraSession.PoolingOptions
  • Working with Disconnected Mode


Working with Macros

Working with Macros

Macros help you to change SQL statements dynamically. They allow partial replacement of the query statement by user-defined text. Macros are identified by their names which are then referred from SQL statement to replace their occurrences for associated values.

First step is to assign macros with their names and values to a dataset object.

Then modify SQL statement to include macro names into desired insertion points. Prefix each name with & ("at") sign to let ODAC discriminate them at parse time. Resolved SQL statement will hold macro values instead of their names but at the right places of their occurrences. For example, having the following statement with the TableName macro name:

SELECT * FROM &TableName

You may later assign any actual table name to the macro value property leaving your SQL statement intact.

Query1.SQL.Text := 'SELECT * FROM &TableName';
Query1.MacroByName('TableName').Value := 'Dept';
Query1.Open;

ODAC replaces all macro names with their values and sends SQL statement to the server when SQL execution is requested.

Note that there is a difference between using TMacro AsString and Value properties. If you set macro with the AsString property, it will be quoted. For example, the following statements will result in the same result Query1.SQL property value.

Query1.MacroByName('StringMacro').Value := '''A string''';
Query1.MacroByName('StringMacro').AsString := 'A string';

Macros can be especially useful in scripts that perform similar operations on different objects. You can use macros that will be replaced with an object name. It allows you to have the same script text and to change only macro values. For example, the following is a script that creates a new user account and grants required privileges.

Script1.SQL.Add('CREATE USER &Username IDENTIFIED BY &Password;');
Script1.SQL.Add('GRANT &Privileges TO &Username;');

To execute the script for another user you do not have to change the script SQL property, you can just set required macro values.

You may also consider using macros to construct adaptable conditions in WHERE clauses of your statements.

See Also

  • TMacro
  • TCustomDADataSet.MacroByName
  • TCustomDADataSet.Macros


Using Several DAC Products in One IDE

Using Several DAC Products in One IDE

UniDAC, ODAC, SDAC, MyDAC, IBDAC, and PgDAC components use common base packages (for Win32) and assemblies (for .NET) listed below:

Packages:

  • dacXX.bpl
  • dacvclXX.bpl
  • dcldacXX.bpl

Assemblies:

  • Devart.Dac.dll
  • Devart.Vcl.dll
  • Devart.Dac.Design.dll
  • Devart.Dac.AdoNet.dll

Note that product compatibility is provided for the current build only. In other words, if you upgrade one of the installed products, it may conflict with older builds of other products. In order to continue using the products simultaneously, you should upgrade all of them at the same time.


Working with DataSet Manager

Working with DataSet Manager

DataSet Manager window

The DataSet Manager window displays the datasets in your project. You can use the DataSet Manager window to create a user interface (consisting of data-bound controls) by dragging items from the window onto forms in your project. Each item has a drop-down control list where you can select the type of control to create prior to dragging it onto a form. You can customize the control list with additional controls, including the controls you have created.

Using the DataSet Manager window, you can:

  • Create forms that display data by dragging items from the DataSet Manager window onto forms.
  • Customize the list of controls available for each data type in the DataSet Manager window.
  • Choose which control should be created when dragging an item onto a form in your Windows application.
  • Create and delete TField objects in the DataSets of your project.

Opening the DataSet Manager window

You can display the DataSet Manager window by clicking DataSet Manager on the Tools menu. You can also use IDE desktop saving/loading to save DataSet Manager window position and restore it during the next IDE loads.

Observing project DataSets in the DataSet Manager Window

By default DataSet Manager shows DataSets of currently open forms. It can also extract DataSets from all forms in the project. To use this, click Extract DataSets from all forms in project button. This settings is remembered. Note, that using this mode can slow down opening of the large projects with plenty of forms and DataSets. Opening of such projects can be very slow in Borland Delphi 2005 and Borland Developer Studio 2006 and can take up to several tens of minutes.

DataSets can be grouped by form or connection. To change DataSet grouping click the Grouping mode button or click a down. You can also change grouping mode by selecting required mode from the DataSet Manager window popup menu.

Creating Data-bound Controls

You can drag an item from the DataSet Manager window onto a form to create a new data-bound control. Each node in the DataSet Manager window allows you to choose the type of control that will be created when you drag it onto a form. You must choose between a Grid layout, where all columns or properties are displayed in a TDataGrid component, or a Details layout, where all columns or properties are displayed in individual controls.

To use grid layout drag the dataset node on the form. By default TDataSource and TDBGrid components are created. You can choose the control to be created prior to dragging by selecting an item in the DataSet Manager window and choosing the control from the item's drop-down control list.

To use Details layout choose Details from the DataSet node drop-down control list in the DataSet Manager window. Then select required controls in the drop-down control list for each DataSet field. DataSet fields must be created. After setting required options you can drag the DataSet to the form from the DataSet wizard. DataSet Manager will create TDataSource component, and a component and a label for each field.

Adding custom controls to the DataSet Manager window

To add custom control to the list click the Options button on the DataSet Manager toolbar. A DataSet Manager - Customize controls dialog will appear. Using this dialog you can set controls for the DataSets and for the DataSet fields of different types. To do it, click DataSets node or the node of field of required type in DB objects groups box and use Add and Remove buttons to set required control list. You can also set default control by selecting it in the list of assigned DB controls and pressing Default button.

The default configuration can easily be restored by pressing Reset button in the DataSet Manager - Options dialog.

Working with TField objects

DataSet Manager allows you to create and remove TField objects. DataSet must be active to work with its fields in the DataSet Manager. You can add fields, based on the database table columns, create new fields, remove fields, use drag-n-drop to change fields order.

To create a field based on the database table column right-click the Fields node and select Create Field from the popup menu or press <Insert>. Note that after you add at least one field manually, DataSet fields corresponding to data fields will not be generated automatically when you drag the DataSet on the form, and you can not drag such fields on the form. To add all available fields right-click the Fields node and select Add all fields from the popup menu.

To create new field right-click the Fields node and select New Field from the popup menu or press <Ctrl+Insert>. The New Field dialog box will appear. Enter required values and press OK button.

To delete fields select these fields in the DataSet Manager window and press <Delete>.

DataSet Manager allows you to change view of the fields displayed in the main window. Open the Customize controls dialog, and jump to the Options page.

You can chose what information will be added to names of the Field and Data Field objects in the main window of DataSet Manager. Below you can see the example.


Using DBMonitor

Using DBMonitor

To extend monitoring capabilities of ODAC applications there is an additional tool called DBMonitor. It is provided as an alternative to Borland SQL Monitor which is also supported by ODAC.

DBMonitor is an easy-to-use tool to provide visual monitoring of your database applications.

DBMonitor has the following features:

  • multiple client processes tracing;
  • SQL event filtering (by sender objects);
  • SQL parameter and error tracing.

DBMonitor is intended to hamper an application being monitored as little as possible.

To trace your application with DB Monitor you should follow these steps:

  • drop TOraSQLMonitor component onto the form;
  • turn moDBMonitor option on;
  • set to True the Debug property for components you want to trace;
  • start DBMonitor before running your program.


Migration Wizard

Migration Wizard

BDE Migration Wizard allows you to convert your BDE projects to ODAC. This wizard replaces BDE components at the specified project (dfm-and pas-files) to ODAC.

To convert a project, perform the following steps.

  • Select BDE Migration Wizard from Oracle menu
  • Select Replace BDE components to replace corresponding components with ODAC and press the Next button.
  • Select the location of the files to search - current open project or disc folder.
  • If you have selected Disc folder on the previous step, specify the required folder and specify whether to process subfolders. Press the Next button.
  • Select whether to make backup (it is highly recommended to make a backup), backup location, and log parameters, and press the Next button. Default backup location is RBackup folder in your project folder.
  • Check your settings and press the Finish button to start the conversion operation.
  • The project should be saved before conversion. You will be asked before saving it. Click Yes to continue project conversion.

After the project conversion it will be reopened.

The Wizard just replaces all standard BDE components. Probably you will need to make some changes manually to compile your application successfully.

If some problems occur while making changes, you can restore your project from backup file. To do this perform the following steps.

  • Select BDE Migration Wizard from Oracle menu
  • Select Restore original files from backup and press the Next button.
  • Select the backup file. By default it is RExpert.reu file in RBackup folder of your converted project. Press the Next button.
  • Check your settings and press the Finish button to start the conversion operation.
  • Press Yes in the dialog that appeared.

Your project will be restored to its previous state.


Writing GUI Applications with ODAC

Writing GUI Applications with ODAC

Since version 3.80 ODAC GUI part is standalone. This means that to make GUI elements such as SQL cursors, connect form, connect dialog etc. available, you should explicitly include OdacVcl (OdacClx under Linux) unit in your application. This feature is needed for writing console applications.

Delphi and C++Builder

By default ODAC does not require Forms, Controls and other GUI related units. Only TConnectDialog, TOraErrorHandler and TOraAlerter components require the Forms unit according to their needs.

Kylix

By default ODAC does not require QT library. Only TOraErrorHandler and TOraAlerter components include QT-dependent code. In addition, SmartRefresh feature is disabled under Kylix. But having professional version this feature can be enabled by defining SMART_REFRESH macro for Linux in Odac.inc file. By default SMART_REFRESH macro is defined for Windows only. But be aware that SmartRefresh function requires QT.


Compatibility with Previous Versions

Compatibility with Previous Versions

We always try to keep ODAC compatible with previous versions, but sometimes we have to change the behaviour of ODAC in order to enhance its functionality, or avoid bugs. This topic describes such changes, and how to revert the old ODAC behaviour. We strongly recommend not to turn on the old behaviour of ODAC. Use options described below only if changes applied to ODAC crashed your existent application.

Values of the options described below should be assigned in the initialization section of one of the units in your project.

DBAccess.BaseSQLOldBehavior:

The BaseSQL property is similar to the SQL property, but it does not store changes made by AddWhere, DeleteWhere, and SetOrderBy methods. After assigning an SQL text and modifying it by one of these methods, all subsequent changes of the SQL property will not be reflected in the BaseSQL property. This behavior was changed in ODAC 5.55.1.26. To restore old behavior, set the BaseSQLOldBehavior variable to True.

DBAccess.SQLGeneratorCompatibility:

If the manually assigned RefreshSQL property contains only "WHERE" clause, ODAC uses the value of the BaseSQL property to complete the refresh SQL statement. In this situation all modifications applied to the SELECT query by functions AddWhere, DeleteWhere are not taken into account. This behavior was changed in ODAC 6.00.0.4. To restore the old behavior, set the BaseSQLOldBehavior variable to True.

MemDS.SendDataSetChangeEventAfterOpen:

Starting with ODAC 6.20.0.11, the DataSetChange event is sent after the dataset gets open. It was necessary to fix a problem with disappeared vertical scrollbar in some types of DB-aware grids. This problem appears only under Windows XP when visual styles are enabled.

To disable sending this event, change the value of this variable to False.

MemDS.DoNotRaiseExcetionOnUaFail:

Starting with ODAC 6.20.0.12, if the OnUpdateRecord event handler sets the UpdateAction parameter to uaFail, an exception is raised. The default value of UpdateAction is uaFail. So, the exception will be raised when the value of this parameter is left unchanged.

To restore the old behaviour, set DoNotRaiseExcetionOnUaFail to True.

Ora.OraQueryCompatibilityMode:

Before ODAC 6, TOraQuery could be editable only when InsertSQL, UpdateSQL, and DeleteSQL properties are assigned. The ability to generate update SQL statements with TOraQuery automatically was added in ODAC 6.00.0.4. Therefore, after upgrading your ODAC to the sixth version, all TOraQuery components in you project become editable, and can be modified by the end users. To restore the old behavior, set the OraQueryCompatibilityMode variable to True.


Working with Oracle Package Wizard

Working with Oracle Package Wizard

Oracle Package Wizard is designed for creating wrapper classes for PL/SQL Packages. It greatly simplifies working with types and stored procedures containing in PL/SQL Packages.

Oracle Package Wizard supports:

  • All native Oracle types.
  • PL/SQL tables of any simple data type except boolean.
  • PL/SQL records, including nested records.

To create a wrapper class, perform the following steps:

  1. Run Oracle Package Wizard from the Oracle menu.
  2. Assign properties to connect to your Oracle server.
  3. Choose the packages you want to be wrapped.

    Note that items with unsupported parameter types cannot be selected. They are grayed out.

  4. Select code generation options:

    Parameter type and method conventions

    Use Numbers - when this option is checked, Wizard maps Oracle numbers with the precision larger than 15 to ftNumber. Otherwise, they are mapped to ftFloat.
    Use Integers - when this option is enabled, Wizard maps Oracle numbers with the precision less than 10 to ftInteger. Otherwise, they are mapped to ftFloat or ftNumber.
    Use TimeStamps - when this option is enabled, Wizard maps Oracle timestamps to ftTimeStamp, ftTimeStampTZ, or ftTimeStampLTZ. Otherwise, timestamps are mapped to ftDateTime.
    Use DataSets - when this option is enabled, Wizard uses TOraDataSet parameters to return Orcale cursors. Otherwise TOraCursor parameters are used.
    Use Unicode - when this option is enabled, Wizard creates fields of the ftWideString data type. Otherwise, ftString is used.
    Use variants as parameters - when this option is enabled, variants are used for all simple parameter types.
    Generate overloaded methods - when this option is enabled, overloaded methods are created. Otherwise, overloaded subprograms are mapped to the methods with different suffixes (1, 2, 3 and so on).

    Identifier generation rules

    Unchangedcase, CapitalizedCase, lowercase, UPPERCASE - these alternative options define character case in identifier names.
    Remove underscores - when this option is enabled, Wizard removes underscores from generated identifiers.
    Prefix objects with T - when this option is enabled, generated class names are prefixed with 'T'.
    Prefix parameters with A - when this option is enabled, method parameters are prefixed with 'A'.

    Target environment

    Generate code for all versions of Delphi - when this option is enabled, generated code is compatible with the following Delphi versions: Delphi 5 - 7, 2005, Borland Developer Studio 2006, CodeGear Delphi 2007 for Win32. Otherwise, generated code will work surely only in the current version of Delphi.
    Generated code for - select Win32, CLR or Both to determine environments that generated code will be compatible with.

  5. Define files to be generated:
    • Select the target directory.
    • Specify the unit name.
    • Enable the "Add to project" option if you want to add the generated unit to the current project.
    • Enable the "Generate as components" option if you want to generate components registration code.
    • Choice the Component palette tab name that will be used for generating components registration code.
    • Enable the "Generate resources" option to generate resource files (*.res files for Win32 and *.bmp files for CLR). In case of a CLR code generation, you must specify the Images subdirectory name.

Press the Generate button to generate classes for selected packages.


Using OraDeveloper Tools

Using OraDeveloper Tools

This article provides basic information about OraDeveloper Tools. The article explains what OraDeveloper Tools is, where to download it, how to install it, and how to start using it. For more in-depth information about OraDeveloper Tools please refer to the product documentation.

Introduction

OraDeveloper Tools is a powerful IDE add-in designed to automate and simplify the Oracle database development process. It integrates into Visual Studio and Delphi, making all database development and administration tasks available from your favorite IDE. Using OraDeveloper Tools, you can:

  • Create, modify and delete database connections and easily navigate server-specific database schema information in tree view
  • Create, modify, and drop various database objects
  • View and edit table data with an intelligent grid-based editor
  • Edit SQL and PL/SQL code in a comfortable scripting environment with context-sensitive code completion, syntax highlighting, outlining, code navigation and code templates
  • Debug SQL scripts and PL/SQL programs
  • Open and save SQL documents
  • Create and execute SQL statements
  • Examine the SQL query execution plan
  • Visually design queries using Query Builder
  • Create and deploy Oracle database projects
  • Administrate Oracle security, sessions, and events
  • Easily export data, database objects, schemas and databases
  • Create new components by dragging items from Database Explorer
  • Take advantage of the extended integration functionality in ODAC component designers

Versions and Compatibility

OraDeveloper Tools is available in two editions.

  • OraDeveloper Tools for Visual Studio, which includes support for Visual Studio .NET 2003 and Visual Studio 2005
  • OraDeveloper Tools for Delphi, which includes support for Delphi 2005, BDS 2006, and Delphi 2007.

ODAC 6.00 and higher is compatible with OraDeveloper Tools for Delphi 2.00 and higher.

Related Products

Devart also offers a number of other database products, including OraDeveloper Studio, the standalone version of this Oracle development tool, and dbForge Fusion and dbForge Studio for MySQL, a parallel product line for MySQL.

You can find a full description of all the Devart database tools on the Devart web site.

Downloading and Installing

OraDeveloper Tools comes in separate installation packages for each supported IDE. If you have purchased ODAC Developer Edition, you are entitled to receive one free license for the full version of OraDeveloper Tools. Please consult your order confirmation email for instructions on how to download the installation package for the IDE you are using. Otherwise, you can purchase OraDeveloper Tools on the Devart website or download a free trial copy of the version you need from the OraDeveloper Tools download page.

Before installing OraDeveloper Tools, make sure that an older version of the software is not installed for the target IDE. Close all IDE instances, launch the downloaded installer, and follow the instructions of the wizard to install the product. Now upon launching the IDE, the OraDeveloper Tools logo should appear on the splash screen and a new OraDeveloper Tools toolbar should be added to the IDE interface.

Basic Usage Instructions

Working with database connections

To start using OraDeveloper Tools, you will need to establish a connection to the database you want to work with first. After a connection is established, you can open it to retrieve and manipulate the data provided.

In OraDeveloper Tools database connections are managed in a separate Database Explorer window. The Database Explorer window displays all available database connections at the top level of its tree hierarchy.

To add a database connection in the Database Explorer, complete the following steps.

  1. On the Database Explorer window toolbar, press the New Connection button or select the appropriate item from the popup menu.
  2. On the "Data Source" tab of the Database Connection Properties dialog box, choose a database server from the list.
  3. On the "Connection" tab of the Database Connection Properties dialog box, provide the main logon information required to connect to the server.
  4. On the "Parameter" tab of the Database Connection Properties dialog box, provide all the specific connection properties you need.
  5. Test the connection you have created by clicking the "Test Connection" button.
  6. Click OK to establish the database connection.

The Database Connection Properties dialog box will close, and a newly created database connection will appear at the top level of the tree, allowing you to access your Oracle database.

You can modify an existing database connection by right-clicking on its node in Database Explorer, and choosing "Modify Connection" from the node popup menu. In the Database Connection Properties dialog box that will appear, make any necessary changes to the connection properties. After you apply these changes by pressing OK, the database connection will close and reopen with the new parameters.

You can rename database connection using the in-place item editor of the Database Explorer tree view.

You can drop a database connection by choosing "Delete" from its node popup menu.

Displaying server-specific database schema information in tree view

After a database connection is created and opened, you can explore its database schema by navigating its hierarchy tree. Database Explorer allows you to view, edit, create and drop database objects for all connections. To modify or add an item to the database schema, right click on its node to display a popup menu with the available actions for this node.

If other users are modifying this database simultaneously, you can update the list of database objects displayed in the Database Explorer and their properties to reflect the latest changes by pressing the "Refresh" button.

Working with database objects

You can create database objects by using the Database Explorer popup menu or by pressing the"Create New Database Object" button on the OraDeveloper Tools toolbar.

To modify an object displayed in the Database Explorer tree, double click on its node to invoke its object editor. In OraDeveloper Tools, objects are represented as tabbed documents that appear in the main IDE editor space. Object editor documents have several interrelated views, and let you manually apply or cancel the changes you make.

An object's properties can also be viewed quickly in a separate Properties window by navigating to that object in the Database Explorer.

To drop a database object, select it and choose "Delete" from popup menu.

Working with database projects

You can use database projects to manage SQL scripts, query files, and database objects easily. Database projects let you to organize related scripts and queries and provide fast access to selected database objects. They can be created, compiled, and deployed.Some of the advanced benefits of using database projects include the possiblity to compile a collection of source objects, create a whole database from several scripts, and specify project deployment order automatically. Projects are an added feature of OraDeveloper Tools, and project folder and file structure, connection and database object links, deployment order are stored locally in a file with .oradev extension.

To create a new project select Tools | Devart Developer Tools | Oracle | New Blank Project.

To open an existing project, select Tools | Devart Developer Tools | Open Project ...

Each project can be associated with one connection. Project deployment and compilation are performed through this connection. To associate a connection with the project, right click on the connection in Database Explorer and select "Assign to project" from the popup menu.

To deploy a project perform the following steps.

  1. Select Tools | Devart Developer Tools | Project | Deployment Order.
  2. Specify the files which are to be executed by setting the proper check box. Use the "Select All" and "Deselect All" buttons, if necessary.
  3. Define the order of the files in the list using the "Move Up" and "Move Down" buttons or dragging the required files. The scripts will be executed in this order.
  4. Press "Okay" to apply changes and exit or "Cancel" to exit without applying the changes you have made.
  5. Select Tools | Devart Developer Tools | Project | Deploy.

To compile all the database source objects in a project, select Tools | Devart Developer Tools | Project | Compile or Tools | Devart Developer Tools | Project | Compile With Debug Info.

Creating and executing SQL statements and scripts with SQL editor

To execute an SQL statement or script, first open a new SQL document by clicking on the "Create New SQL Editor" button on the toolbar. Type your query or script in it, and click the "Execute SQL" button. Query results and any error messages will be redirected to the common Output window. You can view the datasets returned from SELECT queries in the Data tab (select Data from the View menu if this tab is not yet visible). Note that OraDeveloper Tools allows obtaining multiple result sets from SQL scripts.

Visually designing queries with the Query Builder

In an SQL document, you can switch to Design view to construct a query using Query Builder. In this mode you can create SELECT statements visually without using SQL. The Query Builder view is synchronized with the text view, and if you had a correct SELECT statement in the SQL editor, it is automatically inserted into the Query Builder. In the Query Builder you can drag and drop tables from the Database Explorer, use a special tabbed editor to setup JOIN statements easily, as well as WHERE, GROUP BY, HAVING and ORDER BY clauses.

Opening and saving SQL documents

You can save your SQL document at any time for future use. SQL editor documents are saved with extension "sql". Query Builder documents have extension "qry". When opened, Query Builder table controls restore their original position on the data diagram.

Examining the SQL query execution plan

One of the most important factors to worry about when developing SQL queries is query performance. With OraDeveloper Tools you can evaluate and optimize the performance of a critical query easily by inspecting it visually in Plan view. Just paste your query into an SQL document and switch to Plan view to see even the most complicated statements parsed by Oracle and presented in a tree with explanations of what every step in the plan does.

Viewing and editing data using grid based editor

The data of table and view objects can be edited in a grid-based data editor. This data editor is accessible from object's popup menu or from the Data view. When you open the editor, it is automatically filled with the data contained in the object. Here you can edit data directly in a grid format. To insert a new row, press the Ins key. To delete a row, select it and press Del. Changes are stored until you commit them; to apply changes made, press Enter, and to cancel all pending changes press Escape. To refresh data from table choose "Refresh" from the popup menu.

Creating new components by dragging items from Database Explorer

You automatically create new components that reference existing resources by selecting a connection, table, view, stored procedure or package object in the Database Explorer and dragging it onto a form designer. Then the IDE will create a new component that references the selected resource automatically.

Note Drag-n-drop support is not available for Delphi 2005.

Extended Integration Features with ODAC Component Editors

OraDeveloper Tools integrates with ODAC to give you a number of extended design-time benefits.

  • Drag-n-drop support for creating new components from some database objects
  • Easy selection of existing connections in TOraSession component
  • Added "Find", "Debug", "Edit SQL", "Query Builder", and "Retrieve Data" verbs to component popup menus
  • Standard SQL editor in all ODAC components with SQL field properties is replaced with the full-featured OraDeveloper Tools SQL editor, completed with code completion, syntax highlighting, outlining, and other functionality.

Complete Documentation

OraDeveloper Tools comes with comprehensive documentation that describes all aspects of the software usage and contains a number of walkthroughs and reference topics.

There are several ways to open this documentation:

  • Use the appropriate shortcut in Start menu, for instance, Start | Programs | Devart OraDeveloper Tools for Delphi 2006 | Documentation.
  • Use command from the IDE menu: Tools | Devart Database Developer Tools | Oracle | Help.
  • Focus on any OraDeveloper Tools window (for example, on the Database Explorer), and press F1.


Using OraTools Add-In

Using OraTools Add-In

To extend ODAC design-time capabilities there is an OraTools Add-in provided. It is an easy-to-use and versatile ODAC design-time extension to manipulate data and database objects of Oracle RDBMS. With OraTools Add-in you can build, execute, verify and optimize your SQL and PL/SQL statements, navigate and view properties of schema objects and debug stored procedures.

OraTools Add-in consists of four parts:

  • OraDesigner
    • OraExplorer
    • OraBuilder
    • OraDebugger

They are embedded in IDE and can be called from its main menu, component editors and component popup menus.

Sometimes when you install or upgrade OraTools Add-in or upgrade ODAC there is an error message during ODAC design-time packages initialization. It says: 'Current version of OraTools Add-in is incompatible with ODAC X.XX'. To solve this problem go to the OraTools Add-in directory and view Requirements section in ReadMe.txt. There you will find the lowest ODAC version compatible with current add-in version. Now if your current ODAC version number is lower than required by add-in you should upgrade ODAC and if current version is higher then upgrade OraTools Add-in. In rarer cases you may need to upgrade both products.


Reference

Reference

This page shortly describes units that exist in ODAC.

Units

Unit Name | Description
BDESession | Description is not available at the moment.
CRAccess | This unit contains base classes for accessing databases.
CRBatchMove | This unit contains implementation of the TCRBatchMove component.
DADump | This unit contains the base class for the TOraDump component.
DALoader | This unit contains the base class for the TOraLoader component.
DAScript | This unit contains the base class for the TOraScript component.
DASQLMonitor | This unit contains the base class for the TOraSQLMonitor component.
DB | Description is not available at the moment.
DBAccess | This unit contains base classes for most of the components.
DBMonitorIntf | Description is not available at the moment.
Devart.Dac.DataAdapter | This unit contains implementation of the DADataAdapter class.
Devart.Odac.DataAdapter | This unit contains implementation of the OraDataAdapter class.
MemData | This unit contains classes for storing data in memory.
MemDS | This unit contains implementation of the TMemDataSet class.
MemUtils | This unit contains auxiliary procedures and functions used in the DAC code.
OdacVcl | This unit contains the visual constituent of ODAC.
Ora | This unit contains main components of ODAC.
OraAlerter | This unit contains implementation of the TOraAlerter component.
OraAQ | This unit contains ODAC components for working with Oracle Advanced Queueing.
OraCall | Defines Oracle Call Interface routines.
OraClasses | OraClasses unit defines following data type constants: dtRowId dtCursor dtOraBlob dtOraClob dtBFILE dtCFILE dtLabel dtFixedChar dtUndefined dtTimeStamp dtTimeStampTZ dtTimeStampLTZ dtIntervalYM dtIntervalDS // obsolete dtBLOBLocator = dtOraBlob dtCLOBLocator = dtOraClob
OraConnectionPool | This unit contains the TOraConnectionPoolManager class for managing connection pool.
OraErrHand | This unit contains the TOraErrorHandler component.
OraError | Description is not available at the moment.
OraLoader | This unit contains implementation of the TOraLoader component.
OraObjects | This unit contains classes for Oracle OBJECT, ARRAY, TABLE and XMLTYPE data types.
OraPackage | This unit contains implementation of the TOraPackage component.
OraProvider | Description is not available at the moment.
OraScript | This unit contains implementation of the TOraScript component.
OraSmart | This unit contains the TSmartQuery and TOraTable components.
OraSQLMonitor | This unit contains implementation of the TOraSQLMonitor component.
OraTransaction | This unit contains implementation of the TOraTransaction component.
VirtualTable | This unit contains implementation of the TVirtualTable component.


Classes in BDESession

Classes in BDESession

Classes in the BDESession unit.

Classes

Name | Description
TBDESession | Allows integrating ODAC components into existing BDE-based applications without making separate connections.


TBDESession Class

TBDESession Class

Allows integrating ODAC components into existing BDE-based applications without making separate connections.

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

Unit

BDESession

Syntax

TBDESession = class(TOraSession);

Remarks

TBDESession allows you to integrate ODAC components into existing BDE-based applications without making separate connections. TBDESession derives its functionality from its ancestor TOraSession. Assign your TDatabase component name to the DatabaseName property, then call the Connect method to establish a TBDESession connection.

Note: TBDESession does not work with BDE version 5.11 or higher in the OCI8 call style. You may still use it with the OCI7 call style.To use it in such way set the BDE driver DLL32 option to 'SQLORA32.DLL'.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomConnection
TCustomDAConnection
TOraSession
TBDESession

See Also

  • TOraSession


TBDESession Members

TBDESession Members

TBDESession class overview.

Properties

Name | Description
AutoCommit (inherited from TOraSession) | Used to permit or prevent permanent updates, insertions, and deletions of data associated with the current transaction against the database server.
ConnectDialog (inherited from TCustomDAConnection) | Allows to link a TCustomConnectDialog component.
Connected (inherited from TOraSession) | Used to indicate if the database connection is active.
ConnectMode (inherited from TOraSession) | Used to specify the system privileges to use when a user connects to the server.
ConnectPrompt (inherited from TOraSession) | Used to supply a prompt for a name and password.
ConnectString (inherited from TOraSession) | Used to assign the TOraSession.Username, TOraSession.Password and TOraSession.Server properties at once.
ConvertEOL (inherited from TCustomDAConnection) | Allows customizing line breaks in string fields and parameters.
Database | Used to access properties, events, and methods of the database component associated with this TBDESession.
DatabaseName | Used to specify the name of the database to associate with this TBDESession component.
Debug (inherited from TOraSession) | Used to display SQL statements being executed with their parameter values and data types.
Home (inherited from TOraSession) | Not supported.
HomeName (inherited from TOraSession) | Used to select the Oracle client to use with the application.
InternalName (inherited from TOraSession) | Used to get or set the client database name that will be recorded when performing global transactions.
InTransaction (inherited from TCustomDAConnection) | Indicates whether the transaction is active.
LastError (inherited from TOraSession) | Used to get an error code which resulted from previous call to the OCI interface function.
LDA (inherited from TOraSession) | Provides a pointer to Oracle 7 login data area of the current connection.
LoginPrompt (inherited from TCustomDAConnection) | Specifies whether a login dialog appears immediately before opening a new connection.
OCICallStyle (inherited from TOraSession) | Indicates the set of OCI routines used.
OCISvcCtx (inherited from TOraSession) | Used to return Oracle 8 service context handle of the current connection.
Options (inherited from TOraSession) | Used to specify the behaviour of a TOraSession object.
OracleVersion (inherited from TOraSession) | Used to get Oracle server version number as string.
Password (inherited from TOraSession) | Used to specify a password for a connection.
Pooling (inherited from TCustomDAConnection) | Enables or disables using connection pool.
PoolingOptions (inherited from TOraSession) | Used to specify the behaviour of connection pool.
ProxySession (inherited from TOraSession) | Used to enable multiple user sessions within a single database session.
Schema (inherited from TOraSession) | Used to change the current schema of the session to the specified schema.
Server (inherited from TOraSession) | Contains the server name.
SessionName | Use the SessionName property to specify the session with which TBDESession component is associated.
SQL (inherited from TOraSession) | Uses embedded TOraSQL object to execute any SQL statement.
ThreadSafety (inherited from TOraSession) | Used to allow the usage of the OCI in multi-threaded environment.
Username (inherited from TOraSession) | Contains username.

Methods

Name | Description
ApplyUpdates (inherited from TCustomDAConnection) | Overloaded. Applies changes in datasets.
AssignConnect (inherited from TOraSession) | Shares database connection between the TOraSession components.
ChangePassword (inherited from TOraSession) | Cahnges the current user password for the session by a new one.
Commit (inherited from TCustomDAConnection) | Commits current transaction.
Connect (inherited from TCustomDAConnection) | Establishes a connection to the server.
CreateDataSet (inherited from TCustomDAConnection) | Creates a dataset component.
CreateSQL (inherited from TCustomDAConnection) | Creates a component for queries execution.
Disconnect (inherited from TCustomDAConnection) | Performs disconnect.
ExecProc (inherited from TCustomDAConnection) | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx (inherited from TCustomDAConnection) | Allows to execute a stored procedure or function.
ExecSQL (inherited from TCustomDAConnection) | Executes a SQL statement with parameters.
ExecSQLEx (inherited from TCustomDAConnection) | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames (inherited from TCustomDAConnection) | Returns a database list from the server.
GetSequenceNames (inherited from TOraSession) | Provides the names of available sequences.
GetStoredProcNames (inherited from TCustomDAConnection) | Returns a list of stored procedures from the server.
GetTableNames (inherited from TCustomDAConnection) | Provides a list of available tables names.
MonitorMessage (inherited from TCustomDAConnection) | Sends a specified message through the TCustomDASQLMonitor component.
ParamByName (inherited from TOraSession) | Provides access to OUT parameters and their values after processing SQL statement with ExecSQL or stored procedure with ExecProc.
Ping (inherited from TOraSession) | Checks whether the connection to the server can be established.
RemoveFromPool (inherited from TCustomDAConnection) | Marks the connection that should not be returned to the pool after disconnect.
Rollback (inherited from TCustomDAConnection) | Discards all current data changes and ends transaction.
RollbackToSavepoint (inherited from TOraSession) | Cancels all updates for the current transaction.
Savepoint (inherited from TOraSession) | Defines a point in the transaction to which you can roll back later.
StartTransaction (inherited from TOraSession) | Overloaded. Begins a new user transaction against the database server.

Events

Name | Description
OnConnectChange (inherited from TOraSession) | Occurs after Connected property was changed.
OnConnectionLost (inherited from TCustomDAConnection) | This event occurs when connection was lost.
OnError (inherited from TCustomDAConnection) | This event occurs when an error has arisen in the connection.
OnFailover (inherited from TOraSession) | Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover to another Oracle instance.


TBDESession Properties

TBDESession Properties

Properties of the TBDESession class.

For a complete list of the TBDESession class members, see the TBDESession Members topic.

Public

Name | Description
ApplyUpdates (inherited from TCustomDAConnection) | Overloaded. Applies changes in datasets.
AssignConnect (inherited from TOraSession) | Shares database connection between the TOraSession components.
ChangePassword (inherited from TOraSession) | Cahnges the current user password for the session by a new one.
Commit (inherited from TCustomDAConnection) | Commits current transaction.
Connect (inherited from TCustomDAConnection) | Establishes a connection to the server.
ConnectDialog (inherited from TCustomDAConnection) | Allows to link a TCustomConnectDialog component.
ConvertEOL (inherited from TCustomDAConnection) | Allows customizing line breaks in string fields and parameters.
CreateDataSet (inherited from TCustomDAConnection) | Creates a dataset component.
CreateSQL (inherited from TCustomDAConnection) | Creates a component for queries execution.
Database | Used to access properties, events, and methods of the database component associated with this TBDESession.
Disconnect (inherited from TCustomDAConnection) | Performs disconnect.
ExecProc (inherited from TCustomDAConnection) | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx (inherited from TCustomDAConnection) | Allows to execute a stored procedure or function.
ExecSQL (inherited from TCustomDAConnection) | Executes a SQL statement with parameters.
ExecSQLEx (inherited from TCustomDAConnection) | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames (inherited from TCustomDAConnection) | Returns a database list from the server.
GetSequenceNames (inherited from TOraSession) | Provides the names of available sequences.
GetStoredProcNames (inherited from TCustomDAConnection) | Returns a list of stored procedures from the server.
GetTableNames (inherited from TCustomDAConnection) | Provides a list of available tables names.
InternalName (inherited from TOraSession) | Used to get or set the client database name that will be recorded when performing global transactions.
InTransaction (inherited from TCustomDAConnection) | Indicates whether the transaction is active.
LastError (inherited from TOraSession) | Used to get an error code which resulted from previous call to the OCI interface function.
LDA (inherited from TOraSession) | Provides a pointer to Oracle 7 login data area of the current connection.
LoginPrompt (inherited from TCustomDAConnection) | Specifies whether a login dialog appears immediately before opening a new connection.
MonitorMessage (inherited from TCustomDAConnection) | Sends a specified message through the TCustomDASQLMonitor component.
OCICallStyle (inherited from TOraSession) | Indicates the set of OCI routines used.
OCISvcCtx (inherited from TOraSession) | Used to return Oracle 8 service context handle of the current connection.
OnConnectionLost (inherited from TCustomDAConnection) | This event occurs when connection was lost.
OnError (inherited from TCustomDAConnection) | This event occurs when an error has arisen in the connection.
OracleVersion (inherited from TOraSession) | Used to get Oracle server version number as string.
ParamByName (inherited from TOraSession) | Provides access to OUT parameters and their values after processing SQL statement with ExecSQL or stored procedure with ExecProc.
Ping (inherited from TOraSession) | Checks whether the connection to the server can be established.
Pooling (inherited from TCustomDAConnection) | Enables or disables using connection pool.
ProxySession (inherited from TOraSession) | Used to enable multiple user sessions within a single database session.
RemoveFromPool (inherited from TCustomDAConnection) | Marks the connection that should not be returned to the pool after disconnect.
Rollback (inherited from TCustomDAConnection) | Discards all current data changes and ends transaction.
RollbackToSavepoint (inherited from TOraSession) | Cancels all updates for the current transaction.
Savepoint (inherited from TOraSession) | Defines a point in the transaction to which you can roll back later.
SQL (inherited from TOraSession) | Uses embedded TOraSQL object to execute any SQL statement.
StartTransaction (inherited from TOraSession) | Overloaded. Begins a new user transaction against the database server.

Published

Name | Description
AutoCommit (inherited from TOraSession) | Used to permit or prevent permanent updates, insertions, and deletions of data associated with the current transaction against the database server.
Connected (inherited from TOraSession) | Used to indicate if the database connection is active.
ConnectMode (inherited from TOraSession) | Used to specify the system privileges to use when a user connects to the server.
ConnectPrompt (inherited from TOraSession) | Used to supply a prompt for a name and password.
ConnectString (inherited from TOraSession) | Used to assign the TOraSession.Username, TOraSession.Password and TOraSession.Server properties at once.
DatabaseName | Used to specify the name of the database to associate with this TBDESession component.
Debug (inherited from TOraSession) | Used to display SQL statements being executed with their parameter values and data types.
Home (inherited from TOraSession) | Not supported.
HomeName (inherited from TOraSession) | Used to select the Oracle client to use with the application.
OnConnectChange (inherited from TOraSession) | Occurs after Connected property was changed.
OnFailover (inherited from TOraSession) | Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover to another Oracle instance.
Options (inherited from TOraSession) | Used to specify the behaviour of a TOraSession object.
Password (inherited from TOraSession) | Used to specify a password for a connection.
PoolingOptions (inherited from TOraSession) | Used to specify the behaviour of connection pool.
Schema (inherited from TOraSession) | Used to change the current schema of the session to the specified schema.
Server (inherited from TOraSession) | Contains the server name.
SessionName | Use the SessionName property to specify the session with which TBDESession component is associated.
ThreadSafety (inherited from TOraSession) | Used to allow the usage of the OCI in multi-threaded environment.
Username (inherited from TOraSession) | Contains username.

See Also

  • TBDESession Class
  • TBDESession Class Members


TBDESession.Database Property

TBDESession.Database Property

Used to access properties, events, and methods of the database component associated with this TBDESession.

Class

TBDESession

Syntax

property Database: TDatabase;

Remarks

Use the Database property to access properties, events, and methods of the database component associated with this TBDESession. Database is a read-only property, that is set automatically when the database specified by the DatabaseName property is opened.


TBDESession.DatabaseName Property

TBDESession.DatabaseName Property

Used to specify the name of the database to associate with this TBDESession component.

Class

TBDESession

Syntax

property DatabaseName: string;

Remarks

Use the DatabaseName property to specify the name of the database to associate with this TBDESession component. DatabaseName should match the name of a database component used in the application.


TBDESession.SessionName Property

TBDESession.SessionName Property

Use the SessionName property to specify the session with which TBDESession component is associated.

Class

TBDESession

Syntax

property SessionName: string;

Remarks

Use the SessionName property to specify the session with which TBDESession component is associated. SessionName is set automatically to the name of the SessionName property of the database component with which a dataset component is associated. If SessionName is blank, a dataset component is automatically associated with the default session, Session.


CRAccess Unit Members

CRAccess Unit Members

This unit contains base classes for accessing databases.

Classes

Name | Description
TCRCursor | A base class for classes that work with database cursors.

Types

Name | Description
TBeforeFetchProc | This type is used for the TCustomDADataSet.BeforeFetch event.

Enumerations

Name | Description
TCRIsolationLevel | Specifies how to handle transactions containing database modifications.
TCRTransactionAction | Specifies the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.


Classes in CRAccess

Classes in CRAccess

Classes in the CRAccess unit.

Classes

Name | Description
TCRCursor | A base class for classes that work with database cursors.


TCRCursor Class

TCRCursor Class

A base class for classes that work with database cursors.

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

Unit

CRAccess

Syntax

TCRCursor = class(TSharedObject);

Remarks

TCRCursor is a base class for classes that work with database cursors.

Inheritance Hierarchy

TObject
TSharedObject
TCRCursor


TCRCursor Members

TCRCursor Members

TCRCursor class overview.

Properties

Name | Description
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.


Types in CRAccess

Types in CRAccess

Types in the CRAccess unit.

Types

Name | Description
TBeforeFetchProc | This type is used for the TCustomDADataSet.BeforeFetch event.


TBeforeFetchProc Procedure Reference

TBeforeFetchProc Procedure Reference

This type is used for the TCustomDADataSet.BeforeFetch event.

Unit

CRAccess

Syntax

TBeforeFetchProc = procedure (out Cancel: boolean) of object;

Parameters
Cancel
True, if the current fetch operation should be aborted.


Enumerations in CRAccess

Enumerations in CRAccess

Enumerations in the CRAccess unit.

Enumerations

Name | Description
TCRIsolationLevel | Specifies how to handle transactions containing database modifications.
TCRTransactionAction | Specifies the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.


TCRIsolationLevel Enumeration

TCRIsolationLevel Enumeration

Specifies how to handle transactions containing database modifications.

Unit

CRAccess

Syntax

TCRIsolationLevel = (ilReadCommitted);

Values

Value | Meaning
ilReadCommitted | The default transaction behavior. If the transaction contains DML that requires row locks held by another transaction, then the DML statement waits until the row locks are released.


TCRTransactionAction Enumeration

TCRTransactionAction Enumeration

Specifies the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.

Unit

CRAccess

Syntax

TCRTransactionAction = (taCommit, taRollback);

Values

Value | Meaning
taCommit | Transaction is committed.
taRollback | Transaction is rolled back.


CRBatchMove Unit Members

CRBatchMove Unit Members

This unit contains implementation of the TCRBatchMove component.

Classes

Name | Description
TCRBatchMove | Transfers records between datasets.

Types

Name | Description
TCRBatchMoveProgressEvent | This type is used for the TCRBatchMove.OnBatchMoveProgress event.

Enumerations

Name | Description
TCRBatchMode | Used to set the type of the batch operation that will be executed after calling the TCRBatchMove.Execute method.
TCRFieldMappingMode | Used to specify the way fields of the destination and source datasets will be mapped to each other if the TCRBatchMove.Mappings list is empty.


Classes in CRBatchMove

Classes in CRBatchMove

Classes in the CRBatchMove unit.

Classes

Name | Description
TCRBatchMove | Transfers records between datasets.


TCRBatchMove Class

TCRBatchMove Class

Transfers records between datasets.

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

Unit

CRBatchMove

Syntax

TCRBatchMove = class(TComponent);

Remarks

The TCRBatchMove component transfers records between datasets. Use it to copy dataset records to another dataset or to delete datasets records that match records in another dataset. The TCRBatchMove.Mode property determines the desired operation type, the TCRBatchMove.Source and TCRBatchMove.Destination properties indicate corresponding datasets.

Note: A TCRBatchMove component is added to the Data Access page of the component palette, not to the Oracle Access page.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCRBatchMove


TCRBatchMove Members

TCRBatchMove Members

TCRBatchMove class overview.

Properties

Name | Description
AbortOnKeyViol | Used to specify whether the batch operation should be terminated immediately after key or integrity violation.
AbortOnProblem | Used to specify whether the batch operation should be terminated immediately when it is necessary to truncate data to make it fit the specified Destination.
ChangedCount | Used to get the number of records changed in the destination dataset.
CommitCount | Used to set the number of records to be batch moved before commit occurs.
Destination | Used to specify the destination dataset for the batch operation.
FieldMappingMode | Used to specify the way fields of destination and source datasets will be mapped to each other if the TCRBatchMove.Mappings list is empty.
KeyViolCount | Used to get the number of records that could not be moved to or from the destination dataset because of integrity or key violations.
Mappings | Used to set field matching between source and destination datasets for the batch operation.
Mode | Used to set the type of the batch operation that will be executed after calling the TCRBatchMove.Execute method.
MovedCount | Used to get the number of records that were read from the source dataset during the batch operation.
ProblemCount | Used to get the number of records that could not be added to the destination dataset because of the field type mismatch.
RecordCount | Used to indicate the maximum number of records in the source dataset that will be applied to the destination dataset.
Source | Used to specify the source dataset for the batch operation.

Methods

Name | Description
Execute | Performs the batch operation.

Events

Name | Description
OnBatchMoveProgress | Occurs when providing feedback to the user about the batch operation in progress is needed.


TCRBatchMove Properties

TCRBatchMove Properties

Properties of the TCRBatchMove class.

For a complete list of the TCRBatchMove class members, see the TCRBatchMove Members topic.

Public

Name | Description
ChangedCount | Used to get the number of records changed in the destination dataset.
KeyViolCount | Used to get the number of records that could not be moved to or from the destination dataset because of integrity or key violations.
MovedCount | Used to get the number of records that were read from the source dataset during the batch operation.
ProblemCount | Used to get the number of records that could not be added to the destination dataset because of the field type mismatch.

Published

Name | Description
AbortOnKeyViol | Used to specify whether the batch operation should be terminated immediately after key or integrity violation.
AbortOnProblem | Used to specify whether the batch operation should be terminated immediately when it is necessary to truncate data to make it fit the specified Destination.
CommitCount | Used to set the number of records to be batch moved before commit occurs.
Destination | Used to specify the destination dataset for the batch operation.
FieldMappingMode | Used to specify the way fields of destination and source datasets will be mapped to each other if the TCRBatchMove.Mappings list is empty.
Mappings | Used to set field matching between source and destination datasets for the batch operation.
Mode | Used to set the type of the batch operation that will be executed after calling the TCRBatchMove.Execute method.
RecordCount | Used to indicate the maximum number of records in the source dataset that will be applied to the destination dataset.
Source | Used to specify the source dataset for the batch operation.

See Also

  • TCRBatchMove Class
  • TCRBatchMove Class Members


TCRBatchMove.AbortOnKeyViol Property

TCRBatchMove.AbortOnKeyViol Property

Used to specify whether the batch operation should be terminated immediately after key or integrity violation.

Class

TCRBatchMove

Syntax

property AbortOnKeyViol: boolean default True;

Remarks

Use the AbortOnKeyViol property to specify whether the batch operation is terminated immediately after key or integrity violation.


TCRBatchMove.AbortOnProblem Property

TCRBatchMove.AbortOnProblem Property

Used to specify whether the batch operation should be terminated immediately when it is necessary to truncate data to make it fit the specified Destination.

Class

TCRBatchMove

Syntax

property AbortOnProblem: boolean default True;

Remarks

Use the AbortOnProblem property to specify whether the batch operation is terminated immediately when it is necessary to truncate data to make it fit the specified Destination.


TCRBatchMove.ChangedCount Property

TCRBatchMove.ChangedCount Property

Used to get the number of records changed in the destination dataset.

Class

TCRBatchMove

Syntax

property ChangedCount: Longint;

Remarks

Use the ChangedCount property to get the number of records changed in the destination dataset. It shows the number of records that were updated in the bmUpdate or bmAppendUpdate mode or were deleted in the bmDelete mode.


TCRBatchMove.CommitCount Property

TCRBatchMove.CommitCount Property

Used to set the number of records to be batch moved before commit occurs.

Class

TCRBatchMove

Syntax

property CommitCount: integer default 0;

Remarks

Use the CommitCount property to set the number of records to be batch moved before the commit occurs. If it is set to 0, the operation will be chunked to the number of records to fit 32 Kb.


TCRBatchMove.Destination Property

TCRBatchMove.Destination Property

Used to specify the destination dataset for the batch operation.

Class

TCRBatchMove

Syntax

property Destination: TDataSet;

Remarks

Specifies the destination dataset for the batch operation.


TCRBatchMove.FieldMappingMode Property

TCRBatchMove.FieldMappingMode Property

Used to specify the way fields of destination and source datasets will be mapped to each other if the Mappings list is empty.

Class

TCRBatchMove

Syntax

property FieldMappingMode: TCRFieldMappingMode default mmFieldIndex;

Remarks

Specifies in what way fields of destination and source datasets will be mapped to each other if the Mappings list is empty.


TCRBatchMove.KeyViolCount Property

TCRBatchMove.KeyViolCount Property

Used to get the number of records that could not be moved to or from the destination dataset because of integrity or key violations.

Class

TCRBatchMove

Syntax

property KeyViolCount: Longint;

Remarks

Use the KeyViolCount property to get the number of records that could not be replaced, added, deleted from the destination dataset because of integrity or key violations.

If AbortOnKeyViol is True, then KeyViolCount will never exceed one, because the operation aborts when the integrity or key violation occurs.

See Also

  • AbortOnKeyViol


TCRBatchMove.Mappings Property

TCRBatchMove.Mappings Property

Used to set field matching between source and destination datasets for the batch operation.

Class

TCRBatchMove

Syntax

property Mappings: _TStrings;

Remarks

Use the Mappings property to set field matching between the source and destination datasets for the batch operation. By default fields matching is based on their position in the datasets. To map the column ColName in the source dataset to the column with the same name in the destination dataset, use:

ColName

Example

To map a column named SourceColName in the source dataset to the column named DestColName in the destination dataset, use:

DestColName=SourceColName


TCRBatchMove.Mode Property

TCRBatchMove.Mode Property

Used to set the type of the batch operation that will be executed after calling the Execute method.

Class

TCRBatchMove

Syntax

property Mode: TCRBatchMode default bmAppend;

Remarks

Use the Mode property to set the type of the batch operation that will be executed after calling the Execute method.


TCRBatchMove.MovedCount Property

TCRBatchMove.MovedCount Property

Used to get the number of records that were read from the source dataset during the batch operation.

Class

TCRBatchMove

Syntax

property MovedCount: Longint;

Remarks

Use the MovedCount property to get the number of records that were read from the source dataset during the batch operation. This number includes records that caused key or integrity violations or were trimmed.


TCRBatchMove.ProblemCount Property

TCRBatchMove.ProblemCount Property

Used to get the number of records that could not be added to the destination dataset because of the field type mismatch.

Class

TCRBatchMove

Syntax

property ProblemCount: Longint;

Remarks

Use the ProblemCount property to get the number of records that could not be added to the destination dataset because of the field type mismatch.

If AbortOnProblem is True, then ProblemCount will never exceed one, because the operation aborts when the problem occurs.

See Also

  • AbortOnProblem


TCRBatchMove.RecordCount Property

TCRBatchMove.RecordCount Property

Used to indicate the maximum number of records in the source dataset that will be applied to the destination dataset.

Class

TCRBatchMove

Syntax

property RecordCount: Longint default 0;

Remarks

Determines the maximum number of records in the source dataset, that will be applied to the destination dataset. If it is set to 0, all records in the source dataset will be applied to the destination dataset, starting from the first record. If RecordCount is greater than 0, up to the RecordCount records are applied to the destination dataset, starting from the current record in the source dataset. If RecordCount exceeds the number of records left in the source dataset, batch operation terminates after reaching last record.


TCRBatchMove.Source Property

TCRBatchMove.Source Property

Used to specify the source dataset for the batch operation.

Class

TCRBatchMove

Syntax

property Source: TDataSet;

Remarks

Specifies the source dataset for the batch operation.


TCRBatchMove Methods

TCRBatchMove Methods

Methods of the TCRBatchMove class.

For a complete list of the TCRBatchMove class members, see the TCRBatchMove Members topic.

Public

Name | Description
Execute | Performs the batch operation.

See Also

  • TCRBatchMove Class
  • TCRBatchMove Class Members


TCRBatchMove.Execute Method

TCRBatchMove.Execute Method

Performs the batch operation.

Class

TCRBatchMove

Syntax

procedure Execute;

Remarks

Call the Execute method to perform the batch operation.


TCRBatchMove Events

TCRBatchMove Events

Events of the TCRBatchMove class.

For a complete list of the TCRBatchMove class members, see the TCRBatchMove Members topic.

Published

Name | Description
OnBatchMoveProgress | Occurs when providing feedback to the user about the batch operation in progress is needed.

See Also

  • TCRBatchMove Class
  • TCRBatchMove Class Members


TCRBatchMove.OnBatchMoveProgress Event

TCRBatchMove.OnBatchMoveProgress Event

Occurs when providing feedback to the user about the batch operation in progress is needed.

Class

TCRBatchMove

Syntax

property OnBatchMoveProgress: TCRBatchMoveProgressEvent;

Remarks

Write the OnBatchMoveProgress event handler to provide feedback to the user about the batch operation progress.


Types in CRBatchMove

Types in CRBatchMove

Types in the CRBatchMove unit.

Types

Name | Description
TCRBatchMoveProgressEvent | This type is used for the TCRBatchMove.OnBatchMoveProgress event.


TCRBatchMoveProgressEvent Procedure Reference

TCRBatchMoveProgressEvent Procedure Reference

This type is used for the TCRBatchMove.OnBatchMoveProgress event.

Unit

CRBatchMove

Syntax

TCRBatchMoveProgressEvent = procedure (Sender: TObject; Percent: integer) of object;

Parameters
Sender
An object that raised the event.
Percent
Percentage of the batch operation progress.


Enumerations in CRBatchMove

Enumerations in CRBatchMove

Enumerations in the CRBatchMove unit.

Enumerations

Name | Description
TCRBatchMode | Used to set the type of the batch operation that will be executed after calling the TCRBatchMove.Execute method.
TCRFieldMappingMode | Used to specify the way fields of the destination and source datasets will be mapped to each other if the TCRBatchMove.Mappings list is empty.


TCRBatchMode Enumeration

TCRBatchMode Enumeration

Used to set the type of the batch operation that will be executed after calling the TCRBatchMove.Execute method.

Unit

CRBatchMove

Syntax

TCRBatchMode = (bmAppend, bmUpdate, bmAppendUpdate, bmDelete);

Values

Value | Meaning
bmAppend | Appends the records from the source dataset to the destination dataset. The default mode.
bmAppendUpdate | Replaces records in the destination dataset with the matching records from the source dataset. If there is no matching record in the destination dataset, the record will be appended to it.
bmDelete | Deletes records from the destination dataset if there are matching records in the source dataset.
bmUpdate | Replaces records in the destination dataset with the matching records from the source dataset.


TCRFieldMappingMode Enumeration

TCRFieldMappingMode Enumeration

Used to specify the way fields of the destination and source datasets will be mapped to each other if the TCRBatchMove.Mappings list is empty.

Unit

CRBatchMove

Syntax

TCRFieldMappingMode = (mmFieldIndex, mmFieldName);

Values

Value | Meaning
mmFieldIndex | Specifies that the fields of the destination dataset will be mapped to the fields of the source dataset by field index.
mmFieldName | Mapping is performed by field names.


DADump Unit Members

DADump Unit Members

This unit contains the base class for the TOraDump component.

Classes

Name | Description
TDADump | A base class that defines functionality for descendant classes that dump database objects to a script.
TDADumpOptions | This class allows setting up the behaviour of the TDADump class.

Types

Name | Description
TDABackupProgressEvent | This type is used for the TDADump.OnBackupProgress event.
TDARestoreProgressEvent | This type is used for the TDADump.OnRestoreProgress event.


Classes in DADump

Classes in DADump

Classes in the DADump unit.

Classes

Name | Description
TDADump | A base class that defines functionality for descendant classes that dump database objects to a script.
TDADumpOptions | This class allows setting up the behaviour of the TDADump class.


TDADump Class

TDADump Class

A base class that defines functionality for descendant classes that dump database objects to a script.

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

Unit

DADump

Syntax

TDADump = class(TComponent);

Remarks

TDADump is a base class that defines functionality for descendant classes that dump database objects to a script. Applications never use TDADump objects directly. Instead they use descendants of TDADump.

Use TDADump descedants to dump database objects, such as tables, stored procedures, and functions for backup or for transferring the data to another SQL server. The dump contains SQL statements to create the table or other database objects and/or populate the table.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDADump


TDADump Members

TDADump Members

TDADump class overview.

Properties

Name | Description
Connection | Used to specify a connection object that will be used to connect to a data store.
Debug | Used to display executing statement, all its parameters' values, and the type of parameters.
Options | Used to specify the behaviour of a TDADump component.
SQL | Used to set or get the dump script.
TableNames | Used to set the names of the tables to dump.

Methods

Name | Description
Backup | Dumps database objects to the TDADump.SQL property.
BackupQuery | Dumps the results of a particular query.
BackupToFile | Dumps database objects to the specified file.
BackupToStream | Dumps database objects to the stream.
Restore | Executes a script contained in the SQL property.
RestoreFromFile | Executes a script from a file.
RestoreFromStream | Executes a script received from the stream.

Events

Name | Description
OnBackupProgress | Occurs to indicate the TDADump.Backup, TDADump.BackupToFile or TDADump.BackupToStream method execution progress.
OnError | Occurs when Oracle raises some error on TDADump.Restore.
OnRestoreProgress | Occurs to indicate the TDADump.Restore, TDADump.RestoreFromFile, or TDADump.RestoreFromStream method execution progress.


TDADump Properties

TDADump Properties

Properties of the TDADump class.

For a complete list of the TDADump class members, see the TDADump Members topic.

Public

Name | Description
Connection | Used to specify a connection object that will be used to connect to a data store.
Options | Used to specify the behaviour of a TDADump component.

Published

Name | Description
Debug | Used to display executing statement, all its parameters' values, and the type of parameters.
SQL | Used to set or get the dump script.
TableNames | Used to set the names of the tables to dump.

See Also

  • TDADump Class
  • TDADump Class Members


TDADump.Connection Property

TDADump.Connection Property

Used to specify a connection object that will be used to connect to a data store.

Class

TDADump

Syntax

property Connection: TCustomDAConnection;

Remarks

Use the Connection property to specify a connection object that will be used to connect to a data store.

Set at design-time by selecting from the list of provided TCustomDAConnection or its descendant class objects.

At runtime, link an instance of a TCustomDAConnection descendant to the Connection property.

See Also

  • TCustomDAConnection


TDADump.Debug Property

TDADump.Debug Property

Used to display executing statement, all its parameters' values, and the type of parameters.

Class

TDADump

Syntax

property Debug: boolean default False;

Remarks

Used to display executing statement, all its parameters' values, and the type of parameters.

See Also

  • TCustomDADataSet.Debug
  • TCustomDASQL.Debug


TDADump.Options Property

TDADump.Options Property

Used to specify the behaviour of a TDADump component.

Class

TDADump

Syntax

property Options: TDADumpOptions;

Remarks

Use the Options property to specify the behaviour of a TDADump component.

Descriptions of all options are in the table below.

Option Name | Description
AddDrop | Used to add drop statements to a script before creating statements.
GenerateHeader | Used to add a comment header to a script.
QuoteNames | Used for TDADump to quote all database object names in generated SQL statements.


TDADump.SQL Property

TDADump.SQL Property

Used to set or get the dump script.

Class

TDADump

Syntax

property SQL: _TStrings;

Remarks

Use the SQL property to get or set the dump script. The SQL property stores script that is executed by the Restore method. This property will store the result of Backup and BackupQuery. At design time the SQL property can be edited by invoking the String List editor in Object Inspector.

See Also

  • Restore
  • Backup
  • BackupQuery


TDADump.TableNames Property

TDADump.TableNames Property

Used to set the names of the tables to dump.

Class

TDADump

Syntax

property TableNames: string;

Remarks

Use the TableNames property to set the names of the tables to dump. Table names must be separated with commas. If it is empty, the Backup method will dump all available tables.

See Also

  • Backup


TDADump Methods

TDADump Methods

Methods of the TDADump class.

For a complete list of the TDADump class members, see the TDADump Members topic.

Public

Name | Description
Backup | Dumps database objects to the TDADump.SQL property.
BackupQuery | Dumps the results of a particular query.
BackupToFile | Dumps database objects to the specified file.
BackupToStream | Dumps database objects to the stream.
Restore | Executes a script contained in the SQL property.
RestoreFromFile | Executes a script from a file.
RestoreFromStream | Executes a script received from the stream.

See Also

  • TDADump Class
  • TDADump Class Members


TDADump.Backup Method

TDADump.Backup Method

Dumps database objects to the SQL property.

Class

TDADump

Syntax

procedure Backup;

Remarks

Call the Backup method to dump database objects. The result script will be stored in the SQL property.

See Also

  • SQL
  • Restore
  • BackupToStream
  • BackupToFile
  • BackupQuery


TDADump.BackupQuery Method

TDADump.BackupQuery Method

Dumps the results of a particular query.

Class

TDADump

Syntax

procedure BackupQuery(const Query: string);

Parameters
Query
Holds a query used for data selection.

Remarks

Call the BackupQuery method to dump the results of a particular query. Query must be a valid select statement. If this query selects data from several tables, only data of the first table in the from list will be dumped.

See Also

  • Restore
  • BackupToStream
  • BackupToFile
  • Backup


TDADump.BackupToFile Method

TDADump.BackupToFile Method

Dumps database objects to the specified file.

Class

TDADump

Syntax

procedure BackupToFile(const FileName: string; const Query: string = '');

Parameters
FileName
Holds the file name to dump database objects to.

Remarks

Call the BackupToFile method to dump database objects to the specified file.

See Also

  • RestoreFromStream
  • Backup
  • BackupToFile


TDADump.BackupToStream Method

TDADump.BackupToStream Method

Dumps database objects to the stream.

Class

TDADump

Syntax

procedure BackupToStream(Stream: TStream; const Query: string = '');

Parameters
Stream
Holds the stream to dump database objects to.

Remarks

Call the BackupToStream method to dump database objects to the stream.

See Also

  • RestoreFromStream
  • Backup
  • BackupToFile


TDADump.Restore Method

TDADump.Restore Method

Executes a script contained in the SQL property.

Class

TDADump

Syntax

procedure Restore;

Remarks

Call the Restore method to execute a script contained in the SQL property.

See Also

  • RestoreFromFile
  • RestoreFromStream
  • Backup
  • SQL


TDADump.RestoreFromFile Method

TDADump.RestoreFromFile Method

Executes a script from a file.

Class

TDADump

Syntax

procedure RestoreFromFile(const FileName: string);

Parameters
FileName
Holds the file name to execute a script from.

Remarks

Call the RestoreFromFile method to execute a script from the specified file.

See Also

  • Restore
  • RestoreFromStream
  • BackupToFile


TDADump.RestoreFromStream Method

TDADump.RestoreFromStream Method

Executes a script received from the stream.

Class

TDADump

Syntax

procedure RestoreFromStream(Stream: TStream);

Parameters
Stream
Holds a stream to receive a script to be executed.

Remarks

Call the RestoreFromStream method to execute a script received from the stream.

See Also

  • Restore
  • RestoreFromFile
  • BackupToStream


TDADump Events

TDADump Events

Events of the TDADump class.

For a complete list of the TDADump class members, see the TDADump Members topic.

Published

Name | Description
OnBackupProgress | Occurs to indicate the TDADump.Backup, TDADump.BackupToFile or TDADump.BackupToStream method execution progress.
OnError | Occurs when Oracle raises some error on TDADump.Restore.
OnRestoreProgress | Occurs to indicate the TDADump.Restore, TDADump.RestoreFromFile, or TDADump.RestoreFromStream method execution progress.

See Also

  • TDADump Class
  • TDADump Class Members


TDADump.OnBackupProgress Event

TDADump.OnBackupProgress Event

Occurs to indicate the Backup, BackupToFile or BackupToStream method execution progress.

Class

TDADump

Syntax

property OnBackupProgress: TDABackupProgressEvent;

Remarks

The OnBackupProgress event occurs several times during the dumping process of the Backup, BackupToFile, or BackupToStream method execution and indicates its progress. ObjectName parameter indicates the name of the currently dumping database object. ObjectNum shows the number of the current database object in the backup queue starting from zero. ObjectCount shows the quantity of database objects to dump. Percent parameter shows the current percentage of the current table data dumped, not the current percentage of the entire dump process.

See Also

  • Backup
  • BackupToFile
  • BackupToStream


TDADump.OnError Event

TDADump.OnError Event

Occurs when Oracle raises some error on Restore.

Class

TDADump

Syntax

property OnError: TOnErrorEvent;

Remarks

The OnError event occurs when Oracle raises some error on Restore.

Action indicates the action to take when the OnError handler exits. On entry into the handler, Action is always set to eaException.

Note: You should add the DAScript module to the 'uses' list to use the OnError event handler.


TDADump.OnRestoreProgress Event

TDADump.OnRestoreProgress Event

Occurs to indicate the Restore, RestoreFromFile, or RestoreFromStream method execution progress.

Class

TDADump

Syntax

property OnRestoreProgress: TDARestoreProgressEvent;

Remarks

The OnRestoreProgress event occurs several times during the dumping process of the Restore, RestoreFromFile, or RestoreFromStream method execution and indicates its progress. The Percent parameter of the OnRestoreProgress event handler indicates the percentage of the whole restore script execution.

See Also

  • Restore
  • RestoreFromFile
  • RestoreFromStream


TDADumpOptions Class

TDADumpOptions Class

This class allows setting up the behaviour of the TDADump class.

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

Unit

DADump

Syntax

TDADumpOptions = class(TPersistent);

Inheritance Hierarchy

TObject
TPersistent
TDADumpOptions


TDADumpOptions Members

TDADumpOptions Members

TDADumpOptions class overview.

Properties

Name | Description
AddDrop | Used to add drop statements to a script before creating statements.
GenerateHeader | Used to add a comment header to a script.
QuoteNames | Used for TDADump to quote all database object names in generated SQL statements.


TDADumpOptions Properties

TDADumpOptions Properties

Properties of the TDADumpOptions class.

For a complete list of the TDADumpOptions class members, see the TDADumpOptions Members topic.

Published

Name | Description
AddDrop | Used to add drop statements to a script before creating statements.
GenerateHeader | Used to add a comment header to a script.
QuoteNames | Used for TDADump to quote all database object names in generated SQL statements.

See Also

  • TDADumpOptions Class
  • TDADumpOptions Class Members


TDADumpOptions.AddDrop Property

TDADumpOptions.AddDrop Property

Used to add drop statements to a script before creating statements.

Class

TDADumpOptions

Syntax

property AddDrop: boolean default True;

Remarks

Use the AddDrop property to add drop statements to a script before creating statements.


TDADumpOptions.GenerateHeader Property

TDADumpOptions.GenerateHeader Property

Used to add a comment header to a script.

Class

TDADumpOptions

Syntax

property GenerateHeader: boolean default True;

Remarks

Use the GenerateHeader property to add a comment header to a script. It contains script generation date, DAC version, and some other information.


TDADumpOptions.QuoteNames Property

TDADumpOptions.QuoteNames Property

Used for TDADump to quote all database object names in generated SQL statements.

Class

TDADumpOptions

Syntax

property QuoteNames: boolean default False;

Remarks

If the QuoteNames property is True, TDADump quotes all database object names in generated SQL statements.


Types in DADump

Types in DADump

Types in the DADump unit.

Types

Name | Description
TDABackupProgressEvent | This type is used for the TDADump.OnBackupProgress event.
TDARestoreProgressEvent | This type is used for the TDADump.OnRestoreProgress event.


TDABackupProgressEvent Procedure Reference

TDABackupProgressEvent Procedure Reference

This type is used for the TDADump.OnBackupProgress event.

Unit

DADump

Syntax

TDABackupProgressEvent = procedure (Sender: TObject; ObjectName: string; ObjectNum: integer; ObjectCount: integer; Percent: integer) of object;

Parameters
Sender
An object that raised the event.
ObjectName
The name of the currently dumping database object.
ObjectNum
The number of the current database object in the backup queue starting from zero.
ObjectCount
The quantity of database objects to dump.
Percent
The current percentage of the current table data dumped.


TDARestoreProgressEvent Procedure Reference

TDARestoreProgressEvent Procedure Reference

This type is used for the TDADump.OnRestoreProgress event.

Unit

DADump

Syntax

TDARestoreProgressEvent = procedure (Sender: TObject; Percent: integer) of object;

Parameters
Sender
An object that raised the event.
Percent
The percentage of the whole restore script execution.


DALoader Unit Members

DALoader Unit Members

This unit contains the base class for the TOraLoader component.

Classes

Name | Description
TDAColumn | Represents the attributes for column loading.
TDAColumns | Holds a collection of TDAColumn objects.
TDALoader | This class allows loading external data into database.

Types

Name | Description
TDAPutDataEvent | This type is used for the TDALoader.OnPutData event.
TGetColumnDataEvent | This type is used for the TDALoader.OnGetColumnData event.
TLoaderProgressEvent | This type is used for the TDALoader.OnProgress event.


Classes in DALoader

Classes in DALoader

Classes in the DALoader unit.

Classes

Name | Description
TDAColumn | Represents the attributes for column loading.
TDAColumns | Holds a collection of TDAColumn objects.
TDALoader | This class allows loading external data into database.


TDAColumn Class

TDAColumn Class

Represents the attributes for column loading.

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

Unit

DALoader

Syntax

TDAColumn = class(TCollectionItem);

Remarks

Each TDALoader uses TDAColumns to maintain a collection of TDAColumn objects. TDAColumn object represents the attributes for column loading. Every TDAColumn object corresponds to one of the table fields with the same name as its TDAColumn.Name property.

To create columns at design-time use the column editor of the TDALoader component.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TDAColumn

See Also

  • TDALoader
  • TDAColumns


TDAColumn Members

TDAColumn Members

TDAColumn class overview.

Properties

Name | Description
FieldType | Used to specify the types of values that will be loaded.
Name | Used to specify the field name of loading table.


TDAColumn Properties

TDAColumn Properties

Properties of the TDAColumn class.

For a complete list of the TDAColumn class members, see the TDAColumn Members topic.

Published

Name | Description
FieldType | Used to specify the types of values that will be loaded.
Name | Used to specify the field name of loading table.

See Also

  • TDAColumn Class
  • TDAColumn Class Members


TDAColumn.FieldType Property

TDAColumn.FieldType Property

Used to specify the types of values that will be loaded.

Class

TDAColumn

Syntax

property FieldType: TFieldType default ftString;

Remarks

Use the FieldType property to specify the types of values that will be loaded. Field types for columns may not match data types for the corresponding fields in the database table. TDALoader will cast data values to the types of their fields.


TDAColumn.Name Property

TDAColumn.Name Property

Used to specify the field name of loading table.

Class

TDAColumn

Syntax

property Name: string;

Remarks

Each TDAColumn corresponds to one field of the loading table. Use the Name property to specify the name of this field.

See Also

  • FieldType


TDAColumns Class

TDAColumns Class

Holds a collection of TDAColumn objects.

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

Unit

DALoader

Syntax

TDAColumns = class(TOwnedCollection);

Remarks

Each TDAColumns holds a collection of TDAColumn objects. TDAColumns maintains an index of the columns in its Items array. The Count property contains the number of columns in the collection. At design-time, use the Columns editor to add, remove, or modify columns.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TOwnedCollection
TDAColumns

See Also

  • TDALoader
  • TDAColumn


TDAColumns Members

TDAColumns Members

TDAColumns class overview.

Properties

Name | Description
Items | Used to access individual columns.


TDAColumns Properties

TDAColumns Properties

Properties of the TDAColumns class.

For a complete list of the TDAColumns class members, see the TDAColumns Members topic.

Public

Name | Description
Items | Used to access individual columns.

See Also

  • TDAColumns Class
  • TDAColumns Class Members


TDAColumns.Items Property(Indexer)

TDAColumns.Items Property(Indexer)

Used to access individual columns.

Class

TDAColumns

Syntax

property Items[Index: integer]: TDAColumn; default;

Parameters
Index
Holds the Index of TDAColumn to refer to.

Remarks

Use the Items property to access individual columns. The value of the Index parameter corresponds to the Index property of TDAColumn.

See Also

  • TDAColumn


TDALoader Class

TDALoader Class

This class allows loading external data into database.

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

Unit

DALoader

Syntax

TDALoader = class(TComponent);

Remarks

TDALoader allows loading external data into database. To specify the name of loading table set the TDALoader.TableName property. Use the TDALoader.Columns property to access individual columns. Write the TDALoader.OnGetColumnData or TDALoader.OnPutData event handlers to read external data and pass it to the database. Call the TDALoader.Load method to start loading data.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDALoader

See Also

  • Working with TOraLoader Component
  • TOraLoader


TDALoader Members

TDALoader Members

TDALoader class overview.

Properties

Name | Description
Columns | Used to add a TDAColumn object for each field that will be loaded.
Connection | Used to specify TCustomDAConnection in which TDALoader will be executed.
TableName | Used to specify the name of the table to which data will be loaded.

Methods

Name | Description
CreateColumns | Creates TDAColumn objects for all fields of the table with the same name as TDALoader.TableName.
Load | Starts loading data.
LoadFromDataSet | Loads data from the specified dataset.
PutColumnData | Overloaded. Puts the value of individual columns.

Events

Name | Description
OnGetColumnData | Occurs when it is needed to put column values.
OnProgress | Occurs if handling data loading progress of the TDALoader.LoadFromDataSet method is needed.
OnPutData | Occurs when putting loading data by rows is needed.


TDALoader Properties

TDALoader Properties

Properties of the TDALoader class.

For a complete list of the TDALoader class members, see the TDALoader Members topic.

Public

Name | Description
Columns | Used to add a TDAColumn object for each field that will be loaded.
Connection | Used to specify TCustomDAConnection in which TDALoader will be executed.
TableName | Used to specify the name of the table to which data will be loaded.

See Also

  • TDALoader Class
  • TDALoader Class Members


TDALoader.Columns Property

TDALoader.Columns Property

Used to add a TDAColumn object for each field that will be loaded.

Class

TDALoader

Syntax

property Columns: TDAColumns stored IsColumnsStored;

Remarks

Use the Columns property to add a TDAColumn object for each field that will be loaded.

See Also

  • TDAColumns


TDALoader.Connection Property

TDALoader.Connection Property

Used to specify TCustomDAConnection in which TDALoader will be executed.

Class

TDALoader

Syntax

property Connection: TCustomDAConnection;

Remarks

Use the Connection property to specify TCustomDAConnection in which TDALoader will be executed. If Connection is not connected, the Load method calls TCustomDAConnection.Connect.

See Also

  • TCustomDAConnection


TDALoader.TableName Property

TDALoader.TableName Property

Used to specify the name of the table to which data will be loaded.

Class

TDALoader

Syntax

property TableName: string;

Remarks

Set the TableName property to specify the name of the table to which data will be loaded. Add TDAColumn objects to Columns for the fields that are needed to be loaded.

See Also

  • TDAColumn
  • TCustomDAConnection.GetTableNames


TDALoader Methods

TDALoader Methods

Methods of the TDALoader class.

For a complete list of the TDALoader class members, see the TDALoader Members topic.

Public

Name | Description
CreateColumns | Creates TDAColumn objects for all fields of the table with the same name as TDALoader.TableName.
Load | Starts loading data.
LoadFromDataSet | Loads data from the specified dataset.
PutColumnData | Overloaded. Puts the value of individual columns.

See Also

  • TDALoader Class
  • TDALoader Class Members


TDALoader.CreateColumns Method

TDALoader.CreateColumns Method

Creates TDAColumn objects for all fields of the table with the same name as TableName.

Class

TDALoader

Syntax

procedure CreateColumns;

Remarks

Call the CreateColumns method to create TDAColumn objects for all fields of the table with the same name as TableName. If columns were created before, they will be recreated. You can call CreateColumns from the component popup menu at design-time. After you can customize column loading by setting properties of TDAColumn objects.

See Also

  • TDAColumn
  • TableName


TDALoader.Load Method

TDALoader.Load Method

Starts loading data.

Class

TDALoader

Syntax

procedure Load; virtual;

Remarks

Call the Load method to start loading data. At first it is necessary to create columns and write one of the OnPutData or OnGetColumnData event handlers.

See Also

  • OnGetColumnData
  • OnPutData


TDALoader.LoadFromDataSet Method

TDALoader.LoadFromDataSet Method

Loads data from the specified dataset.

Class

TDALoader

Syntax

procedure LoadFromDataSet(DataSet: TDataSet);

Parameters
DataSet
Holds the dataset to load data from.

Remarks

Call the LoadFromDataSet method to load data from the specified dataset. There is no need to create columns and write event handlers for OnPutData and OnGetColumnData before calling this method.


TDALoader.PutColumnData Overload

TDALoader.PutColumnData Overload

Puts the value of individual columns.

Class

TDALoader

Overload List

Name | Description
PutColumnData(Col: integer; Row: integer; const Value: variant) | Puts the value of individual columns by the column index.
PutColumnData(const ColName: string; Row: integer; const Value: variant) | Puts the value of individual columns by the column name.


TDALoader.PutColumnData Method

TDALoader.PutColumnData Method

Puts the value of individual columns by the column index.

Class

TDALoader

Syntax

procedure PutColumnData(Col: integer; Row: integer; const Value: variant); overload; virtual

Parameters
Col
Holds the index of a loading column. The first column has index 0.
Row
Holds the number of loading row. Row starts from 1.
Value
Holds the column value.

Remarks

Call the PutColumnData method to put the value of individual columns. PutColumnData can be only called from the OnPutData event handler. The Col parameter indicates the index of loading column. The first column has index 0. The Row parameter indicates the number of the loading row. Row starts from 1.

This overloaded method works faster because it searches the right index by its index, not by the index name.

The value of a column should be assigned to the Value parameter.

See Also

  • TDALoader.OnPutData


TDALoader.PutColumnData Method

TDALoader.PutColumnData Method

Puts the value of individual columns by the column name.

Class

TDALoader

Syntax

procedure PutColumnData(const ColName: string; Row: integer; const Value: variant); overload

Parameters
ColName
Hods the name of a loading column.
Row
Holds the number of loading row. Row starts from 1.
Value
Holds the column value.


TDALoader Events

TDALoader Events

Events of the TDALoader class.

For a complete list of the TDALoader class members, see the TDALoader Members topic.

Public

Name | Description
OnGetColumnData | Occurs when it is needed to put column values.
OnProgress | Occurs if handling data loading progress of the TDALoader.LoadFromDataSet method is needed.
OnPutData | Occurs when putting loading data by rows is needed.

See Also

  • TDALoader Class
  • TDALoader Class Members


TDALoader.OnGetColumnData Event

TDALoader.OnGetColumnData Event

Occurs when it is needed to put column values.

Class

TDALoader

Syntax

property OnGetColumnData: TGetColumnDataEvent;

Remarks

Write the OnGetColumnData event handler to put column values. TDALoader calls the OnGetColumnData event handler for each column in the loop. Column points to a TDAColumn object that corresponds to the current loading column. Use its Name or Index property to identify what column is loading. The Row parameter indicates the current loading record. TDALoader increments the Row parameter when all the columns of the current record are loaded. The first row is 1. Set EOF to True to stop data loading. Fill the Value parameter by column values. To start loading call the Load method.

Another way to load data is using the OnPutData event.

Example

This handler loads 1000 rows.

procedure TfmMain.GetColumnData(Sender: TObject;
   Column: TDAColumn; Row: Integer; var Value: Variant;
   var EOF: Boolean);
begin
   if Row <= 1000 then begin
      case Column.Index of
         0: Value := Row;
         1: Value := Random(100);
         2: Value := Random*100;
         3: Value := 'abc01234567890123456789';
         4: Value := Date;
      else
         Value := Null;
      end;
   end
   else
      EOF := True;
end;

See Also

  • OnPutData
  • Load


TDALoader.OnProgress Event

TDALoader.OnProgress Event

Occurs if handling data loading progress of the LoadFromDataSet method is needed.

Class

TDALoader

Syntax

property OnProgress: TLoaderProgressEvent;

Remarks

Add a handler to this event if you want to handle data loading progress of the LoadFromDataSet method.

See Also

  • LoadFromDataSet


TDALoader.OnPutData Event

TDALoader.OnPutData Event

Occurs when putting loading data by rows is needed.

Class

TDALoader

Syntax

property OnPutData: TDAPutDataEvent;

Remarks

Write the OnPutData event handler to put loading data by rows.

Note that rows should be loaded from the first in the ascending order.

To start loading, call the Load method. It is more effective way to load data in comparison with using OnGetColumnData. The OnPutData event handler must send column data by the TDALoader.PutColumnData method. TDALoader will flush data to Oracle when it is needed.


Types in DALoader

Types in DALoader

Types in the DALoader unit.

Types

Name | Description
TDAPutDataEvent | This type is used for the TDALoader.OnPutData event.
TGetColumnDataEvent | This type is used for the TDALoader.OnGetColumnData event.
TLoaderProgressEvent | This type is used for the TDALoader.OnProgress event.


TDAPutDataEvent Procedure Reference

TDAPutDataEvent Procedure Reference

This type is used for the TDALoader.OnPutData event.

Unit

DALoader

Syntax

TDAPutDataEvent = procedure (Sender: TDALoader) of object;

Parameters
Sender
An object that raised the event.


TGetColumnDataEvent Procedure Reference

TGetColumnDataEvent Procedure Reference

This type is used for the TDALoader.OnGetColumnData event.

Unit

DALoader

Syntax

TGetColumnDataEvent = procedure (Sender: TObject; Column: TDAColumn; Row: integer; var Value: variant; var IsEOF: boolean) of object;

Parameters
Sender
An object that raised the event.
Column
Points to TDAColumn object that corresponds to the current loading column.
Row
Indicates the current loading record.
Value
Holds column values.
IsEOF
True, if data loading needs to be stopped.


TLoaderProgressEvent Procedure Reference

TLoaderProgressEvent Procedure Reference

This type is used for the TDALoader.OnProgress event.

Unit

DALoader

Syntax

TLoaderProgressEvent = procedure (Sender: TObject; Percent: integer) of object;

Parameters
Sender
An object that raised the event.
Percent
Percentage of the load operation progress.


DAScript Unit Members

DAScript Unit Members

This unit contains the base class for the TOraScript component.

Classes

Name | Description
TDAScript | Makes it possible to execute several SQL statements one by one.
TDAStatement | This class has attributes and methods for controlling single SQL statement of a script.
TDAStatements | Holds a collection of TDAStatement objects.

Types

Name | Description
TAfterStatementExecuteEvent | This type is used for the TDAScript.AfterExecute event.
TBeforeStatementExecuteEvent | This type is used for the TDAScript.BeforeExecute event.
TOnErrorEvent | This type is used for the TDAScript.OnError event.

Enumerations

Name | Description
TErrorAction | Indicates the action to take when the OnError handler exits.


Classes in DAScript

Classes in DAScript

Classes in the DAScript unit.

Classes

Name | Description
TDAScript | Makes it possible to execute several SQL statements one by one.
TDAStatement | This class has attributes and methods for controlling single SQL statement of a script.
TDAStatements | Holds a collection of TDAStatement objects.


TDAScript Class

TDAScript Class

Makes it possible to execute several SQL statements one by one.

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

Unit

DAScript

Syntax

TDAScript = class(TComponent);

Remarks

Often it is necessary to execute several SQL statements one by one. This can be performed using a lot of components such as TCustomDASQL descendants. Usually it isn't the best solution. With only one TDAScript descedant component you can execute several SQL statements as one. This sequence of statements is called script. To separate single statements use semicolon (;) or slash (/) and for statements that can contain semicolon, only slash. Note that slash must be the first character in line.

Errors that occur during execution can be processed in the TDAScript.OnError event handler. By default, on error TDAScript shows exception and continues execution.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDAScript

See Also

  • TCustomDASQL


TDAScript Members

TDAScript Members

TDAScript class overview.

Properties

Name | Description
Connection | Used to specify the connection in which the script will be executed.
DataSet | Refers to a dataset that holds the result set of query execution.
Debug | Used to display the script execution and all its parameter values.
Delimiter | Used to set the delimiter string that separates script statements.
EndLine | Used to get the current statement last line number in a script.
EndOffset | Used to get the offset in the last line of the current statement.
EndPos | Used to get the end position of the current statement.
Macros | Used to change SQL script text in design- or run-time easily.
SQL | Used to get or set script text.
StartLine | Used to get the current statement start line number in a script.
StartOffset | Used to get the offset in the first line of the current statement.
StartPos | Used to get the start position of the current statement in a script.
Statements | Contains a list of statements obtained from the SQL property.

Methods

Name | Description
BreakExec | Stops script execution.
ErrorOffset | Used to get the offset of the statement if the Execute method raised an exception.
Execute | Executes a script.
ExecuteFile | Executes SQL statements contained in a file.
ExecuteNext | Executes the next statement in the script and then stops.
ExecuteStream | Executes SQL statements contained in a stream object.
FindMacro | Indicates whether a specified macro exists in a dataset.
MacroByName | Finds a Macro with the name passed in Name.

Events

Name | Description
AfterExecute | Occurs after a SQL script execution.
BeforeExecute | Occurs when taking a specific action before executing the current SQL statement is needed.
OnError | Occurs when Oracle raises an error.


TDAScript Properties

TDAScript Properties

Properties of the TDAScript class.

For a complete list of the TDAScript class members, see the TDAScript Members topic.

Public

Name | Description
Connection | Used to specify the connection in which the script will be executed.
DataSet | Refers to a dataset that holds the result set of query execution.
EndLine | Used to get the current statement last line number in a script.
EndOffset | Used to get the offset in the last line of the current statement.
EndPos | Used to get the end position of the current statement.
StartLine | Used to get the current statement start line number in a script.
StartOffset | Used to get the offset in the first line of the current statement.
StartPos | Used to get the start position of the current statement in a script.
Statements | Contains a list of statements obtained from the SQL property.

Published

Name | Description
Debug | Used to display the script execution and all its parameter values.
Delimiter | Used to set the delimiter string that separates script statements.
Macros | Used to change SQL script text in design- or run-time easily.
SQL | Used to get or set script text.

See Also

  • TDAScript Class
  • TDAScript Class Members


TDAScript.Connection Property

TDAScript.Connection Property

Used to specify the connection in which the script will be executed.

Class

TDAScript

Syntax

property Connection: TCustomDAConnection;

Remarks

Use the Connection property to specify the connection in which the script will be executed. If Connection is not connected, the Execute method calls the Connect method of Connection.

Set at design-time by selecting from the list of provided TCustomDAConnection objects.

At run-time, set the Connection property to reference an existing TCustomDAConnection object.

See Also

  • TCustomDAConnection


TDAScript.DataSet Property

TDAScript.DataSet Property

Refers to a dataset that holds the result set of query execution.

Class

TDAScript

Syntax

property DataSet: TCustomDADataSet;

Remarks

Set the DataSet property to assign a component that will be used by TOraScript to execute statements and to retrieve the results of the SELECT statements execution inside a script.

See Also

  • ExecuteNext
  • Execute


TDAScript.Debug Property

TDAScript.Debug Property

Used to display the script execution and all its parameter values.

Class

TDAScript

Syntax

property Debug: boolean default False;

Remarks

Set the Debug property to True to display the script execution and all its parameter values. Also displays the type of parameters.


TDAScript.Delimiter Property

TDAScript.Delimiter Property

Used to set the delimiter string that separates script statements.

Class

TDAScript

Syntax

property Delimiter: string stored IsDelimiterStored;

Remarks

Use the Delimiter property to set the delimiter string that separates script statements. By default it is semicolon (;). You can use slash (/) to separate statements that can contain semicolon if the Delimiter property's default value is semicolon. Note that slash must be the first character in line.


TDAScript.EndLine Property

TDAScript.EndLine Property

Used to get the current statement last line number in a script.

Class

TDAScript

Syntax

property EndLine: Int64;

Remarks

Use the EndLine property to get the current statement last line number in a script.


TDAScript.EndOffset Property

TDAScript.EndOffset Property

Used to get the offset in the last line of the current statement.

Class

TDAScript

Syntax

property EndOffset: Int64;

Remarks

Use the EndOffset property to get the offset in the last line of the current statement.


TDAScript.EndPos Property

TDAScript.EndPos Property

Used to get the end position of the current statement.

Class

TDAScript

Syntax

property EndPos: Int64;

Remarks

Use the EndPos property to get the end position of the current statement (the position of the last character in the statement) in a script.


TDAScript.Macros Property

TDAScript.Macros Property

Used to change SQL script text in design- or run-time easily.

Class

TDAScript

Syntax

property Macros: TMacros stored False;

Remarks

With the help of macros you can easily change SQL script text in design- or run-time. Macros extend abilities of parameters and allow changing conditions in the WHERE clause or sort order in the ORDER BY clause. You just insert &MacroName in a SQL query text and change value of macro by the Macro property editor in design-time or the MacroByName function in run-time. In time of opening query macro is replaced by its value.

See Also

  • TMacro
  • MacroByName


TDAScript.SQL Property

TDAScript.SQL Property

Used to get or set script text.

Class

TDAScript

Syntax

property SQL: _TStrings;

Remarks

Use the SQL property to get or set script text.


TDAScript.StartLine Property

TDAScript.StartLine Property

Used to get the current statement start line number in a script.

Class

TDAScript

Syntax

property StartLine: Int64;

Remarks

Use the StartLine property to get the current statement start line number in a script.


TDAScript.StartOffset Property

TDAScript.StartOffset Property

Used to get the offset in the first line of the current statement.

Class

TDAScript

Syntax

property StartOffset: Int64;

Remarks

Use the StartOffset property to get the offset in the first line of the current statement.


TDAScript.StartPos Property

TDAScript.StartPos Property

Used to get the start position of the current statement in a script.

Class

TDAScript

Syntax

property StartPos: Int64;

Remarks

Use the StartPos property to get the start position of the current statement (the position of the first statement character) in a script.


TDAScript.Statements Property

TDAScript.Statements Property

Contains a list of statements obtained from the SQL property.

Class

TDAScript

Syntax

property Statements: TDAStatements;

Remarks

Contains a list of statements that are obtained from the SQL property. Use the Access Statements property to view SQL statement, set parameters or execute the specified statement. Statements is a zero-based array of statement records. Index specifies the array element to access.

For example, consider the following script:

CREATE TABLE A (FIELD1 INTEGER);
INSERT INTO A VALUES(1);
INSERT INTO A VALUES(2);
INSERT INTO A VALUES(3);
CREATE TABLE B (FIELD1 INTEGER);
INSERT INTO B VALUES(1);
INSERT INTO B VALUES(2);
INSERT INTO B VALUES(3);

Note: The list of statements is created and filled when the value of Statements property is requested. That's why the first access to the Statements property can take a long time.

Example

You can use the Statements property in the following way:

procedure TForm1.Button1Click(Sender: TObject);
var
   i: integer;
begin
   with Script do
   begin
      for i := 0 to Statements.Count - 1 do
         if Copy(Statements[i].SQL, 1, 6) <> 'CREATE' then
    Statements[i].Execute;
   end;
end;

See Also

  • TDAStatements


TDAScript Methods

TDAScript Methods

Methods of the TDAScript class.

For a complete list of the TDAScript class members, see the TDAScript Members topic.

Public

Name | Description
BreakExec | Stops script execution.
ErrorOffset | Used to get the offset of the statement if the Execute method raised an exception.
Execute | Executes a script.
ExecuteFile | Executes SQL statements contained in a file.
ExecuteNext | Executes the next statement in the script and then stops.
ExecuteStream | Executes SQL statements contained in a stream object.
FindMacro | Indicates whether a specified macro exists in a dataset.
MacroByName | Finds a Macro with the name passed in Name.

See Also

  • TDAScript Class
  • TDAScript Class Members


TDAScript.BreakExec Method

TDAScript.BreakExec Method

Stops script execution.

Class

TDAScript

Syntax

procedure BreakExec; virtual;

Remarks

Call the BreakExec method to stop script execution.


TDAScript.ErrorOffset Method

TDAScript.ErrorOffset Method

Used to get the offset of the statement if the Execute method raised an exception.

Class

TDAScript

Syntax

function ErrorOffset: Int64;

Return Value
offset of an error.

Remarks

Call the ErrorOffset method to get the offset of the statement if the Execute method raised an exception.

See Also

  • OnError


TDAScript.Execute Method

TDAScript.Execute Method

Executes a script.

Class

TDAScript

Syntax

procedure Execute; virtual;

Remarks

Call the Execute method to execute a script. If Oracle raises an error, the OnError event occurs.

See Also

  • ExecuteNext
  • OnError
  • ErrorOffset


TDAScript.ExecuteFile Method

TDAScript.ExecuteFile Method

Executes SQL statements contained in a file.

Class

TDAScript

Syntax

procedure ExecuteFile(const FileName: string);

Parameters
FileName
Holds the file name.

Remarks

Call the ExecuteFile method to execute SQL statements contained in a file. Script doesn't load full content into memory. Reading and execution is performed by blocks of 64k size. Therefore, it is optimal to use it for big files.


TDAScript.ExecuteNext Method

TDAScript.ExecuteNext Method

Executes the next statement in the script and then stops.

Class

TDAScript

Syntax

function ExecuteNext: boolean; virtual;

Return Value
True, if there are any statements left in the script, False otherwise.

Remarks

Use the ExecuteNext method to execute the next statement in the script statement and stop. If Oracle raises an error, the OnError event occurs.

See Also

  • Execute
  • OnError
  • ErrorOffset


TDAScript.ExecuteStream Method

TDAScript.ExecuteStream Method

Executes SQL statements contained in a stream object.

Class

TDAScript

Syntax

procedure ExecuteStream(Stream: TStream);

Parameters
Stream
Holds the stream object from which the statements will be executed.

Remarks

Call the ExecuteStream method to execute SQL statements contained in a stream object. Reading from the stream and execution is performed by blocks of 64k size.


TDAScript.FindMacro Method

TDAScript.FindMacro Method

Indicates whether a specified macro exists in a dataset.

Class

TDAScript

Syntax

function FindMacro(Name: string): TMacro;

Parameters
Name
Holds the name of the macro to search for.
Return Value
a TMacro object, if a macro with matching name was found, otherwise returns nil.

Remarks

Call the FindMacro method to determine if a specified macro exists. If FindMacro finds a macro with a matching name, it returns a TMacro object for the specified Name. Otherwise it returns nil.

See Also

  • TMacro
  • Macros
  • MacroByName


TDAScript.MacroByName Method

TDAScript.MacroByName Method

Finds a Macro with the name passed in Name.

Class

TDAScript

Syntax

function MacroByName(Name: string): TMacro;

Parameters
Name
Holds the name of the Macro to search for.
Return Value
the Macro, if a match was found.

Remarks

Call the MacroByName method to find a Macro with the name passed in Name. If a match was found, MacroByName returns the Macro. Otherwise, an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate a parameter by name without raising an exception if the parameter is not found, use the FindMacro method.

To assign the value of macro use the TMacro.Value property.

See Also

  • TMacro
  • Macros
  • FindMacro


TDAScript Events

TDAScript Events

Events of the TDAScript class.

For a complete list of the TDAScript class members, see the TDAScript Members topic.

Published

Name | Description
AfterExecute | Occurs after a SQL script execution.
BeforeExecute | Occurs when taking a specific action before executing the current SQL statement is needed.
OnError | Occurs when Oracle raises an error.

See Also

  • TDAScript Class
  • TDAScript Class Members


TDAScript.AfterExecute Event

TDAScript.AfterExecute Event

Occurs after a SQL script execution.

Class

TDAScript

Syntax

property AfterExecute: TAfterStatementExecuteEvent;

Remarks

Occurs after a SQL script has been executed.

See Also

  • Execute


TDAScript.BeforeExecute Event

TDAScript.BeforeExecute Event

Occurs when taking a specific action before executing the current SQL statement is needed.

Class

TDAScript

Syntax

property BeforeExecute: TBeforeStatementExecuteEvent;

Remarks

Write the BeforeExecute event handler to take specific action before executing the current SQL statement. SQL holds text of the current SQL statement. Write SQL to change the statement that will be executed. Set Omit to True to skip statement execution.


TDAScript.OnError Event

TDAScript.OnError Event

Occurs when Oracle raises an error.

Class

TDAScript

Syntax

property OnError: TOnErrorEvent;

Remarks

Occurs when Oracle raises an error.

Action indicates the action to take when the OnError handler exits. On entry into the handler, Action is always set to eaFail.

See Also

  • ErrorOffset


TDAStatement Class

TDAStatement Class

This class has attributes and methods for controlling single SQL statement of a script.

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

Unit

DAScript

Syntax

TDAStatement = class(TCollectionItem);

Remarks

TDAScript contains SQL statements, represented as TDAStatement objects. The TDAStatement class has attributes and methods for controlling single SQL statement of a script.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TDAStatement

See Also

  • TDAScript
  • TDAStatements


TDAStatement Members

TDAStatement Members

TDAStatement class overview.

Properties

Name | Description
EndLine | Used to determine the number of the last statement line in a script.
EndOffset | Used to get the offset in the last line of the statement.
EndPos | Used to get the end position of the statement in a script.
Omit | Used to avoid execution of a statement.
Params | Contains parasmeters for an SQL statement.
Script | Used to determine the TDAScript object the SQL Statement belongs to.
SQL | Used to get or set the text of an SQL statement.
StartLine | Used to determine the number of the first statement line in a script.
StartOffset | Used to get the offset in the first line of a statement.
StartPos | Used to get the start position of the statement in a script.


TDAStatement Properties

TDAStatement Properties

Properties of the TDAStatement class.

For a complete list of the TDAStatement class members, see the TDAStatement Members topic.

Public

Name | Description
EndLine | Used to determine the number of the last statement line in a script.
EndOffset | Used to get the offset in the last line of the statement.
EndPos | Used to get the end position of the statement in a script.
Omit | Used to avoid execution of a statement.
Params | Contains parasmeters for an SQL statement.
Script | Used to determine the TDAScript object the SQL Statement belongs to.
SQL | Used to get or set the text of an SQL statement.
StartLine | Used to determine the number of the first statement line in a script.
StartOffset | Used to get the offset in the first line of a statement.
StartPos | Used to get the start position of the statement in a script.

See Also

  • TDAStatement Class
  • TDAStatement Class Members


TDAStatement.EndLine Property

TDAStatement.EndLine Property

Used to determine the number of the last statement line in a script.

Class

TDAStatement

Syntax

property EndLine: integer;

Remarks

Use the EndLine property to determine the number of the last statement line in a script.


TDAStatement.EndOffset Property

TDAStatement.EndOffset Property

Used to get the offset in the last line of the statement.

Class

TDAStatement

Syntax

property EndOffset: integer;

Remarks

Use the EndOffset property to get the offset in the last line of the statement.


TDAStatement.EndPos Property

TDAStatement.EndPos Property

Used to get the end position of the statement in a script.

Class

TDAStatement

Syntax

property EndPos: integer;

Remarks

Use the EndPos property to get the end position of the statement (the position of the last character in the statement) in a script.


TDAStatement.Omit Property

TDAStatement.Omit Property

Used to avoid execution of a statement.

Class

TDAStatement

Syntax

property Omit: boolean;

Remarks

Set the Omit property to True to avoid execution of a statement.


TDAStatement.Params Property

TDAStatement.Params Property

Contains parasmeters for an SQL statement.

Class

TDAStatement

Syntax

property Params: TDAParams;

Remarks

Contains parameters for an SQL statement.

Access Params at runtime to view and set parameter names, values, and data types dynamically. Params is a zero-based array of parameter records. Index specifies the array element to access.

See Also

  • TDAParam


TDAStatement.Script Property

TDAStatement.Script Property

Used to determine the TDAScript object the SQL Statement belongs to.

Class

TDAStatement

Syntax

property Script: TDAScript;

Remarks

Use the Script property to determine the TDAScript object the SQL Statement belongs to.


TDAStatement.SQL Property

TDAStatement.SQL Property

Used to get or set the text of an SQL statement.

Class

TDAStatement

Syntax

property SQL: string;

Remarks

Use the SQL property to get or set the text of an SQL statement.


TDAStatement.StartLine Property

TDAStatement.StartLine Property

Used to determine the number of the first statement line in a script.

Class

TDAStatement

Syntax

property StartLine: integer;

Remarks

Use the StartLine property to determine the number of the first statement line in a script.


TDAStatement.StartOffset Property

TDAStatement.StartOffset Property

Used to get the offset in the first line of a statement.

Class

TDAStatement

Syntax

property StartOffset: integer;

Remarks

Use the StartOffset property to get the offset in the first line of a statement.


TDAStatement.StartPos Property

TDAStatement.StartPos Property

Used to get the start position of the statement in a script.

Class

TDAStatement

Syntax

property StartPos: integer;

Remarks

Use the StartPos property to get the start position of the statement (the position of the first statement character) in a script.


TDAStatements Class

TDAStatements Class

Holds a collection of TDAStatement objects.

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

Unit

DAScript

Syntax

TDAStatements = class(TCollection);

Remarks

Each TDAStatements holds a collection of TDAStatement objects. TDAStatements maintains an index of the statements in its Items array. The Count property contains the number of statements in the collection. Use TDAStatements class to manipulate script SQL statements.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TDAStatements

See Also

  • TDAScript
  • TDAStatement


TDAStatements Members

TDAStatements Members

TDAStatements class overview.

Properties

Name | Description
Items | Used to access separate script statements.


TDAStatements Properties

TDAStatements Properties

Properties of the TDAStatements class.

For a complete list of the TDAStatements class members, see the TDAStatements Members topic.

Public

Name | Description
Items | Used to access separate script statements.

See Also

  • TDAStatements Class
  • TDAStatements Class Members


TDAStatements.Items Property(Indexer)

TDAStatements.Items Property(Indexer)

Used to access separate script statements.

Class

TDAStatements

Syntax

property Items[Index: Integer]: TDAStatement; default;

Parameters
Index
Holds the index value.

Remarks

Use the Items property to access individual script statements. The value of the Index parameter corresponds to the Index property of TDAStatement.

See Also

  • TDAStatement


Types in DAScript

Types in DAScript

Types in the DAScript unit.

Types

Name | Description
TAfterStatementExecuteEvent | This type is used for the TDAScript.AfterExecute event.
TBeforeStatementExecuteEvent | This type is used for the TDAScript.BeforeExecute event.
TOnErrorEvent | This type is used for the TDAScript.OnError event.


TAfterStatementExecuteEvent Procedure Reference

TAfterStatementExecuteEvent Procedure Reference

This type is used for the TDAScript.AfterExecute event.

Unit

DAScript

Syntax

TAfterStatementExecuteEvent = procedure (Sender: TObject; SQL: string) of object;

Parameters
Sender
An object that raised the event.
SQL
Holds the passed SQL statement.


TBeforeStatementExecuteEvent Procedure Reference

TBeforeStatementExecuteEvent Procedure Reference

This type is used for the TDAScript.BeforeExecute event.

Unit

DAScript

Syntax

TBeforeStatementExecuteEvent = procedure (Sender: TObject; var SQL: string; var Omit: boolean) of object;

Parameters
Sender
An object that raised the event.
SQL
Holds the passed SQL statement.
Omit
True, if the statement execution should be skipped.


TOnErrorEvent Procedure Reference

TOnErrorEvent Procedure Reference

This type is used for the TDAScript.OnError event.

Unit

DAScript

Syntax

TOnErrorEvent = procedure (Sender: TObject; E: Exception; SQL: string; var Action: TErrorAction) of object;

Parameters
Sender
An object that raised the event.
E
The error code.
SQL
Holds the passed SQL statement.
Action
The action to take when the OnError handler exits.


Enumerations in DAScript

Enumerations in DAScript

Enumerations in the DAScript unit.

Enumerations

Name | Description
TErrorAction | Indicates the action to take when the OnError handler exits.


TErrorAction Enumeration

TErrorAction Enumeration

Indicates the action to take when the OnError handler exits.

Unit

DAScript

Syntax

TErrorAction = (eaAbort, eaFail, eaException, eaContinue);

Values

Value | Meaning
eaAbort | Abort execution without displaying an error message.
eaContinue | Continue execution.
eaException | In Delphi 6 and higher exception is handled by the Application.HandleException method.
eaFail | Abort execution and display an error message.


DASQLMonitor Unit Members

DASQLMonitor Unit Members

This unit contains the base class for the TOraSQLMonitor component.

Classes

Name | Description
TCustomDASQLMonitor | A base class that introduces properties and methods to monitor dynamic SQL execution in database applications interactively.

Types

Name | Description
TDATraceFlags | Represents the set of TDATraceFlag.
TMonitorOptions | Represents the set of TMonitorOption.
TOnSQLEvent | This type is used for the TCustomDASQLMonitor.OnSQL event.

Enumerations

Name | Description
TDATraceFlag | Use TraceFlags to specify which database operations the monitor should track in an application at runtime.
TMonitorOption | Used to define where information from SQLMonitor will be dispalyed.


Classes in DASQLMonitor

Classes in DASQLMonitor

Classes in the DASQLMonitor unit.

Classes

Name | Description
TCustomDASQLMonitor | A base class that introduces properties and methods to monitor dynamic SQL execution in database applications interactively.


TCustomDASQLMonitor Class

TCustomDASQLMonitor Class

A base class that introduces properties and methods to monitor dynamic SQL execution in database applications interactively.

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

Unit

DASQLMonitor

Syntax

TCustomDASQLMonitor = class(TComponent);

Remarks

TCustomDASQLMonitor is a base class that introduces properties and methods to monitor dynamic SQL execution in database applications interactively. TCustomDASQLMonitor provides two ways of displaying debug information. It monitors either by dialog window or by Borland's proprietary SQL Monitor. Furthermore to receive debug information use the TCustomDASQLMonitor.OnSQL event.

In applications use descendants of TCustomDASQLMonitor.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomDASQLMonitor


TCustomDASQLMonitor Members

TCustomDASQLMonitor Members

TCustomDASQLMonitor class overview.

Properties

Name | Description
Active | Used to activate monitoring of SQL.
Options | Used to include the desired properties for TCustomDASQLMonitor.
TraceFlags | Used to specify which database operations the monitor should track in an application at runtime.

Events

Name | Description
OnSQL | Occurs when tracing of SQL activity on database components is needed.


TCustomDASQLMonitor Properties

TCustomDASQLMonitor Properties

Properties of the TCustomDASQLMonitor class.

For a complete list of the TCustomDASQLMonitor class members, see the TCustomDASQLMonitor Members topic.

Public

Name | Description
Active | Used to activate monitoring of SQL.
Options | Used to include the desired properties for TCustomDASQLMonitor.
TraceFlags | Used to specify which database operations the monitor should track in an application at runtime.

See Also

  • TCustomDASQLMonitor Class
  • TCustomDASQLMonitor Class Members


TCustomDASQLMonitor.Active Property

TCustomDASQLMonitor.Active Property

Used to activate monitoring of SQL.

Class

TCustomDASQLMonitor

Syntax

property Active: boolean default True;

Remarks

Set the Active property to True to activate monitoring of SQL.

See Also

  • OnSQL


TCustomDASQLMonitor.Options Property

TCustomDASQLMonitor.Options Property

Used to include the desired properties for TCustomDASQLMonitor.

Class

TCustomDASQLMonitor

Syntax

property Options: TMonitorOptions default [moDialog, moSQLMonitor, moDBMonitor, moCustom];

Remarks

Set Options to include the desired properties for TCustomDASQLMonitor.

See Also

  • OnSQL


TCustomDASQLMonitor.TraceFlags Property

TCustomDASQLMonitor.TraceFlags Property

Used to specify which database operations the monitor should track in an application at runtime.

Class

TCustomDASQLMonitor

Syntax

property TraceFlags: TDATraceFlags default [tfQPrepare, tfQExecute, tfError, tfConnect, tfTransact, tfParams, tfMisc];

Remarks

Use the TraceFlags property to specify which database operations the monitor should track in an application at runtime.

See Also

  • OnSQL


TCustomDASQLMonitor Events

TCustomDASQLMonitor Events

Events of the TCustomDASQLMonitor class.

For a complete list of the TCustomDASQLMonitor class members, see the TCustomDASQLMonitor Members topic.

Public

Name | Description
OnSQL | Occurs when tracing of SQL activity on database components is needed.

See Also

  • TCustomDASQLMonitor Class
  • TCustomDASQLMonitor Class Members


TCustomDASQLMonitor.OnSQL Event

TCustomDASQLMonitor.OnSQL Event

Occurs when tracing of SQL activity on database components is needed.

Class

TCustomDASQLMonitor

Syntax

property OnSQL: TOnSQLEvent;

Remarks

Write the OnSQL event handler to let an application trace SQL activity on database components. The Text parameter holds the detected SQL statement. Use the Flag parameter to make selective processing of SQL in the handler body.

See Also

  • TraceFlags


Types in DASQLMonitor

Types in DASQLMonitor

Types in the DASQLMonitor unit.

Types

Name | Description
TDATraceFlags | Represents the set of TDATraceFlag.
TMonitorOptions | Represents the set of TMonitorOption.
TOnSQLEvent | This type is used for the TCustomDASQLMonitor.OnSQL event.


TDATraceFlags Set

TDATraceFlags Set

Represents the set of TDATraceFlag.

Unit

DASQLMonitor

Syntax

TDATraceFlags = set of TDATraceFlag;


TMonitorOptions Set

TMonitorOptions Set

Represents the set of TMonitorOption.

Unit

DASQLMonitor

Syntax

TMonitorOptions = set of TMonitorOption;


TOnSQLEvent Procedure Reference

TOnSQLEvent Procedure Reference

This type is used for the TCustomDASQLMonitor.OnSQL event.

Unit

DASQLMonitor

Syntax

TOnSQLEvent = procedure (Sender: TObject; Text: string; Flag: TDATraceFlag) of object;

Parameters
Sender
An object that raised the event.
Text
Holds the detected SQL statement.
Flag
Use the Flag parameter to make selective processing of SQL in the handler body.


Enumerations in DASQLMonitor

Enumerations in DASQLMonitor

Enumerations in the DASQLMonitor unit.

Enumerations

Name | Description
TDATraceFlag | Use TraceFlags to specify which database operations the monitor should track in an application at runtime.
TMonitorOption | Used to define where information from SQLMonitor will be dispalyed.


TDATraceFlag Enumeration

TDATraceFlag Enumeration

Use TraceFlags to specify which database operations the monitor should track in an application at runtime.

Unit

DASQLMonitor

Syntax

TDATraceFlag = (tfQPrepare, tfQExecute, tfQFetch, tfError, tfStmt, tfConnect, tfTransact, tfBlob, tfService, tfMisc, tfParams);

Values

Value | Meaning
tfBlob | This option is declared for future use.
tfConnect | Establishing a connection.
tfError | Errors of query execution.
tfMisc | This option is declared for future use.
tfParams | Representing parameter values for tfQPrepare and tfQExecute.
tfQExecute | Execution of the queries.
tfQFetch | This option is declared for future use.
tfQPrepare | Queries preparation.
tfService | This option is declared for future use.
tfStmt | This option is declared for future use.
tfTransact | Processing transactions.


TMonitorOption Enumeration

TMonitorOption Enumeration

Used to define where information from SQLMonitor will be dispalyed.

Unit

DASQLMonitor

Syntax

TMonitorOption = (moDialog, moSQLMonitor, moDBMonitor, moCustom, moHandled);

Values

Value | Meaning
moCustom | Monitoring of SQL for individual components is allowed. Set Debug properties in SQL-related components to True to let TCustomDASQLMonitor instance to monitor their behavior. Has effect when moDialog is included.
moDBMonitor | Debug information is displayed in Using DBMonitor.
moDialog | Debug information is displayed in debug window.
moHandled | Component handle is included into the event description string.
moSQLMonitor | Debug information is displayed in Borland SQL Monitor.


Types in DB

Types in DB

Types in the DB unit.

Types

Name | Description
TConnectChangeEvent | This type is used for the TOraSession.OnConnectChange event.


TConnectChangeEvent Procedure Reference

TConnectChangeEvent Procedure Reference

This type is used for the TOraSession.OnConnectChange event.

Unit

DB

Syntax

TConnectChangeEvent = procedure (Sender: TObject; Connecting: Boolean) of object;

Parameters
Sender
An object that raised the event.
Connected
True, if connection is active.


DBAccess Unit Members

DBAccess Unit Members

This unit contains base classes for most of the components.

Classes

Name | Description
EDAError | A base class for exceptions that are raised when an error occurs on the server side.
TCRDataSource | Provides an interface between a DAC dataset components and data-aware controls on a form.
TCustomConnectDialog | A base class for the connect dialog components.
TCustomDAConnection | A base class for components used to establish connections.
TCustomDADataSet | Encapsulates general set of properties, events, and methods for working with data accessed through various database engines.
TCustomDASQL | A base class for components executing SQL statements that do not return result sets.
TCustomDAUpdateSQL | A base class for components that provide DML statements for more flexible control over data modifications.
TDAConnectionOptions | This class allows setting up the behaviour of the TDAConnection class.
TDADataSetOptions | This class allows setting up the behaviour of the TDADataSet class.
TDAMetaData | A class for retrieving metainformation of the specified database objects in the form of dataset.
TDAParam | A class that forms objects to represent the values of the parameters set.
TDAParams | This class is used to manage a list of TDAParam objects for an object that uses field parameters.
TDATransaction | A base class that implements functionality for controlling transactions.
TMacro | Object that represents the value of a macro.
TMacros | Controls a list of TMacro objects for the TCustomDASQL.Macros or TCustomDADataSet components.
TPoolingOptions | This class allows setting up the behaviour of the connection pool.

Types

Name | Description
TAfterExecuteEvent | This type is used for the TCustomDADataSet.AfterExecute and TCustomDASQL.AfterExecute events.
TAfterFetchEvent | This type is used for the TCustomDADataSet.AfterFetch event.
TBeforeFetchEvent | This type is used for the TCustomDADataSet.BeforeFetch event.
TConnectionLostEvent | This type is used for the TCustomDAConnection.OnConnectionLost event.
TDAConnectionErrorEvent | This type is used for the TCustomDAConnection.OnError event.
TDATransactionErrorEvent | This type is used for the TDATransaction.OnError event.
TRefreshOptions | Represents the set of TRefreshOption.

Enumerations

Name | Description
TLabelSet | Sets the languauge of labels in the connect dialog.
TLockMode | Specifies when the locking of an editing record should be performed.
TRefreshOption | Indicates when the editing record will be refreshed.
TRetryMode | Specifies the application behavior when connection is lost.

Variables

Name | Description
BaseSQLOldBehavior | After assigning SQL text and modifying it by AddWhere, DeleteWhere, and SetOrderBy, all subsequent changes of the SQL property will not be reflected in the BaseSQL property.
ChangeCursor | When set to True allows data access components to change screen cursor for the execution time.
MacroChar | Determinates what character is used for macros.
SQLGeneratorCompatibility | The value of the TCustomDADataSet.BaseSQL property is used to complete the refresh SQL statement, if the manually assigned TCustomDAUpdateSQL.RefreshSQL property contains only WHERE clause.


Classes in DBAccess

Classes in DBAccess

Classes in the DBAccess unit.

Classes

Name | Description
EDAError | A base class for exceptions that are raised when an error occurs on the server side.
TCRDataSource | Provides an interface between a DAC dataset components and data-aware controls on a form.
TCustomConnectDialog | A base class for the connect dialog components.
TCustomDAConnection | A base class for components used to establish connections.
TCustomDADataSet | Encapsulates general set of properties, events, and methods for working with data accessed through various database engines.
TCustomDASQL | A base class for components executing SQL statements that do not return result sets.
TCustomDAUpdateSQL | A base class for components that provide DML statements for more flexible control over data modifications.
TDAConnectionOptions | This class allows setting up the behaviour of the TDAConnection class.
TDADataSetOptions | This class allows setting up the behaviour of the TDADataSet class.
TDAMetaData | A class for retrieving metainformation of the specified database objects in the form of dataset.
TDAParam | A class that forms objects to represent the values of the parameters set.
TDAParams | This class is used to manage a list of TDAParam objects for an object that uses field parameters.
TDATransaction | A base class that implements functionality for controlling transactions.
TMacro | Object that represents the value of a macro.
TMacros | Controls a list of TMacro objects for the TCustomDASQL.Macros or TCustomDADataSet components.
TPoolingOptions | This class allows setting up the behaviour of the connection pool.


EDAError Class

EDAError Class

A base class for exceptions that are raised when an error occurs on the server side.

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

Unit

DBAccess

Syntax

EDAError = class(EDatabaseError);

Remarks

EDAError is a base class for exceptions that are raised when an error occurs on the server side.

Inheritance Hierarchy

TObject
Exception
EDatabaseError
EDAError


EDAError Members

EDAError Members

EDAError class overview.

Properties

Name | Description
ErrorCode | Determines the error code returned by the server.


EDAError Properties

EDAError Properties

Properties of the EDAError class.

For a complete list of the EDAError class members, see the EDAError Members topic.

Public

Name | Description
ErrorCode | Determines the error code returned by the server.

See Also

  • EDAError Class
  • EDAError Class Members


EDAError.ErrorCode Property

EDAError.ErrorCode Property

Determines the error code returned by the server.

Class

EDAError

Syntax

property ErrorCode: integer;

Remarks

Use the ErrorCode property to determine the error code returned by Oracle. This value is always positive.

See Also

  • TOraErrorHandler.OnError
  • TOraErrorHandler.OnError


TCRDataSource Class

TCRDataSource Class

Provides an interface between a DAC dataset components and data-aware controls on a form.

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

Unit

DBAccess

Syntax

TCRDataSource = class(TDataSource);

Remarks

TCRDataSource provides an interface between a DAC dataset components and data-aware controls on a form.

TCRDataSource inherits its functionality directly from the TDataSource component.

At design time assign individual data-aware components' DataSource properties from their drop-down listboxes.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSource
TCRDataSource


TCRDataSource Members

TCRDataSource Members

TCRDataSource class overview.


TCustomConnectDialog Class

TCustomConnectDialog Class

A base class for the connect dialog components.

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

Unit

DBAccess

Syntax

TCustomConnectDialog = class(TComponent);

Remarks

TCustomConnectDialog is a base class for the connect dialog components. It provides functionality to show a dialog box where user can edit username, password and server name before connecting to a database. You can customize captions of buttons and labels by their properties.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomConnectDialog


TCustomConnectDialog Members

TCustomConnectDialog Members

TCustomConnectDialog class overview.

Properties

Name | Description
CancelButton | Used to specify the label for the Cancel button.
Caption | Used to set the caption of dialog box.
ConnectButton | Used to specify the label for the Connect button.
DialogClass | Used to specify the class of the form that will be displayed to enter login information.
LabelSet | Used to set the language of buttons and labels captions.
PasswordLabel | Used to specify a prompt for password edit.
Retries | Used to indicate the number of retries of failed connections.
SavePassword | Used for the password to be displayed in ConnectDialog in asterisks.
ServerLabel | Used to specify a prompt for the server name edit.
StoreLogInfo | Used to specify whether the login information should be kept in system registry after a connection was established.
UsernameLabel | Used to specify a prompt for username edit.

Methods

Name | Description
Execute | Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button.
GetServerList | Retrieves a list of available server names.


TCustomConnectDialog Properties

TCustomConnectDialog Properties

Properties of the TCustomConnectDialog class.

For a complete list of the TCustomConnectDialog class members, see the TCustomConnectDialog Members topic.

Public

Name | Description
CancelButton | Used to specify the label for the Cancel button.
Caption | Used to set the caption of dialog box.
ConnectButton | Used to specify the label for the Connect button.
DialogClass | Used to specify the class of the form that will be displayed to enter login information.
LabelSet | Used to set the language of buttons and labels captions.
PasswordLabel | Used to specify a prompt for password edit.
Retries | Used to indicate the number of retries of failed connections.
SavePassword | Used for the password to be displayed in ConnectDialog in asterisks.
ServerLabel | Used to specify a prompt for the server name edit.
StoreLogInfo | Used to specify whether the login information should be kept in system registry after a connection was established.
UsernameLabel | Used to specify a prompt for username edit.

See Also

  • TCustomConnectDialog Class
  • TCustomConnectDialog Class Members


TCustomConnectDialog.CancelButton Property

TCustomConnectDialog.CancelButton Property

Used to specify the label for the Cancel button.

Class

TCustomConnectDialog

Syntax

property CancelButton: string;

Remarks

Use the CancelButton property to specify the label for the Cancel button.


TCustomConnectDialog.Caption Property

TCustomConnectDialog.Caption Property

Used to set the caption of dialog box.

Class

TCustomConnectDialog

Syntax

property Caption: string;

Remarks

Use the Caption property to set the caption of dialog box.


TCustomConnectDialog.ConnectButton Property

TCustomConnectDialog.ConnectButton Property

Used to specify the label for the Connect button.

Class

TCustomConnectDialog

Syntax

property ConnectButton: string;

Remarks

Use the ConnectButton property to specify the label for the Connect button.


TCustomConnectDialog.DialogClass Property

TCustomConnectDialog.DialogClass Property

Used to specify the class of the form that will be displayed to enter login information.

Class

TCustomConnectDialog

Syntax

property DialogClass: string;

Remarks

Use the DialogClass property to specify the class of the form that will be displayed to enter login information. When this property is blank, TCustomConnectDialog uses the default form - TConnectForm. You can write your own login form to enter login information and assign its class name to the DialogClass property. Each login form must have ConnectDialog: TCustomConnectDialog published property to access connection information. For details see the implementation of the connect form which sources are in the Lib subdirectory of the ODAC installation directory.

See Also

  • GetServerList


TCustomConnectDialog.LabelSet Property

TCustomConnectDialog.LabelSet Property

Used to set the language of buttons and labels captions.

Class

TCustomConnectDialog

Syntax

property LabelSet: TLabelSet default lsEnglish;

Remarks

Use the LabelSet property to set the language of labels and buttons captions.

The default value is lsEnglish.


TCustomConnectDialog.PasswordLabel Property

TCustomConnectDialog.PasswordLabel Property

Used to specify a prompt for password edit.

Class

TCustomConnectDialog

Syntax

property PasswordLabel: string;

Remarks

Use the PasswordLabel property to specify a prompt for password edit.


TCustomConnectDialog.Retries Property

TCustomConnectDialog.Retries Property

Used to indicate the number of retries of failed connections.

Class

TCustomConnectDialog

Syntax

property Retries: word default 3;

Remarks

Use the Retries property to determine the number of retries of failed connections.


TCustomConnectDialog.SavePassword Property

TCustomConnectDialog.SavePassword Property

Used for the password to be displayed in ConnectDialog in asterisks.

Class

TCustomConnectDialog

Syntax

property SavePassword: boolean default False;

Remarks

If True, and the Password property of the connection instance is assigned, the password in ConnectDialog is displayed in asterisks.


TCustomConnectDialog.ServerLabel Property

TCustomConnectDialog.ServerLabel Property

Used to specify a prompt for the server name edit.

Class

TCustomConnectDialog

Syntax

property ServerLabel: string;

Remarks

Use the ServerLabel property to specify a prompt for the server name edit.


TCustomConnectDialog.StoreLogInfo Property

TCustomConnectDialog.StoreLogInfo Property

Used to specify whether the login information should be kept in system registry after a connection was established.

Class

TCustomConnectDialog

Syntax

property StoreLogInfo: boolean default True;

Remarks

Use the StoreLogInfo property to specify whether to keep login information in system registry after a connection was established using provided username, password and servername.

Set this property to True to store login information.

The default value is True.


TCustomConnectDialog.UsernameLabel Property

TCustomConnectDialog.UsernameLabel Property

Used to specify a prompt for username edit.

Class

TCustomConnectDialog

Syntax

property UsernameLabel: string;

Remarks

Use the UsernameLabel property to specify a prompt for username edit.


TCustomConnectDialog Methods

TCustomConnectDialog Methods

Methods of the TCustomConnectDialog class.

For a complete list of the TCustomConnectDialog class members, see the TCustomConnectDialog Members topic.

Public

Name | Description
Execute | Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button.
GetServerList | Retrieves a list of available server names.

See Also

  • TCustomConnectDialog Class
  • TCustomConnectDialog Class Members


TCustomConnectDialog.Execute Method

TCustomConnectDialog.Execute Method

Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button.

Class

TCustomConnectDialog

Syntax

function Execute: boolean; virtual;

Return Value
True, if connected.

Remarks

Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button. Returns True if connected. If user clicks Cancel, Execute returns False.

In the case of failed connection Execute offers to connect repeat Retries times.


TCustomConnectDialog.GetServerList Method

TCustomConnectDialog.GetServerList Method

Retrieves a list of available server names.

Class

TCustomConnectDialog

Syntax

procedure GetServerList(List: _TStrings); virtual;

Parameters
List
Holds a list of available server names.

Remarks

Call the GetServerList method to retrieve a list of available server names. It is particularly relevant for writing custom login form.

See Also

  • DialogClass


TCustomDAConnection Class

TCustomDAConnection Class

A base class for components used to establish connections.

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

Unit

DBAccess

Syntax

TCustomDAConnection = class(TCustomConnection);

Remarks

TCustomDAConnection is a base class for components that establish connection with database, provide customised login support, and perform transaction control.

Do not create instances of TCustomDAConnection. To add a component that represents a connection to a source of data, use descendants of the TCustomDAConnection class.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomConnection
TCustomDAConnection


TCustomDAConnection Members

TCustomDAConnection Members

TCustomDAConnection class overview.

Properties

Name | Description
ConnectDialog | Allows to link a TCustomConnectDialog component.
ConvertEOL | Allows customizing line breaks in string fields and parameters.
InTransaction | Indicates whether the transaction is active.
LoginPrompt | Specifies whether a login dialog appears immediately before opening a new connection.
Options | Specifies the connection behavior.
Password | Serves to supply a password for login.
Pooling | Enables or disables using connection pool.
PoolingOptions | Specifies the behaviour of connection pool.
Server | Serves to supply the server name for login.
Username | Used to supply a user name for login.

Methods

Name | Description
ApplyUpdates | Overloaded. Applies changes in datasets.
Commit | Commits current transaction.
Connect | Establishes a connection to the server.
CreateDataSet | Creates a dataset component.
CreateSQL | Creates a component for queries execution.
Disconnect | Performs disconnect.
ExecProc | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx | Allows to execute a stored procedure or function.
ExecSQL | Executes a SQL statement with parameters.
ExecSQLEx | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames | Returns a database list from the server.
GetStoredProcNames | Returns a list of stored procedures from the server.
GetTableNames | Provides a list of available tables names.
MonitorMessage | Sends a specified message through the TCustomDASQLMonitor component.
RemoveFromPool | Marks the connection that should not be returned to the pool after disconnect.
Rollback | Discards all current data changes and ends transaction.
StartTransaction | Begins a new user transaction.

Events

Name | Description
OnConnectionLost | This event occurs when connection was lost.
OnError | This event occurs when an error has arisen in the connection.


TCustomDAConnection Properties

TCustomDAConnection Properties

Properties of the TCustomDAConnection class.

For a complete list of the TCustomDAConnection class members, see the TCustomDAConnection Members topic.

Public

Name | Description
ConnectDialog | Allows to link a TCustomConnectDialog component.
ConvertEOL | Allows customizing line breaks in string fields and parameters.
InTransaction | Indicates whether the transaction is active.
LoginPrompt | Specifies whether a login dialog appears immediately before opening a new connection.
Options | Specifies the connection behavior.
Password | Serves to supply a password for login.
Pooling | Enables or disables using connection pool.
PoolingOptions | Specifies the behaviour of connection pool.
Server | Serves to supply the server name for login.
Username | Used to supply a user name for login.

See Also

  • TCustomDAConnection Class
  • TCustomDAConnection Class Members


TCustomDAConnection.ConnectDialog Property

TCustomDAConnection.ConnectDialog Property

Allows to link a TCustomConnectDialog component.

Class

TCustomDAConnection

Syntax

property ConnectDialog: TCustomConnectDialog;

Remarks

Use the ConnectDialog property to assign to connection a TCustomConnectDialog component.

See Also

  • TCustomConnectDialog


TCustomDAConnection.ConvertEOL Property

TCustomDAConnection.ConvertEOL Property

Allows customizing line breaks in string fields and parameters.

Class

TCustomDAConnection

Syntax

property ConvertEOL: boolean default False;

Remarks

Affects the line break behavior in string fields and parameters. When fetching strings (including the CLOB and LONG fields) with ConvertEOL = True, dataset converts their line breaks from the LF to CRLF form. And when posting strings to server with ConvertEOL turned on, their line breaks are converted from CRLF to LF form. By default, strings are not converted.


TCustomDAConnection.InTransaction Property

TCustomDAConnection.InTransaction Property

Indicates whether the transaction is active.

Class

TCustomDAConnection

Syntax

property InTransaction: boolean;

Remarks

Examine the InTransaction property at runtime to determine whether user transaction is currently in progress. In other words InTransaction is set to True when user explicitly calls StartTransaction. Calling Commit or Rollback sets InTransaction to False. The value of the InTransaction property cannot be changed directly.

Important note: The InTransaction property always shows actual user transaction state on the server. This means that if transaction was implicitly ended by server-side logic, InTransaction becomes False.

See Also

  • StartTransaction
  • Commit
  • Rollback


TCustomDAConnection.LoginPrompt Property

TCustomDAConnection.LoginPrompt Property

Specifies whether a login dialog appears immediately before opening a new connection.

Class

TCustomDAConnection

Syntax

property LoginPrompt: Boolean default True;

Remarks

Specifies whether a login dialog appears immediately before opening a new connection. If ConnectDialog is not specified, the default connect dialog will be shown. The connect dialog will appear only if the OdacVcl unit appears to the uses clause.


TCustomDAConnection.Options Property

TCustomDAConnection.Options Property

Specifies the connection behavior.

Class

TCustomDAConnection

Syntax

property Options: TDAConnectionOptions;

Remarks

Set the properties of Options to specify the behaviour of the connection.

Descriptions of all options are in the table below.

Option Name | Description
DefaultSortType | Used to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.
DisconnectedMode | Used to open a connection only when needed for performing a server call and closes after performing the operation.
KeepDesignConnected | Used to prevent an application from establishing a connection at the time of startup.
LocalFailover | If True, the OnConnectionLost event occurs and a failover operation can be performed after connection breaks.

See Also

  • Working with Disconnected Mode
  • Working in an Unstable Network


TCustomDAConnection.Password Property

TCustomDAConnection.Password Property

Serves to supply a password for login.

Class

TCustomDAConnection

Syntax

property Password: string;

Remarks

Use the Password property to supply a password to handle server's request for a login. Application server can use the TOraSession.ProxySession property and verify user password itself.

Warning: Storing hard-coded user name and password entries as property values or in code for the OnLogin event handler can compromise server security.

See Also

  • Username
  • Server
  • TOraSession.ProxySession


TCustomDAConnection.Pooling Property

TCustomDAConnection.Pooling Property

Enables or disables using connection pool.

Class

TCustomDAConnection

Syntax

property Pooling: boolean default False;

Remarks

Normally, when TCustomDAConnection establishes connection with the server it takes server memory and time resources for allocating new server connection. For example, pooling can be very useful when using disconnect mode. If an application has wide user activity that forces many connect/disconnect operations, it may spend a lot of time on creating connection and sending requests to the server. TCustomDAConnection has software pool which stores open connections with identical parameters.

Connection pool uses separate thread that validates the pool every 30 seconds. Pool validation consists of checking each connection in the pool. If a connection is broken due to a network problem or another reason, it is deleted from the pool. The validation procedure removes also connections that are not used for a long time even if they are valid from the pool.

Set Pooling to True to enable pooling. Specify correct values for PoolingOptions. Two connections belong to the same pool if they have identical values for the parameters: MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime, TOraSession.Username, TOraSession.Server, TOraSession.ConnectMode, TOraSession.Options.

Note: Using Pooling := True can cause errors with working with temporary tables.

See Also

  • Username
  • Password
  • PoolingOptions


TCustomDAConnection.PoolingOptions Property

TCustomDAConnection.PoolingOptions Property

Specifies the behaviour of connection pool.

Class

TCustomDAConnection

Syntax

property PoolingOptions: TPoolingOptions;

Remarks

Set the properties of PoolingOptions to specify the behaviour of connection pool.

Descriptions of all options are in the table below.

Option Name | Description
ConnectionLifetime | Used to specify the maximum time during which an opened connection can be used by connection pool.
MaxPoolSize | Used to specify the maximum number of connections that can be opened in connection pool.
MinPoolSize | Used to specify the minimum number of connections that can be opened in the connection pool.
Validate | Used for a connection to be validated when it is returned from the pool.

See Also

  • Pooling


TCustomDAConnection.Server Property

TCustomDAConnection.Server Property

Serves to supply the server name for login.

Class

TCustomDAConnection

Syntax

property Server: string;

Remarks

Use the Server property to supply server name to handle server's request for a login.

See Also

  • Username
  • Password


TCustomDAConnection.Username Property

TCustomDAConnection.Username Property

Used to supply a user name for login.

Class

TCustomDAConnection

Syntax

property Username: string;

Remarks

Use the Username property to supply a user name to handle server's request for login. If this property is not set, and OS authentication is used, a connection can be established. Otherwise an error is arised.

Warning: Storing hard-coded user name and password entries as property values or in code for the OnLogin event handler can compromise server security.

See Also

  • Password
  • Server


TCustomDAConnection Methods

TCustomDAConnection Methods

Methods of the TCustomDAConnection class.

For a complete list of the TCustomDAConnection class members, see the TCustomDAConnection Members topic.

Public

Name | Description
ApplyUpdates | Overloaded. Applies changes in datasets.
Commit | Commits current transaction.
Connect | Establishes a connection to the server.
CreateDataSet | Creates a dataset component.
CreateSQL | Creates a component for queries execution.
Disconnect | Performs disconnect.
ExecProc | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx | Allows to execute a stored procedure or function.
ExecSQL | Executes a SQL statement with parameters.
ExecSQLEx | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames | Returns a database list from the server.
GetStoredProcNames | Returns a list of stored procedures from the server.
GetTableNames | Provides a list of available tables names.
MonitorMessage | Sends a specified message through the TCustomDASQLMonitor component.
RemoveFromPool | Marks the connection that should not be returned to the pool after disconnect.
Rollback | Discards all current data changes and ends transaction.
StartTransaction | Begins a new user transaction.

See Also

  • TCustomDAConnection Class
  • TCustomDAConnection Class Members


TCustomDAConnection.ApplyUpdates Overload

TCustomDAConnection.ApplyUpdates Overload

Applies changes in datasets.

Class

TCustomDAConnection

Overload List

Name | Description
ApplyUpdates | Applies changes from all active datasets.
ApplyUpdates(DataSets: array of TCustomDADataSet) | Applies changes from the specified datasets.


TCustomDAConnection.ApplyUpdates Method

TCustomDAConnection.ApplyUpdates Method

Applies changes from all active datasets.

Class

TCustomDAConnection

Syntax

procedure ApplyUpdates; overload; virtual

Remarks

Call the ApplyUpdates method to write all pending cached updates from all active datasets attached to this connection to a database or from specific datasets. The ApplyUpdates method passes cached data to the database for storage, takes care of committing or rolling back transactions, and clearing the cache when the operation is successful.

Using ApplyUpdates for connection is a preferred method of updating datasets rather than calling each individual dataset's ApplyUpdates method.

See Also

  • TMemDataSet.CachedUpdates
  • TMemDataSet.ApplyUpdates


TCustomDAConnection.ApplyUpdates Method

TCustomDAConnection.ApplyUpdates Method

Applies changes from the specified datasets.

Class

TCustomDAConnection

Syntax

procedure ApplyUpdates(DataSets: array of TCustomDADataSet); overload; virtual

Parameters
DataSets
A list of datasets changes in which are to be applied.

Remarks

Call the ApplyUpdates method to write all pending cached updates from the specified datasets. The ApplyUpdates method passes cached data to the database for storage, takes care of committing or rolling back transactions and clearing the cache when operation is successful.

Using ApplyUpdates for connection is a preferred method of updating datasets rather than calling each individual dataset's ApplyUpdates method.


TCustomDAConnection.Commit Method

TCustomDAConnection.Commit Method

Commits current transaction.

Class

TCustomDAConnection

Syntax

procedure Commit; virtual;

Remarks

Call the Commit method to commit current transaction. On commit server writes permanently all pending data updates associated with the current transaction to the database and then ends the transaction. The current transaction is the last transaction started by calling StartTransaction.

See Also

  • Rollback
  • StartTransaction
  • TOraDataSet.FetchAll


TCustomDAConnection.Connect Method

TCustomDAConnection.Connect Method

Establishes a connection to the server.

Class

TCustomDAConnection

Syntax

procedure Connect;

Remarks

Call the Connect method to establish a connection to the server. Connect sets the Connected property to True. If ConnectPrompt is True, Connect prompts user for login information as required by the server, or otherwise tries to establish a connection using values provided in the Username, Password, and Server properties.

If the Username and Password properties are not specified, then Oracle uses authentication information supplied at the operating system login process. For this feature to work make sure that your Oracle instance is appropriately tuned (see the Oracle documentation).

See Also

  • Disconnect
  • Username
  • Password
  • Server
  • ConnectDialog


TCustomDAConnection.CreateDataSet Method

TCustomDAConnection.CreateDataSet Method

Creates a dataset component.

Class

TCustomDAConnection

Syntax

function CreateDataSet: TCustomDADataSet; virtual;

Return Value
Returns a new instance of the class.

Remarks

Call the CreateDataSet method to return a new instance of the TCustomDADataSet class and associate it with this connection object. In the descendant classes this method should be overridden to create an appropriate descendant of the TCustomDADataset component.


TCustomDAConnection.CreateSQL Method

TCustomDAConnection.CreateSQL Method

Creates a component for queries execution.

Class

TCustomDAConnection

Syntax

function CreateSQL: TCustomDASQL; virtual;

Return Value
A new instance of the class.

Remarks

Call the CreateSQL to return a new instance of the TCustomDASQL class and associates it with this connection object. In the descendant classes this method should be overridden to create an appropriate descendant of the TCustomDASQL component.


TCustomDAConnection.Disconnect Method

TCustomDAConnection.Disconnect Method

Performs disconnect.

Class

TCustomDAConnection

Syntax

procedure Disconnect;

Remarks

Call the Disconnect method to drop a connection to database. Before the connection component is deactivated, all associated datasets are closed. Calling Disconnect is similar to setting the Connected property to False.

In most cases, closing a connection frees system resources allocated to the connection.

If user transaction is active, e.g. the InTransaction flag is set, calling to Disconnect commits the current user transaction.

Note: If a previously active connection is closed and then reopened, any associated datasets must be individually reopened; reopening the connection does not automatically reopen associated datasets.

See Also

  • Connect


TCustomDAConnection.ExecProc Method

TCustomDAConnection.ExecProc Method

Allows to execute stored procedure or function providing its name and parameters.

Class

TCustomDAConnection

Syntax

function ExecProc(Name: string; const Params: array of variant): variant; virtual;

Parameters
Name
Holds the name of the stored procedure or function.
Params
Holds the parameters of the stored procedure or function.
Return Value
the result of the stored procedure.

Remarks

Allows to execute stored procedure or function providing its name and parameters.

Use the following Name value syntax for executing specific overloaded routine: "StoredProcName:1" or "StoredProcName:5". The first example executes the first overloaded stored procedure, while the second example executes the fifth overloaded procedure.

Assign parameters' values to the Params array in exactly the same order and number as they appear in the stored procedure declaration. Out parameters of the procedure can be accessed with the ParamByName procedure.

If the value of an input parameter was not included to the Params array, parameter default value is taken. Only parameters at the end of the list can be unincluded to the Params array. If the parameter has no default value, the NULL value is sent.

Note: Stored functions unlike stored procedures return result values that are obtained internally through the RESULT parameter. You will no longer have to provide anonymous value in the Params array to describe the result of the function. The stored function result is obtained from the Params[0] indexed property or with the ParamByName('RESULT') method call.

For further examples of parameter usage see ExecSQL, ExecSQLEx.

Example

For example, having stored function declaration presented in Example 1), you may execute it and retrieve its result with commands presented in Example 2):

Example 1)
CREATE procedure MY_SUM (
      A INTEGER,
      B INTEGER)
RETURNS (
      RESULT INTEGER)
as
begin
   Result = a + b;
end;

Example 2)
Label1.Caption:= MyOraConnection1.ExecProc('My_Sum', [10, 20]);
Label2.Caption:= MyOraConnection1.ParamByName('Result').AsString;

See Also

  • ExecProcEx
  • ExecSQL
  • ExecSQLEx
  • TOraSession.ParamByName
  • TOraSession.SQL


TCustomDAConnection.ExecProcEx Method

TCustomDAConnection.ExecProcEx Method

Allows to execute a stored procedure or function.

Class

TCustomDAConnection

Syntax

function ExecProcEx(Name: string; const Params: array of variant): variant; virtual;

Parameters
Name
Holds the stored procedure name.
Params
Holds an array of pairs of parameters' names and values.
Return Value
the result of the stored procedure.

Remarks

Allows to execute a stored procedure or function. Provide the stored procedure name and its parameters to the call of ExecProcEx.

Use the following Name value syntax for executing specific overloaded routine: "StoredProcName:1" or "StoredProcName:5". The first example executes the first overloaded stored procedure, while the second example executes the fifth overloaded procedure.

Assign pairs of parameters' names and values to a Params array so that every name comes before its corresponding value when an array is being indexed.

Out parameters of the procedure can be accessed with the ParamByName procedure. If the value for an input parameter was not included to the Params array, the parameter default value is taken. If the parameter has no default value, the NULL value is sent.

Note: Stored functions unlike stored procedures return result values that are obtained internally through the RESULT parameter. You will no longer have to provide anonymous value in the Params array to describe the result of the function. Stored function result is obtained from the Params[0] indexed property or with the ParamByName('RESULT') method call.

For an example of parameters usage see ExecSQLEx.

Example

If you have some stored procedure accepting four parameters, and you want to provide values only for the first and fourth parameters, you should call ExecProcEx in the following way:

Connection.ExecProcEx('Some_Stored_Procedure', ['Param_Name1', 'Param_Value1', 'Param_Name4', 'Param_Value4']);

See Also

  • ExecSQL
  • ExecSQLEx
  • ExecProc


TCustomDAConnection.ExecSQL Method

TCustomDAConnection.ExecSQL Method

Executes a SQL statement with parameters.

Class

TCustomDAConnection

Syntax

function ExecSQL(Text: string; const Params: array of variant): variant; virtual;

Parameters
Text
a SQL statement to be executed.
Params
Array of parameter values arranged in the same order as they appear in SQL statement.
Return Value
Out parameter with the name Result will hold the result of function having data type dtString. Otherwise returns Null.

Remarks

Use the ExecSQL method to execute any SQL statement outside the TCustomDADataSet or TCustomDASQL components. Supply the Params array with the values of parameters arranged in the same order as they appear in a SQL statement which itself is passed to the Text string parameter.

The Params array must contain all IN and OUT parameters defined in SQL statement. For OUT parameters provide any values of valid types so that they are explicitly defined before call to an ExecSQL method.

Out parameter with the name Result will hold the result of function having data type dtString. If none of the parameters in the Text statement is named Result, ExecSQL will return Null.

To get the values of OUT parameters use the ParamByName function.

Example

OraSession.ExecSQL('begin :A:= :B + :C; end;', [0, 5, 3]);
A:= OraSession.ParamByName('A').AsInteger;

See Also

  • ExecSQLEx
  • ExecProc
  • TOraSession.SQL


TCustomDAConnection.ExecSQLEx Method

TCustomDAConnection.ExecSQLEx Method

Executes any SQL statement outside the TQuery or TSQL components.

Class

TCustomDAConnection

Syntax

function ExecSQLEx(Text: string; const Params: array of variant): variant; virtual;

Parameters
Text
a SQL statement to be executed.
Params
Array of parameter values arranged in the same order as they appear in SQL statement.
Return Value
Out parameter with the name Result will hold the result of a function having data type dtString. Otherwise returns Null.

Remarks

Call the ExecSQLEx method to execute any SQL statement outside the TQuery or TSQL components. Supply the Params array with values arranged in pairs of parameter name and its value. This way each parameter name in the array is found on even index values whereas parameter value is on odd index value but right after its parameter name. The parameter pairs must be arranged according to their occurrence in a SQL statement which itself is passed in the Text string parameter.

The Params array must contain all IN and OUT parameters defined in the SQL statement. For OUT parameters provide any values of valid types so that they are explicitly defined before call to the ExecSQLEx method.

Out parameter with the name Result will hold the result of a function having data type dtString. If neither of the parameters in the Text statement is named Result, ExecSQLEx will return Null.

To get the values of OUT parameters use the ParamByName function.

Example

OraConnection.ExecSQLEx('begin :A:= :B + :C; end;',
   ['A', 0, 'B', 5, 'C', 3]);
A:= OraConnection.ParamByName('A').AsInteger;

See Also

  • ExecSQL


TCustomDAConnection.GetDatabaseNames Method

TCustomDAConnection.GetDatabaseNames Method

Returns a database list from the server.

Class

TCustomDAConnection

Syntax

procedure GetDatabaseNames(List: _TStrings); virtual;

Parameters
List
A TStrings descendant that will be filled with database names.

Remarks

Populates a string list with the names of databases.

Note: Any contents already in the target string list object are eliminated and overwritten by data produced by GetDatabaseNames.

See Also

  • GetTableNames
  • GetStoredProcNames


TCustomDAConnection.GetStoredProcNames Method

TCustomDAConnection.GetStoredProcNames Method

Returns a list of stored procedures from the server.

Class

TCustomDAConnection

Syntax

procedure GetStoredProcNames(List: _TStrings; AllProcs: boolean = False); virtual;

Parameters
List
A TStrings descendant that will be filled with the names of stored procedures in the database.
AllProcs
True, if stored procedures from all schemas or including system procudures (depending on the server) are returned. False otherwise.

Remarks

Call the GetStoredProcNames method to get the names of available stored procedures and functions. GetStoredProcNames populates a string list with the names of stored procs in the database. If AllProcs = True, the procedure returns to the List parameter the names of the stored procedures that belong to all schemas; otherwise, List will contain the names of functions that belong to the current schema.

Note: Any contents already in the target string list object are eliminated and overwritten by data produced by GetStoredProcNames.

See Also

  • GetDatabaseNames
  • GetTableNames
  • GetTableNames


TCustomDAConnection.GetTableNames Method

TCustomDAConnection.GetTableNames Method

Provides a list of available tables names.

Class

TCustomDAConnection

Syntax

procedure GetTableNames(List: _TStrings; AllTables: boolean = False); virtual;

Parameters
List
A TStrings descendant that will be filled with table names.
AllTables
True, if procedure returns all table names including the names of system tables to the List parameter.

Remarks

Call the GetTableNames method to get the names of available tables. Populates a string list with the names of tables in the database. If AllTables = True, procedure returns all table names including the names of system tables to the List parameter, otherwise List will not contain the names of system tables. If AllTables = True, the procedure returns to the List parameter the names of the tables that belong to all schemas; otherwise, List will contain the names of the tables that belong to the current schema.

Note: Any contents already in the target string list object are eliminated and overwritten by the data produced by GetTableNames.

See Also

  • GetDatabaseNames
  • GetStoredProcNames


TCustomDAConnection.MonitorMessage Method

TCustomDAConnection.MonitorMessage Method

Sends a specified message through the TCustomDASQLMonitor component.

Class

TCustomDAConnection

Syntax

procedure MonitorMessage(const Msg: string);

Parameters
Msg
Message text that will be sent.

Remarks

Call the MonitorMessage method to output specified message via the TCustomDASQLMonitor component.

See Also

  • TCustomDASQLMonitor


TCustomDAConnection.RemoveFromPool Method

TCustomDAConnection.RemoveFromPool Method

Marks the connection that should not be returned to the pool after disconnect.

Class

TCustomDAConnection

Syntax

procedure RemoveFromPool;

Remarks

Call the RemoveFromPool method to mark the connection that should be deleted after disconnect instead of returning to the connection pool.

See Also

  • Pooling
  • PoolingOptions


TCustomDAConnection.Rollback Method

TCustomDAConnection.Rollback Method

Discards all current data changes and ends transaction.

Class

TCustomDAConnection

Syntax

procedure Rollback; virtual;

Remarks

Call the Rollback method to discard all updates, insertions, and deletions of data associated with the current transaction to the database server and then end the transaction. The current transaction is the last transaction started by calling StartTransaction.

See Also

  • Commit
  • StartTransaction
  • TOraDataSet.FetchAll


TCustomDAConnection.StartTransaction Method

TCustomDAConnection.StartTransaction Method

Begins a new user transaction.

Class

TCustomDAConnection

Syntax

procedure StartTransaction; virtual;

Remarks

Call the StartTransaction method to begin a new user transaction against the database server. Before calling StartTransaction, an application should check the status of the InTransaction property. If InTransaction is True, indicating that a transaction is already in progress, a subsequent call to StartTransaction without first calling Commit or Rollback to end the current transaction raises EDatabaseError. Calling StartTransaction when connection is closed also raises EDatabaseError.

Updates, insertions, and deletions that take place after a call to StartTransaction are held by the server until an application calls Commit to save the changes, or Rollback to cancel them.

See Also

  • Commit
  • Rollback
  • InTransaction


TCustomDAConnection Events

TCustomDAConnection Events

Events of the TCustomDAConnection class.

For a complete list of the TCustomDAConnection class members, see the TCustomDAConnection Members topic.

Public

Name | Description
OnConnectionLost | This event occurs when connection was lost.
OnError | This event occurs when an error has arisen in the connection.

See Also

  • TCustomDAConnection Class
  • TCustomDAConnection Class Members


TCustomDAConnection.OnConnectionLost Event

TCustomDAConnection.OnConnectionLost Event

This event occurs when connection was lost.

Class

TCustomDAConnection

Syntax

property OnConnectionLost: TConnectionLostEvent;

Remarks

Write the OnConnectionLost event handler to process fatal errors and perform failover.

Note: you should explicitly add the MemData unit to the 'uses' list to use the OnConnectionLost event handler.


TCustomDAConnection.OnError Event

TCustomDAConnection.OnError Event

This event occurs when an error has arisen in the connection.

Class

TCustomDAConnection

Syntax

property OnError: TDAConnectionErrorEvent;

Remarks

Write the OnError event handler to respond to errors that arise with connection. Check the E parameter to get the error code. Set the Fail parameter to False to prevent an error dialog from being displayed and to raise the EAbort exception to cancel current operation. The default value of Fail is True.


TCustomDADataSet Class

TCustomDADataSet Class

Encapsulates general set of properties, events, and methods for working with data accessed through various database engines.

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

Unit

DBAccess

Syntax

TCustomDADataSet = class(TMemDataSet);

Remarks

TCustomDADataSet encapsulates general set of properties, events, and methods for working with data accessed through various database engines. All database-specific features are supported by descendants of TCustomDADataSet.

Applications should not use TCustomDADataSet objects directly.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet


TCustomDADataSet Members

TCustomDADataSet Members

TCustomDADataSet class overview.

Properties

Name | Description
BaseSQL | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
Connection | Used to specify a connection object to use to connect to a data store.
Debug | Used to display executing statement, all its parameters' values, and the type of parameters.
DetailFields | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
FetchRows | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsQuery | Used to check whether SQL statement returns rows.
KeyFields | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating the database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
MacroCount | Used to get the number of macros associated with the Macros property.
Macros | Makes it possible to change SQL queries easily.
MasterFields | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource | Used to specify the data source component which binds current dataset to the master one.
Options | Used to specify the behaviour of TCustomDADataSet object.
ParamCheck | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount | Used to indicate how many parameters are there in the Params property.
Params | Used to view and set parameter names, values, and data types dynamically.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshOptions | Used to indicate when the editing record is refreshed.
RowsAffected | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
SQL | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLLock | Used to specify a SQL statement that will be used to perform a record lock.
SQLRefresh | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLUpdate | Used to specify a SQL statement that will be used when applying an update to a dataset.
UniDirectional | Used if an application does not need bidirectional access to records in the result set.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
Execute | Executes a SQL statement on the server.
Executing | Indicates whether SQL statement is still being executed.
Fetched | Used to learn whether TCustomDADataSet has already fetched all rows.
Fetching | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey | Searches for a record which contains specified field values.
FindMacro | Indicates whether a specified macro exists in a dataset.
FindNearest | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam | Determines if a parameter with the specified name exists in a dataset.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType | Returns internal field types defined in the MemData and accompanying modules.
GetFieldObject | Returns a multireference shared object from field.
GetFieldPrecision | Retrieves the precision of a number field.
GetFieldScale | Retrieves the scale of a number field.
GetOrderBy | Retrieves an ORDER BY clause from a SQL statement.
GotoCurrent | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock | Locks the current record.
MacroByName | Finds a Macro with the name passed in Name.
ParamByName | Sets or uses parameter information for a specific parameter based on its name.
Prepare | Allocates, opens, and parses cursor for a query.
RefreshRecord | Actualizes field values for the current record.
RestoreSQL | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy | Builds an ORDER BY clause of a SELECT statement.
SQLSaved | Determines if the SQL property value was saved to the BaseSQL property.
UnLock | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
AfterExecute | Occurs after a component has executed a query to database.
AfterFetch | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TCustomDADataSet Properties

TCustomDADataSet Properties

Properties of the TCustomDADataSet class.

For a complete list of the TCustomDADataSet class members, see the TCustomDADataSet Members topic.

Public

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
BaseSQL | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection | Used to specify a connection object to use to connect to a data store.
Debug | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DetailFields | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
FetchRows | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsQuery | Used to check whether SQL statement returns rows.
KeyFields | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating the database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
MacroCount | Used to get the number of macros associated with the Macros property.
Macros | Makes it possible to change SQL queries easily.
MasterFields | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource | Used to specify the data source component which binds current dataset to the master one.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options | Used to specify the behaviour of TCustomDADataSet object.
ParamCheck | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount | Used to indicate how many parameters are there in the Params property.
Params | Used to view and set parameter names, values, and data types dynamically.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshOptions | Used to indicate when the editing record is refreshed.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SQL | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLLock | Used to specify a SQL statement that will be used to perform a record lock.
SQLRefresh | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLUpdate | Used to specify a SQL statement that will be used when applying an update to a dataset.
UniDirectional | Used if an application does not need bidirectional access to records in the result set.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TCustomDADataSet Class
  • TCustomDADataSet Class Members


TCustomDADataSet.BaseSQL Property

TCustomDADataSet.BaseSQL Property

Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.

Class

TCustomDADataSet

Syntax

property BaseSQL: string;

Remarks

Use the BaseSQL property to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL, only macros are expanded. SQL text with all these changes can be returned by FinalSQL.

See Also

  • FinalSQL
  • AddWhere
  • SaveSQL
  • SQLSaved
  • RestoreSQL


TCustomDADataSet.Connection Property

TCustomDADataSet.Connection Property

Used to specify a connection object to use to connect to a data store.

Class

TCustomDADataSet

Syntax

property Connection: TCustomDAConnection;

Remarks

Use the Connection property to specify a connection object that will be used to connect to a data store.

Set at design-time by selecting from the list of provided TCustomDAConnection or its descendant class objects.

At runtime, link an instance of a TCustomDAConnection descendant to the Connection property.


TCustomDADataSet.Debug Property

TCustomDADataSet.Debug Property

Used to display executing statement, all its parameters' values, and the type of parameters.

Class

TCustomDADataSet

Syntax

property Debug: boolean default False;

Remarks

Set the Debug property to True to display executing statement and all its parameters' values. Also displays the type of parameters.

You should add the OdacVcl unit to the uses clause of any unit in your project to make the Debug property work.

Note: To enable debug window you should explicitly include the OdacVcl (OdacClx under Kylix) unit to your project.

See Also

  • TCustomDASQL.Debug


TCustomDADataSet.DetailFields Property

TCustomDADataSet.DetailFields Property

Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.

Class

TCustomDADataSet

Syntax

property DetailFields: string;

Remarks

Use the DetailFields property to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship. DetailFields is a string containing one or more field names in the detail table. Separate field names with semicolons.

Use Field Link Designer to set the value in design time.

See Also

  • MasterFields
  • MasterSource


TCustomDADataSet.FetchRows Property

TCustomDADataSet.FetchRows Property

Used to define the number of rows to be transferred across the network at the same time.

Class

TCustomDADataSet

Syntax

property FetchRows: integer default 25;

Remarks

The number of rows that will be transferred across the network at the same time. This property can have a great impact on performance. So it is preferable to choose the optimal value of the FetchRows property for each SQL statement and software/hardware configuration experimentally.

The default value is 25.


TCustomDADataSet.FilterSQL Property

TCustomDADataSet.FilterSQL Property

Used to change the WHERE clause of SELECT statement and reopen a query.

Class

TCustomDADataSet

Syntax

property FilterSQL: string;

Remarks

The FilterSQL property is similar to the Filter property, but it changes the WHERE clause of SELECT statement and reopens query. Syntax is the same to the WHERE clause.

Example

Query1.FilterSQL := 'Dept >= 20 and DName LIKE ''M%''';

See Also

  • AddWhere


TCustomDADataSet.FinalSQL Property

TCustomDADataSet.FinalSQL Property

Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.

Class

TCustomDADataSet

Syntax

property FinalSQL: string;

Remarks

Use FinalSQL to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros. This is the exact statement that will be passed on to the database server.

See Also

  • FinalSQL
  • AddWhere
  • SaveSQL
  • SQLSaved
  • RestoreSQL
  • BaseSQL


TCustomDADataSet.IsQuery Property

TCustomDADataSet.IsQuery Property

Used to check whether SQL statement returns rows.

Class

TCustomDADataSet

Syntax

property IsQuery: boolean;

Remarks

After the TCustomDADataSet component is prepared, the IsQuery property returns True if SQL statement is a SELECT query.

Use the IsQuery property to check whether the SQL statement returns rows or not.

IsQuery is a read-only property. Reading IsQuery on unprepared dataset raises an exception.


TCustomDADataSet.KeyFields Property

TCustomDADataSet.KeyFields Property

Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating the database.

Class

TCustomDADataSet

Syntax

property KeyFields: string;

Remarks

TCustomDADataset uses the KeyFields property to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating the database. For this feature KeyFields may hold a list of semicolon-delimited field names. If KeyFields is not defined before opening dataset, TCustomDADataset requests information about primary keys from server sending an additional query.

Assign the KeyFields property with a string containing the name of a field which will be later assigned with Oracle sequenced values. Beforehand Oracle sequence must be created and its name passed to the TOraDataSet.KeySequence property.

Sequences are generated when either Insert or Post method is called. Which of these two methods is used to modify the database is determined by the TOraDataSet.SequenceMode property.

Note: Though keys may be created across a number of table fields, sequence is generated only for the first field found in the KeyFields property.

See Also

  • SQLDelete
  • SQLInsert
  • SQLRefresh
  • SQLUpdate
  • TOraDataSet.KeySequence
  • TOraDataSet.SequenceMode


TCustomDADataSet.MacroCount Property

TCustomDADataSet.MacroCount Property

Used to get the number of macros associated with the Macros property.

Class

TCustomDADataSet

Syntax

property MacroCount: word;

Remarks

Use the MacroCount property to get the number of macros associated with the Macros property.

See Also

  • Macros


TCustomDADataSet.Macros Property

TCustomDADataSet.Macros Property

Makes it possible to change SQL queries easily.

Class

TCustomDADataSet

Syntax

property Macros: TMacros stored False;

Remarks

With the help of macros you can easily change SQL query text at design- or runtime. Marcos extend abilities of parameters and allow to change conditions in a WHERE clause or sort order in an ORDER BY clause. You just insert &MacroName in the SQL query text and change value of macro in the Macro property editor at design time or call the MacroByName function at run time. At the time of opening the query macro is replaced by its value.

Example

OraQuery.SQL:= 'SELECT * FROM Dept ORDER BY &Order';
OraQuery.MacroByName('Order').Value:= 'DeptNo';
OraQuery.Open;

See Also

  • TMacro
  • MacroByName
  • Params


TCustomDADataSet.MasterFields Property

TCustomDADataSet.MasterFields Property

Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.

Class

TCustomDADataSet

Syntax

property MasterFields: string;

Remarks

Use the MasterFields property after setting the MasterSource property to specify the names of one or more fields that are used as foreign keys for this dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.

MasterFields is a string containing one or more field names in the master table. Separate field names with semicolons.

Each time the current record in the master table changes, the new values in these fields are used to select corresponding records in this table for display.

Use Field Link Designer to set the values at design time after setting the MasterSource property.

See Also

  • DetailFields
  • MasterSource
  • Working with Master/Detail Relationships


TCustomDADataSet.MasterSource Property

TCustomDADataSet.MasterSource Property

Used to specify the data source component which binds current dataset to the master one.

Class

TCustomDADataSet

Syntax

property MasterSource: TDataSource;

Remarks

The MasterSource property specifies the data source component which binds current dataset to the master one.

TCustomDADataset uses MasterSource to extract foreign key fields values from the master dataset when building master/detail relationship between two datasets. MasterSource must point to another dataset; it cannot point to this dataset component.

When MasterSource is not nil dataset fills parameter values with corresponding field values from the current record of the master dataset.

Note: Do not set the DataSource property when building master/detail relationships. Although it points to the same object as the MasterSource property, it may lead to undesirable results.

See Also

  • MasterFields
  • DetailFields
  • Working with Master/Detail Relationships


TCustomDADataSet.Options Property

TCustomDADataSet.Options Property

Used to specify the behaviour of TCustomDADataSet object.

Class

TCustomDADataSet

Syntax

property Options: TDADataSetOptions;

Remarks

Set the properties of Options to specify the behaviour of a TCustomDADataSet object.

Descriptions of all options are in the table below.

Option Name | Description
AutoPrepare | Used to execute automatic Prepare on the query execution.
CacheCalcFields | Used to enable caching of the TField.Calculated and TField.Lookup fields.
DefaultValues | Used to request default values/expressions from the server and assign them to the DefaultExpression property.
DetailDelay | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsOrigin | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
LocalMasterDetail | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RemoveOnRefresh | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams | Used to return the new value of fields to dataset after insert or update.
SetFieldsReadOnly | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

See Also

  • Working with Master/Detail Relationships
  • TMemDataSet.CachedUpdates


TCustomDADataSet.ParamCheck Property

TCustomDADataSet.ParamCheck Property

Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.

Class

TCustomDADataSet

Syntax

property ParamCheck: boolean default True;

Remarks

Use the ParamCheck property to specify whether parameters for the Params property are generated automatically after the SQL property was changed.

Set ParamCheck to True to let dataset automatically generate the Params property for the dataset based on a SQL statement.

Setting ParamCheck to False can be used if the dataset component passes to a server the DDL statements that contain, for example, declarations of stored procedures which themselves will accept parameterized values. The default value is True.

See Also

  • Params


TCustomDADataSet.ParamCount Property

TCustomDADataSet.ParamCount Property

Used to indicate how many parameters are there in the Params property.

Class

TCustomDADataSet

Syntax

property ParamCount: word;

Remarks

Use the ParamCount property to determine how many parameters are there in the Params property.

See Also

  • Params


TCustomDADataSet.Params Property

TCustomDADataSet.Params Property

Used to view and set parameter names, values, and data types dynamically.

Class

TCustomDADataSet

Syntax

property Params: TDAParams stored False;

Remarks

Contains the parameters for a query's SQL statement.

Access Params at runtime to view and set parameter names, values, and data types dynamically (at design time use the Parameters editor to set the parameter information). Params is a zero-based array of parameter records. Index specifies the array element to access.

An easier way to set and retrieve parameter values when the name of each parameter is known is to call ParamByName.

See Also

  • ParamByName
  • Macros


TCustomDADataSet.ReadOnly Property

TCustomDADataSet.ReadOnly Property

Used to prevent users from updating, inserting, or deleting data in the dataset.

Class

TCustomDADataSet

Syntax

property ReadOnly: boolean default False;

Remarks

Use the ReadOnly property to prevent users from updating, inserting, or deleting data in the dataset. By default, ReadOnly is False, meaning that users can potentially alter data stored in the dataset.

To guarantee that users cannot modify or add data to a dataset, set ReadOnly to True.

When ReadOnly is True, the dataset's CanModify property is False.


TCustomDADataSet.RefreshOptions Property

TCustomDADataSet.RefreshOptions Property

Used to indicate when the editing record is refreshed.

Class

TCustomDADataSet

Syntax

property RefreshOptions: TRefreshOptions default [];

Remarks

Use the RefreshOptions property to determine when the editing record is refreshed.

Refresh is performed by the RefreshRecord method.

It queries the current record and replaces one in the dataset. Refresh record is useful when the table has triggers or the table fields have default values. Use roBeforeEdit to get actual data before editing.

The default value is [].

See Also

  • RefreshRecord


TCustomDADataSet.RowsAffected Property

TCustomDADataSet.RowsAffected Property

Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.

Class

TCustomDADataSet

Syntax

property RowsAffected: integer;

Remarks

Check RowsAffected to determine how many rows were inserted, updated, or deleted during the last query operation. If RowsAffected is -1, the query has not inserted, updated, or deleted any rows.


TCustomDADataSet.SQL Property

TCustomDADataSet.SQL Property

Used to provide a SQL statement that a query component executes when its Open method is called.

Class

TCustomDADataSet

Syntax

property SQL: _TStrings;

Remarks

Use the SQL property to provide a SQL statement that a query component executes when its Open method is called. At the design time the SQL property can be edited by invoking the String List editor in Object Inspector.

When SQL is changed, TCustomDADataSet calls Close and UnPrepare.

See Also

  • SQLInsert
  • SQLUpdate
  • SQLDelete
  • SQLRefresh


TCustomDADataSet.SQLDelete Property

TCustomDADataSet.SQLDelete Property

Used to specify a SQL statement that will be used when applying a deletion to a record.

Class

TCustomDADataSet

Syntax

property SQLDelete: _TStrings;

Remarks

Use the SQLDelete property to specify the SQL statement that will be used when applying a deletion to a record. Statements can be parameterized queries.

To create a SQLDelete statement at design-time, use the query statements editor.

Example

DELETE FROM Orders
   WHERE
      OrderID = :Old_OrderID

See Also

  • SQL
  • SQLInsert
  • SQLUpdate
  • SQLRefresh


TCustomDADataSet.SQLInsert Property

TCustomDADataSet.SQLInsert Property

Used to specify the SQL statement that will be used when applying an insertion to a dataset.

Class

TCustomDADataSet

Syntax

property SQLInsert: _TStrings;

Remarks

Use the SQLInsert property to specify the SQL statement that will be used when applying an insertion to a dataset. Statements can be parameterized queries. Names of the parameters should be the same as field names. Parameters prefixed with OLD_ allow using current values of fields prior to the actual operation.

Use ReturnParam to return OUT parameters back to dataset.

To create a SQLInsert statement at design-time, use the query statements editor.

See Also

  • SQL
  • SQLUpdate
  • SQLDelete
  • SQLRefresh


TCustomDADataSet.SQLLock Property

TCustomDADataSet.SQLLock Property

Used to specify a SQL statement that will be used to perform a record lock.

Class

TCustomDADataSet

Syntax

property SQLLock: _TStrings;

Remarks

Use the SQLLock property to specify a SQL statement that will be used to perform a record lock. Statements can be parameterized queries. Names of the parameters should be the same as field names. The parameters prefixed with OLD_ allow to use current values of fields prior to the actual operation.

To create a SQLLock statement at design-time, the use query statement editor.

See Also

  • SQL
  • SQLInsert
  • SQLUpdate
  • SQLDelete
  • SQLRefresh


TCustomDADataSet.SQLRefresh Property

TCustomDADataSet.SQLRefresh Property

Used to specify a SQL statement that will be used to refresh current record by calling the RefreshRecord procedure.

Class

TCustomDADataSet

Syntax

property SQLRefresh: _TStrings;

Remarks

Use the SQLRefresh property to specify a SQL statement that will be used to refresh current record by calling the RefreshRecord procedure.

Different behavior is observed when the SQLRefresh property is assigned with a single WHERE clause that holds frequently altered search condition. In this case the WHERE clause from SQLRefresh is combined with the same clause of the SELECT statement in a SQL property and this final query is then sent to the database server.

To create a SQLRefresh statement at design-time, use the query statements editor.

Example

SELECT Shipname FROM Orders
   WHERE
      OrderID = :OrderID

See Also

  • RefreshRecord
  • SQL
  • SQLInsert
  • SQLUpdate
  • SQLDelete


TCustomDADataSet.SQLUpdate Property

TCustomDADataSet.SQLUpdate Property

Used to specify a SQL statement that will be used when applying an update to a dataset.

Class

TCustomDADataSet

Syntax

property SQLUpdate: _TStrings;

Remarks

Use the SQLUpdate property to specify a SQL statement that will be used when applying an update to a dataset. Statements can be parameterized queries. Names of the parameters should be the same as field names. The parameters prefixed with OLD_ allow to use current values of fields prior to the actual operation.

Use ReturnParam to return OUT parameters back to the dataset.

To create a SQLUpdate statement at design-time, use the query statement editor.

Example

UPDATE Orders
   set
      ShipName = :ShipName,
   WHERE
      OrderID = :Old_OrderID

See Also

  • SQL
  • SQLInsert
  • SQLDelete
  • SQLRefresh


TCustomDADataSet.UniDirectional Property

TCustomDADataSet.UniDirectional Property

Used if an application does not need bidirectional access to records in the result set.

Class

TCustomDADataSet

Syntax

property UniDirectional: boolean default False;

Remarks

Traditionally SQL cursors are unidirectional. They can travel only forward through a dataset. TCustomDADataset, however, permits bidirectional travelling by caching records. If an application does not need bidirectional access to the records in the result set, set UniDirectional to True. When UniDirectional is True, an application requires less memory and performance is improved.

The default value of UniDirectional is False, enabling forward and backward navigation.

See Also

  • TOraDataSet.FetchAll


TCustomDADataSet Methods

TCustomDADataSet Methods

Methods of the TCustomDADataSet class.

For a complete list of the TCustomDADataSet class members, see the TCustomDADataSet Members topic.

Public

Name | Description
AddWhere | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
Execute | Executes a SQL statement on the server.
Executing | Indicates whether SQL statement is still being executed.
Fetched | Used to learn whether TCustomDADataSet has already fetched all rows.
Fetching | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey | Searches for a record which contains specified field values.
FindMacro | Indicates whether a specified macro exists in a dataset.
FindNearest | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam | Determines if a parameter with the specified name exists in a dataset.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType | Returns internal field types defined in the MemData and accompanying modules.
GetFieldObject | Returns a multireference shared object from field.
GetFieldPrecision | Retrieves the precision of a number field.
GetFieldScale | Retrieves the scale of a number field.
GetOrderBy | Retrieves an ORDER BY clause from a SQL statement.
GotoCurrent | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock | Locks the current record.
MacroByName | Finds a Macro with the name passed in Name.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
ParamByName | Sets or uses parameter information for a specific parameter based on its name.
Prepare | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
RefreshRecord | Actualizes field values for the current record.
RestoreSQL | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy | Builds an ORDER BY clause of a SELECT statement.
SQLSaved | Determines if the SQL property value was saved to the BaseSQL property.
UnLock | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TCustomDADataSet Class
  • TCustomDADataSet Class Members


TCustomDADataSet.AddWhere Method

TCustomDADataSet.AddWhere Method

Adds condition to the WHERE clause of SELECT statement in the SQL property.

Class

TCustomDADataSet

Syntax

procedure AddWhere(Condition: string);

Parameters
Condition
Holds the condition that will be added to the WHERE clause.

Remarks

Call the AddWhere method to add a condition to the WHERE clause of SELECT statement in the SQL property.

If SELECT has no WHERE clause, AddWhere creates it.

Note: The AddWhere method is implicitly called by RefreshRecord. The AddWhere method works for the SELECT statements only.

See Also

  • DeleteWhere


TCustomDADataSet.ApplyUpdates Method

TCustomDADataSet.ApplyUpdates Method

Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.

Class

TCustomDADataSet

Syntax

procedure ApplyUpdates; override;

Remarks

Call the ApplyUpdates method to write all updated, inserted, and deleted records from the client dataset to the database or source dataset.


TCustomDADataSet.CreateBlobStream Method

TCustomDADataSet.CreateBlobStream Method

Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.

Class

TCustomDADataSet

Syntax

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;

Parameters
Field
Holds the BLOB field for reading data from or writing data to from a stream.
Mode
Holds the stream mode, for which the stream will be used.
Return Value
The BLOB Stream.

Remarks

Call the CreateBlobStream method to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter. It must be a TBlobField component. You can specify whether the stream will be used for reading, writing, or updating the contents of the field with the Mode parameter.


TCustomDADataSet.DeleteWhere Method

TCustomDADataSet.DeleteWhere Method

Removes WHERE clause from the SQL property and assigns the BaseSQL property.

Class

TCustomDADataSet

Syntax

procedure DeleteWhere;

Remarks

Call the DeleteWhere method to remove WHERE clause from the the SQL property and assign BaseSQL.

See Also

  • AddWhere
  • BaseSQL


TCustomDADataSet.Execute Method

TCustomDADataSet.Execute Method

Executes a SQL statement on the server.

Class

TCustomDADataSet

Syntax

procedure Execute; virtual;

Remarks

Call the Execute method to execute a SQL statement on the server. If SQL statement is a query, Execute calls the Open method.

Execute implicitly prepares SQL statement by calling the Prepare method if the Options option is set to True and the statement has not been prepared yet. To speed up the performance in case of multiple Execute calls, an application should call Prepare before calling the Execute method for the first time.

See Also

  • AfterExecute
  • Executing
  • Prepare


TCustomDADataSet.Executing Method

TCustomDADataSet.Executing Method

Indicates whether SQL statement is still being executed.

Class

TCustomDADataSet

Syntax

function Executing: boolean;

Return Value
True, if SQL statement is still being executed.

Remarks

Check Executing to learn whether TCustomDADataSet is still executing SQL statement. Use the Executing method if NonBlocking is True.


TCustomDADataSet.Fetched Method

TCustomDADataSet.Fetched Method

Used to learn whether TCustomDADataSet has already fetched all rows.

Class

TCustomDADataSet

Syntax

function Fetched: boolean; virtual;

Return Value
True, if all rows are fetched.

Remarks

Check Fetched to learn whether TCustomDADataSet has already fetched all rows.

See Also

  • Fetching


TCustomDADataSet.Fetching Method

TCustomDADataSet.Fetching Method

Used to learn whether TCustomDADataSet is still fetching rows.

Class

TCustomDADataSet

Syntax

function Fetching: boolean;

Return Value
True, if TCustomDADataSet is still fetching rows.

Remarks

Check Fetching to learn whether TCustomDADataSet is still fetching rows. Use the Fetching method if NonBlocking is True.

See Also

  • Executing


TCustomDADataSet.FetchingAll Method

TCustomDADataSet.FetchingAll Method

Used to learn whether TCustomDADataSet is fetching all rows to the end.

Class

TCustomDADataSet

Syntax

function FetchingAll: boolean;

Return Value
True, if TCustomDADataSet is fetching all rows to the end.

Remarks

Check FetchingAll to learn whether TCustomDADataSet is fetching all rows to the end.

See Also

  • Executing


TCustomDADataSet.FindKey Method

TCustomDADataSet.FindKey Method

Searches for a record which contains specified field values.

Class

TCustomDADataSet

Syntax

function FindKey(const KeyValues: array of System.TVarRec): Boolean;

Parameters
KeyValues
Holds a key.

Remarks

Call the FindKey method to search for a specific record in a dataset. KeyValues holds a comma-delimited array of field values, that is called a key.

This function is provided for BDE compatibility only. It is recommended to use functions TMemDataSet.Locate and TMemDataSet.LocateEx for the record search.


TCustomDADataSet.FindMacro Method

TCustomDADataSet.FindMacro Method

Indicates whether a specified macro exists in a dataset.

Class

TCustomDADataSet

Syntax

function FindMacro(const Value: string): TMacro;

Parameters
Value
Holds the name of the macro to search for.
Return Value
a TMacro object, if a macro with matching name was found, otherwise returns nil.

Remarks

Call the FindMacro method to determine if a specified macro exists. If FindMacro finds a macro with a matching name, it returns a TMacro object for the specified Name. Otherwise it returns nil.

See Also

  • TMacro
  • Macros
  • MacroByName


TCustomDADataSet.FindNearest Method

TCustomDADataSet.FindNearest Method

Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.

Class

TCustomDADataSet

Syntax

procedure FindNearest(const KeyValues: array of System.TVarRec);

Parameters
KeyValues
Holds the values of the record key fields to which the cursor should be moved.

Remarks

Call the FindNearest method to move the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter. If there are no records that match or exceed the specified criteria, the cursor will not move.

This function is provided for BDE compatibility only. It is recommended to use functions TMemDataSet.Locate and TMemDataSet.LocateEx for the record search.

See Also

  • TMemDataSet.Locate
  • TMemDataSet.LocateEx
  • FindKey


TCustomDADataSet.FindParam Method

TCustomDADataSet.FindParam Method

Determines if a parameter with the specified name exists in a dataset.

Class

TCustomDADataSet

Syntax

function FindParam(const Value: string): TDAParam;

Parameters
Value
Holds the name of the param for which to search.
Return Value
the TDAParam object for the specified Name. Otherwise it returns nil.

Remarks

Call the FindParam method to determine if a specified param component exists in a dataset. Name is the name of the param for which to search. If FindParam finds a param with a matching name, it returns a TDAParam object for the specified Name. Otherwise it returns nil.

See Also

  • Params
  • ParamByName


TCustomDADataSet.GetDataType Method

TCustomDADataSet.GetDataType Method

Returns internal field types defined in the MemData and accompanying modules.

Class

TCustomDADataSet

Syntax

function GetDataType(const FieldName: string): integer; virtual;

Parameters
FieldName
Holds the name of the field.
Return Value
internal field types defined in MemData and accompanying modules.

Remarks

Call the GetDataType method to return internal field types defined in the MemData and accompanying modules. Internal field data types extend the TFieldType type of VCL by specific database server data types. For example, ftString, ftFile, ftObject.


TCustomDADataSet.GetFieldObject Method

TCustomDADataSet.GetFieldObject Method

Returns a multireference shared object from field.

Class

TCustomDADataSet

Syntax

function GetFieldObject(Field: TField): TSharedObject; overload;function GetFieldObject(FieldDesc: TFieldDesc): TSharedObject; overload;function GetFieldObject(const FieldName: string): TSharedObject; overload;

Parameters
FieldName
Holds the field name.
Return Value
multireference shared object.

Remarks

Call the GetFieldObject method to return a multireference shared object from field. If field does not hold one of the TSharedObject descendants, GetFieldObject raises an exception.


TCustomDADataSet.GetFieldPrecision Method

TCustomDADataSet.GetFieldPrecision Method

Retrieves the precision of a number field.

Class

TCustomDADataSet

Syntax

function GetFieldPrecision(const FieldName: string): integer;

Parameters
FieldName
Holds the existing field name.
Return Value
precision of number field.

Remarks

Call the GetFieldPrecision method to retrieve the precision of a number field. FieldName is the name of an existing field.

See Also

  • GetFieldScale


TCustomDADataSet.GetFieldScale Method

TCustomDADataSet.GetFieldScale Method

Retrieves the scale of a number field.

Class

TCustomDADataSet

Syntax

function GetFieldScale(const FieldName: string): integer;

Parameters
FieldName
Holds the existing field name.
Return Value
the scale of the number field.

Remarks

Call the GetFieldScale method to retrieve the scale of a number field. FieldName is the name of an existing field.

See Also

  • GetFieldPrecision


TCustomDADataSet.GetOrderBy Method

TCustomDADataSet.GetOrderBy Method

Retrieves an ORDER BY clause from a SQL statement.

Class

TCustomDADataSet

Syntax

function GetOrderBy: string;

Return Value
an ORDER BY clause from the SQL statement.

Remarks

Call the GetOrderBy method to retrieve an ORDER BY clause from a SQL statement.

Note: GetOrderBy and SetOrderBy methods serve to process only quite simple queries and don't support, for example, subqueries.

See Also

  • SetOrderBy


TCustomDADataSet.GotoCurrent Method

TCustomDADataSet.GotoCurrent Method

Sets the current record in this dataset similar to the current record in another dataset.

Class

TCustomDADataSet

Syntax

procedure GotoCurrent(DataSet: TCustomDADataSet);

Parameters
DataSet
Holds the TCustomDADataSet descendant to synchronize the record position with.

Remarks

Call the GotoCurrent method to set the current record in this dataset similar to the current record in another dataset. The key fields in both these DataSets must be coincident.

See Also

  • TMemDataSet.Locate
  • TMemDataSet.LocateEx


TCustomDADataSet.Lock Method

TCustomDADataSet.Lock Method

Locks the current record.

Class

TCustomDADataSet

Syntax

procedure Lock; virtual;

Remarks

Call the Lock method to lock the current record by executing the statement that is defined in the SQLLock property (for the TOraQuery component).

The Lock method sets the savepoint with the name LOCK_ + <component_name>.

TOraQuery uses SQLLock to execute the current record locking. TSmartQuery builds a SELECT FOR UPDATE statement itself.

See Also

  • TOraDataSet.LockMode
  • TCustomOraQuery.SQLLock
  • UnLock


TCustomDADataSet.MacroByName Method

TCustomDADataSet.MacroByName Method

Finds a Macro with the name passed in Name.

Class

TCustomDADataSet

Syntax

function MacroByName(const Value: string): TMacro;

Parameters
Value
Holds the name of the Macro to search for.
Return Value
the Macro, if a match was found.

Remarks

Call the MacroByName method to find a Macro with the name passed in Name. If a match was found, MacroByName returns the Macro. Otherwise, an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate a parameter by name without raising an exception if the parameter is not found, use the FindMacro method.

To assign the value of macro use the TMacro.Value property.

Example

OraQuery.SQL:= 'SELECT * FROM Scott.Dept ORDER BY &Order';
OraQuery.MacroByName('Order').Value:= 'DeptNo';
OraQuery.Open;

See Also

  • TMacro
  • Macros
  • FindMacro


TCustomDADataSet.ParamByName Method

TCustomDADataSet.ParamByName Method

Sets or uses parameter information for a specific parameter based on its name.

Class

TCustomDADataSet

Syntax

function ParamByName(const Value: string): TDAParam;

Parameters
Value
Holds the name of the parameter for which to retrieve information.
Return Value
a TDAParam object.

Remarks

Call the ParamByName method to set or use parameter information for a specific parameter based on its name. Name is the name of the parameter for which to retrieve information. ParamByName is used to set a parameter's value at runtime and returns a TDAParam object.

Example

The following statement retrieves the current value of a parameter called "Contact" into an edit box:

Edit1.Text := Query1.ParamsByName('Contact').AsString;

See Also

  • Params
  • FindParam


TCustomDADataSet.Prepare Method

TCustomDADataSet.Prepare Method

Allocates, opens, and parses cursor for a query.

Class

TCustomDADataSet

Syntax

procedure Prepare; override;

Remarks

Call the Prepare method to allocate, open, and parse cursor for a query. Calling Prepare before executing a query improves application performance.

TCustomDADataSet automatically prepares a query if it is executed without being prepared first. After execution, TCustomDADataSet unprepares the query. When a query is executed a number of times, an application should always explicitly prepare the query to avoid multiple and unnecessary prepares and unprepares.

The UnPrepare method unprepares a query.

Note: When you change the text of a query at runtime, the query is automatically closed and unprepared.

See Also

  • TMemDataSet.Prepared
  • TMemDataSet.UnPrepare
  • Options


TCustomDADataSet.RefreshRecord Method

TCustomDADataSet.RefreshRecord Method

Actualizes field values for the current record.

Class

TCustomDADataSet

Syntax

procedure RefreshRecord;

Remarks

Call the RefreshRecord method to actualize field values for the current record. RefreshRecord performs query to database and refetches new field values from the returned cursor.

See Also

  • RefreshOptions
  • SQLRefresh


TCustomDADataSet.RestoreSQL Method

TCustomDADataSet.RestoreSQL Method

Restores the SQL property modified by AddWhere and SetOrderBy.

Class

TCustomDADataSet

Syntax

procedure RestoreSQL;

Remarks

Call the RestoreSQL method to restore the SQL property modified by AddWhere and SetOrderBy.

See Also

  • AddWhere
  • SetOrderBy
  • SaveSQL
  • SQLSaved


TCustomDADataSet.Resync Method

TCustomDADataSet.Resync Method

Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.

Class

TCustomDADataSet

Syntax

procedure Resync(Mode: TResyncMode); override;

Parameters
Mode
Holds optional processing that Resync should handle.

Remarks

Resync is used to resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.


TCustomDADataSet.SaveSQL Method

TCustomDADataSet.SaveSQL Method

Saves the SQL property value to BaseSQL.

Class

TCustomDADataSet

Syntax

procedure SaveSQL;

Remarks

Call the SaveSQL method to save the SQL property value to the BaseSQL property.

See Also

  • SQLSaved
  • RestoreSQL
  • BaseSQL


TCustomDADataSet.SetOrderBy Method

TCustomDADataSet.SetOrderBy Method

Builds an ORDER BY clause of a SELECT statement.

Class

TCustomDADataSet

Syntax

procedure SetOrderBy(Fields: string);

Parameters
Fields
Holds the names of the fields which will be added to the ORDER BY clause.

Remarks

Call the SetOrderBy method to build an ORDER BY clause of a SELECT statement. The fields are identified by the comma-delimited field names.

Note: The GetOrderBy and SetOrderBy methods serve to process only quite simple queries and don't support, for example, subqueries.

Example

Query1.SetOrderBy('DeptNo;DName');

See Also

  • GetOrderBy


TCustomDADataSet.SQLSaved Method

TCustomDADataSet.SQLSaved Method

Determines if the SQL property value was saved to the BaseSQL property.

Class

TCustomDADataSet

Syntax

function SQLSaved: boolean;

Return Value
True, if the SQL property value was saved to the BaseSQL property.

Remarks

Call the SQLSaved method to know whether the SQL property value was saved to the BaseSQL property.


TCustomDADataSet.UnLock Method

TCustomDADataSet.UnLock Method

Releases a record lock.

Class

TCustomDADataSet

Syntax

procedure UnLock;

Remarks

Call the Unlock method to release the record lock made by the Lock method before.

Unlock is performed by rolling back to the savepoint set by the Lock method.

See Also

  • Lock


TCustomDADataSet Events

TCustomDADataSet Events

Events of the TCustomDADataSet class.

For a complete list of the TCustomDADataSet class members, see the TCustomDADataSet Members topic.

Public

Name | Description
AfterExecute | Occurs after a component has executed a query to database.
AfterFetch | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
BeforeFetch | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute | Occurs before executing insert, delete, update, lock, and refresh operations.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TCustomDADataSet Class
  • TCustomDADataSet Class Members


TCustomDADataSet.AfterExecute Event

TCustomDADataSet.AfterExecute Event

Occurs after a component has executed a query to database.

Class

TCustomDADataSet

Syntax

property AfterExecute: TAfterExecuteEvent;

Remarks

Occurs after a component has executed a query to database.

See Also

  • Execute


TCustomDADataSet.AfterFetch Event

TCustomDADataSet.AfterFetch Event

Occurs after dataset finishes fetching data from server.

Class

TCustomDADataSet

Syntax

property AfterFetch: TAfterFetchEvent;

Remarks

The AfterFetch event occurs after dataset finishes fetching data from server.

See Also

  • BeforeFetch
  • TOraDataSet.NonBlocking


TCustomDADataSet.AfterUpdateExecute Event

TCustomDADataSet.AfterUpdateExecute Event

Occurs after executing insert, delete, update, lock and refresh operations.

Class

TCustomDADataSet

Syntax

property AfterUpdateExecute: TUpdateExecuteEvent;

Remarks

Occurs after executing insert, delete, update, lock, and refresh operations. You can use AfterUpdateExecute to set the parameters of corresponding statements.


TCustomDADataSet.BeforeFetch Event

TCustomDADataSet.BeforeFetch Event

Occurs before dataset is going to fetch block of records from the server.

Class

TCustomDADataSet

Syntax

property BeforeFetch: TBeforeFetchEvent;

Remarks

The BeforeFetch event occurs every time before dataset is going to fetch a block of records from the server. Set Cancel to True to abort current fetch operation.

Note: In the TOraDataSet.NonBlocking mode event handler is called from the fetching thread. Therefore, if you have set the NonBlocking property to True, you should use thread synchronization mechanisms in the code of the BeforeFetch event handler.

See Also

  • AfterFetch
  • TOraDataSet.NonBlocking


TCustomDADataSet.BeforeUpdateExecute Event

TCustomDADataSet.BeforeUpdateExecute Event

Occurs before executing insert, delete, update, lock, and refresh operations.

Class

TCustomDADataSet

Syntax

property BeforeUpdateExecute: TUpdateExecuteEvent;

Remarks

Occurs before executing insert, delete, update, lock, and refresh operations. You can use BeforeUpdateExecute to set the parameters of corresponding statements.

See Also

  • AfterUpdateExecute


TCustomDASQL Class

TCustomDASQL Class

A base class for components executing SQL statements that do not return result sets.

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

Unit

DBAccess

Syntax

TCustomDASQL = class(TComponent);

Remarks

TCustomDASQL is a base class that defines functionality for descendant classes which access database using SQL statements. Applications never use TCustomDASQL objects directly. Instead they use descendants of TCustomDASQL.

Use TCustomDASQL when client application must execute SQL statement or call stored procedure on the database server. The SQL statement should not retrieve rows from the database.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomDASQL


TCustomDASQL Members

TCustomDASQL Members

TCustomDASQL class overview.

Properties

Name | Description
ChangeCursor | Enables or disables changing screen cursor when executing commands in the NonBlocking mode.
Connection | Used to specify a connection object to use to connect to a data store.
Debug | Used to display executing statement, all its parameters' values, and the type of parameters.
FinalSQL | Used to return a SQL statement with expanded macros.
MacroCount | Used to get the number of macros associated with the Macros property.
Macros | Makes it possible to change SQL queries easily.
ParamCheck | Used to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.
ParamCount | Indicates the number of parameters in the Params property.
Params | Used to contain parameters for a SQL statement.
ParamValues | Used to get or set the values of individual field parameters that are identified by name.
Prepared | Used to indicate whether a query is prepared for execution.
RowsAffected | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
SQL | Used to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called.

Methods

Name | Description
Execute | Overloaded. Executes SQL commands.
Executing | Checks whether TCustomDASQL still executes a SQL statement.
FindMacro | Searches for a macro with the specified name.
FindParam | Finds a parameter with the specified name.
MacroByName | Finds a Macro with the name passed in Name.
ParamByName | Finds a parameter with the specified name.
Prepare | Allocates, opens, and parses cursor for a query.
UnPrepare | Frees the resources allocated for a previously prepared query on the server and client sides.
WaitExecuting | Waits until TCustomDASQL executes a SQL statement.

Events

Name | Description
AfterExecute | Occurs after a SQL statement has been executed.


TCustomDASQL Properties

TCustomDASQL Properties

Properties of the TCustomDASQL class.

For a complete list of the TCustomDASQL class members, see the TCustomDASQL Members topic.

Public

Name | Description
ChangeCursor | Enables or disables changing screen cursor when executing commands in the NonBlocking mode.
Connection | Used to specify a connection object to use to connect to a data store.
Debug | Used to display executing statement, all its parameters' values, and the type of parameters.
FinalSQL | Used to return a SQL statement with expanded macros.
MacroCount | Used to get the number of macros associated with the Macros property.
Macros | Makes it possible to change SQL queries easily.
ParamCheck | Used to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.
ParamCount | Indicates the number of parameters in the Params property.
Params | Used to contain parameters for a SQL statement.
ParamValues | Used to get or set the values of individual field parameters that are identified by name.
Prepared | Used to indicate whether a query is prepared for execution.
RowsAffected | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
SQL | Used to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called.

See Also

  • TCustomDASQL Class
  • TCustomDASQL Class Members


TCustomDASQL.ChangeCursor Property

TCustomDASQL.ChangeCursor Property

Enables or disables changing screen cursor when executing commands in the NonBlocking mode.

Class

TCustomDASQL

Syntax

property ChangeCursor: boolean;

Remarks

Set the ChangeCursor property to False to prevent the screen cursor from changing to crSQLArrow when executing commands in the NonBlocking mode. The default value is True.


TCustomDASQL.Connection Property

TCustomDASQL.Connection Property

Used to specify a connection object to use to connect to a data store.

Class

TCustomDASQL

Syntax

property Connection: TCustomDAConnection;

Remarks

Use the Connection property to specify a connection object that will be used to connect to a data store.

Set at design-time by selecting from the list of provided TCustomDAConnection or its descendant class objects.

At runtime, link an instance of a TCustomDAConnection descendant to the Connection property.


TCustomDASQL.Debug Property

TCustomDASQL.Debug Property

Used to display executing statement, all its parameters' values, and the type of parameters.

Class

TCustomDASQL

Syntax

property Debug: boolean default False;

Remarks

Set the Debug property to True to display executing statement and all its parameters' values. Also displays the type of parameters.

You should add the OdacVcl unit to the uses clause of any unit in your project to make the Debug property work.

Note: To enable debug window you should explicitly include the OdacVcl (OdacClx under Kylix) unit to your project.

See Also

  • TCustomDADataSet.Debug


TCustomDASQL.FinalSQL Property

TCustomDASQL.FinalSQL Property

Used to return a SQL statement with expanded macros.

Class

TCustomDASQL

Syntax

property FinalSQL: string;

Remarks

Read the FinalSQL property to return a SQL statement with expanded macros. This is the exact statement that will be passed on to the database server.


TCustomDASQL.MacroCount Property

TCustomDASQL.MacroCount Property

Used to get the number of macros associated with the Macros property.

Class

TCustomDASQL

Syntax

property MacroCount: word;

Remarks

Use the MacroCount property to get the number of macros associated with the Macros property.

See Also

  • Macros


TCustomDASQL.Macros Property

TCustomDASQL.Macros Property

Makes it possible to change SQL queries easily.

Class

TCustomDASQL

Syntax

property Macros: TMacros stored False;

Remarks

With the help of macros you can easily change SQL query text at design- or runtime. Marcos extend abilities of parameters and allow to change conditions in a WHERE clause or sort order in an ORDER BY clause. You just insert &MacroName in the SQL query text and change value of macro in the Macro property editor at design time or call the MacroByName function at run time. At the time of opening the query macro is replaced by its value.

See Also

  • TMacro
  • MacroByName
  • Params


TCustomDASQL.ParamCheck Property

TCustomDASQL.ParamCheck Property

Used to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.

Class

TCustomDASQL

Syntax

property ParamCheck: boolean default True;

Remarks

Use the ParamCheck property to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.

Set ParamCheck to True to let TCustomDASQL generate the Params property for the dataset based on a SQL statement automatically.

Setting ParamCheck to False can be used if the dataset component passes to a server the DDL statements that contain, for example, declarations of the stored procedures that will accept parameterized values themselves. The default value is True.

See Also

  • Params


TCustomDASQL.ParamCount Property

TCustomDASQL.ParamCount Property

Indicates the number of parameters in the Params property.

Class

TCustomDASQL

Syntax

property ParamCount: word;

Remarks

Use the ParamCount property to determine how many parameters are there in the Params property.


TCustomDASQL.Params Property

TCustomDASQL.Params Property

Used to contain parameters for a SQL statement.

Class

TCustomDASQL

Syntax

property Params: TDAParams stored False;

Remarks

Access the Params property at runtime to view and set parameter names, values, and data types dynamically (at design-time use the Parameters editor to set parameter properties). Params is a zero-based array of parameter records. Index specifies the array element to access. An easier way to set and retrieve parameter values when the name of each parameter is known is to call ParamByName.

Example

Setting parameters at runtime:

procedure TForm1.Button1Click(Sender: TObject);
begin
with OraSQL do
    begin
      SQL.Clear;
      SQL.Add('INSERT INTO Temp_Table(Id, Name)');
      SQL.Add('VALUES (:id, :Name)');
      ParamByName('Id').AsInteger := 55;
      Params[1].AsString := ' Green';
      Execute;
   end;
end;

See Also

  • TDAParam
  • FindParam
  • Macros


TCustomDASQL.ParamValues Property(Indexer)

TCustomDASQL.ParamValues Property(Indexer)

Used to get or set the values of individual field parameters that are identified by name.

Class

TCustomDASQL

Syntax

property ParamValues[ParamName: string]: variant; default;

Parameters
ParamName
Holds parameter names separated by semicolon.

Remarks

Use the ParamValues property to get or set the values of individual field parameters that are identified by name.

Setting ParamValues sets the Value property for each parameter listed in the ParamName string. Specify the values as Variants.

Getting ParamValues retrieves an array of variants, each of which represents the value of one of the named parameters.

Note: The Params array is generated implicitly if ParamCheck property is set to True. If ParamName includes a name that does not match any of the parameters in Items, an exception is raised.


TCustomDASQL.Prepared Property

TCustomDASQL.Prepared Property

Used to indicate whether a query is prepared for execution.

Class

TCustomDASQL

Syntax

property Prepared: boolean;

Remarks

Check the Prepared property to determine if a query is already prepared for execution. True means that the query has already been prepared. As a rule prepared queries are executed faster, but the preparation itself also takes some time. One of the proper cases for using preparation is parametrized queries that are executed several times.

See Also

  • Prepare


TCustomDASQL.RowsAffected Property

TCustomDASQL.RowsAffected Property

Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.

Class

TCustomDASQL

Syntax

property RowsAffected: integer;

Remarks

Check RowsAffected to determine how many rows were inserted, updated, or deleted during the last query operation. If RowsAffected is -1, the query has not inserted, updated, or deleted any rows.


TCustomDASQL.SQL Property

TCustomDASQL.SQL Property

Used to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called.

Class

TCustomDASQL

Syntax

property SQL: _TStrings;

Remarks

Use the SQL property to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called. At design time the SQL property can be edited by invoking the String List editor in Object Inspector.

See Also

  • FinalSQL
  • TCustomDASQL.Execute


TCustomDASQL Methods

TCustomDASQL Methods

Methods of the TCustomDASQL class.

For a complete list of the TCustomDASQL class members, see the TCustomDASQL Members topic.

Public

Name | Description
Execute | Overloaded. Executes SQL commands.
Executing | Checks whether TCustomDASQL still executes a SQL statement.
FindMacro | Searches for a macro with the specified name.
FindParam | Finds a parameter with the specified name.
MacroByName | Finds a Macro with the name passed in Name.
ParamByName | Finds a parameter with the specified name.
Prepare | Allocates, opens, and parses cursor for a query.
UnPrepare | Frees the resources allocated for a previously prepared query on the server and client sides.
WaitExecuting | Waits until TCustomDASQL executes a SQL statement.

See Also

  • TCustomDASQL Class
  • TCustomDASQL Class Members


TCustomDASQL.Execute Overload

TCustomDASQL.Execute Overload

Executes SQL commands.

Class

TCustomDASQL

Overload List

Name | Description
Execute | Executes SQL commands.
Execute(Iters: integer) | Executes a SQL statement specified number of times.


TCustomDASQL.Execute Method

TCustomDASQL.Execute Method

Executes SQL commands.

Class

TCustomDASQL

Syntax

procedure Execute; overload; virtual

Remarks

Call the Execute method to execute a SQL statement on the server. If the SQL statement has OUT parameters, use the TCustomDASQL.ParamByName method or the TCustomDASQL.Params property to get their values. Iters argument specifies the number of times this statement is executed for the DML array operations.


TCustomDASQL.Execute Method

TCustomDASQL.Execute Method

Executes a SQL statement specified number of times.

Class

TCustomDASQL

Syntax

procedure Execute(Iters: integer); overload; virtual

Parameters
Iters
Specifies the number of times this statement is executed for the DML array operations.


TCustomDASQL.Executing Method

TCustomDASQL.Executing Method

Checks whether TCustomDASQL still executes a SQL statement.

Class

TCustomDASQL

Syntax

function Executing: boolean;

Return Value
True, if a SQL statement is still being executed by TCustomDASQL.

Remarks

Check Executing to find out whether TCustomDASQL still executes a SQL statement. Executing method is used for nonblocking execution.


TCustomDASQL.FindMacro Method

TCustomDASQL.FindMacro Method

Searches for a macro with the specified name.

Class

TCustomDASQL

Syntax

function FindMacro(const Value: string): TMacro;

Parameters
Value
Holds the name of a macro to search for.
Return Value
the TMacro object, if a macro with the specified name has been found. If it has not, returns nil.

Remarks

Call the FindMacro method to find a macro with the specified name in a dataset.

See Also

  • TMacro
  • Macros
  • MacroByName


TCustomDASQL.FindParam Method

TCustomDASQL.FindParam Method

Finds a parameter with the specified name.

Class

TCustomDASQL

Syntax

function FindParam(const Value: string): TDAParam;

Parameters
Value
Holds the parameter name to search for.
Return Value
a TDAParm object, if a parameter with the specified name has been found. If it has not, returns nil.

Remarks

Call the FindParam method to find a parameter with the specified name in a dataset.

See Also

  • ParamByName


TCustomDASQL.MacroByName Method

TCustomDASQL.MacroByName Method

Finds a Macro with the name passed in Name.

Class

TCustomDASQL

Syntax

function MacroByName(const Value: string): TMacro;

Parameters
Value
Holds the name of the Macro to search for.
Return Value
the Macro, if a match was found.

Remarks

Call the MacroByName method to find a Macro with the name passed in Name. If a match was found, MacroByName returns the Macro. Otherwise, an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate a parameter by name without raising an exception if the parameter is not found, use the FindMacro method.

To assign the value of macro use the TMacro.Value property.

See Also

  • TMacro
  • Macros
  • FindMacro


TCustomDASQL.ParamByName Method

TCustomDASQL.ParamByName Method

Finds a parameter with the specified name.

Class

TCustomDASQL

Syntax

function ParamByName(const Value: string): TDAParam;

Parameters
Value
Holds the name of the parameter to search for.
Return Value
a TDAParam object, if a match was found. Otherwise, an exception is raised.

Remarks

Use the ParamByName method to find a parameter with the specified name. If no parameter with the specified name found, an exception is raised.

Example

OraSQL.Execute;
Edit1.Text := OraSQL.ParamsByName('Contact').AsString;

See Also

  • FindParam


TCustomDASQL.Prepare Method

TCustomDASQL.Prepare Method

Allocates, opens, and parses cursor for a query.

Class

TCustomDASQL

Syntax

procedure Prepare; virtual;

Remarks

Call the Prepare method to allocate, open, and parse cursor for a query. Calling Prepare before executing a query improves application performance.

TCustomDADataSet automatically prepares a query if it is executed without being prepared first. After execution, TCustomDADataSet unprepares the query. When a query is executed a number of times, an application should always explicitly prepare the query to avoid multiple and unnecessary prepares and unprepares.

The UnPrepare method unprepares a query.

Note: When you change the text of a query at runtime, the query is automatically closed and unprepared.

See Also

  • Prepared
  • UnPrepare


TCustomDASQL.UnPrepare Method

TCustomDASQL.UnPrepare Method

Frees the resources allocated for a previously prepared query on the server and client sides.

Class

TCustomDASQL

Syntax

procedure UnPrepare; virtual;

Remarks

Call the UnPrepare method to free resources allocated for a previously prepared query on the server and client sides.

See Also

  • Prepare


TCustomDASQL.WaitExecuting Method

TCustomDASQL.WaitExecuting Method

Waits until TCustomDASQL executes a SQL statement.

Class

TCustomDASQL

Syntax

function WaitExecuting(TimeOut: integer = 0): boolean;

Parameters
TimeOut
Holds the time in seconds to wait while TCustomDASQL executes the SQL statement. Zero means infinite time.
Return Value
True, if the execution of a SQL statement was completed in the preset time.

Remarks

Call the WaitExecuting method to wait until TCustomDASQL executes a SQL statement. Use the WaitExecuting method for nonblocking execution.

See Also

  • Executing


TCustomDASQL Events

TCustomDASQL Events

Events of the TCustomDASQL class.

For a complete list of the TCustomDASQL class members, see the TCustomDASQL Members topic.

Public

Name | Description
AfterExecute | Occurs after a SQL statement has been executed.

See Also

  • TCustomDASQL Class
  • TCustomDASQL Class Members


TCustomDASQL.AfterExecute Event

TCustomDASQL.AfterExecute Event

Occurs after a SQL statement has been executed.

Class

TCustomDASQL

Syntax

property AfterExecute: TAfterExecuteEvent;

Remarks

Occurs after a SQL statement has been executed. This event may be used for descendant components which use multithreaded environment.

See Also

  • TCustomDASQL.Execute


TCustomDAUpdateSQL Class

TCustomDAUpdateSQL Class

A base class for components that provide DML statements for more flexible control over data modifications.

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

Unit

DBAccess

Syntax

TCustomDAUpdateSQL = class(TComponent);

Remarks

TCustomDAUpdateSQL is a base class for components that provide DML statements for more flexible control over data modifications. Besides providing BDE compatibility, this component allows to associate a separate component for each update command.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomDAUpdateSQL

See Also

  • TOraDataSet.UpdateObject


TCustomDAUpdateSQL Members

TCustomDAUpdateSQL Members

TCustomDAUpdateSQL class overview.

Properties

Name | Description
DataSet | Used to hold a reference to the TCustomDADataSet object that is being updated.
DeleteObject | Provides ability to perform advanced adjustment of the delete operations.
DeleteSQL | Used when deleting a record.
InsertObject | Provides ability to perform advanced adjustment of insert operations.
InsertSQL | Used when inserting a record.
LockObject | Provides ability to perform advanced adjustment of lock operations.
LockSQL | Used to lock the current record.
ModifyObject | Provides ability to perform advanced adjustment of modify operations.
ModifySQL | Used when updating a record.
RefreshObject | Provides ability to perform advanced adjustment of refresh operations.
RefreshSQL | Used to specify an SQL statement that will be used for refreshing the current record by TCustomDADataSet.RefreshRecord procedure.
SQL | Used to return a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL properties.

Methods

Name | Description
Apply | Sets parameters for a SQL statement and executes it to update a record.
ExecSQL | Executes a SQL statement.


TCustomDAUpdateSQL Properties

TCustomDAUpdateSQL Properties

Properties of the TCustomDAUpdateSQL class.

For a complete list of the TCustomDAUpdateSQL class members, see the TCustomDAUpdateSQL Members topic.

Public

Name | Description
DataSet | Used to hold a reference to the TCustomDADataSet object that is being updated.
SQL | Used to return a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL properties.

Published

Name | Description
DeleteObject | Provides ability to perform advanced adjustment of the delete operations.
DeleteSQL | Used when deleting a record.
InsertObject | Provides ability to perform advanced adjustment of insert operations.
InsertSQL | Used when inserting a record.
LockObject | Provides ability to perform advanced adjustment of lock operations.
LockSQL | Used to lock the current record.
ModifyObject | Provides ability to perform advanced adjustment of modify operations.
ModifySQL | Used when updating a record.
RefreshObject | Provides ability to perform advanced adjustment of refresh operations.
RefreshSQL | Used to specify an SQL statement that will be used for refreshing the current record by TCustomDADataSet.RefreshRecord procedure.

See Also

  • TCustomDAUpdateSQL Class
  • TCustomDAUpdateSQL Class Members


TCustomDAUpdateSQL.DataSet Property

TCustomDAUpdateSQL.DataSet Property

Used to hold a reference to the TCustomDADataSet object that is being updated.

Class

TCustomDAUpdateSQL

Syntax

property DataSet: TCustomDADataSet;

Remarks

The DataSet property holds a reference to the TCustomDADataSet object that is being updated. Generally it is not used directly.


TCustomDAUpdateSQL.DeleteObject Property

TCustomDAUpdateSQL.DeleteObject Property

Provides ability to perform advanced adjustment of the delete operations.

Class

TCustomDAUpdateSQL

Syntax

property DeleteObject: TComponent;

Remarks

Assign SQL component or a TOraDataSet descendant to this property to perform advanced adjustment of the delete operations. In some cases this can give some additional performance. Use the same principle to set the SQL property of an object as for setting the DeleteSQL property.

See Also

  • DeleteSQL


TCustomDAUpdateSQL.DeleteSQL Property

TCustomDAUpdateSQL.DeleteSQL Property

Used when deleting a record.

Class

TCustomDAUpdateSQL

Syntax

property DeleteSQL: _TStrings;

Remarks

Set the DeleteSQL property to a DELETE statement to use when deleting a record. Statements can be parameterized queries with parameter names corresponding to the dataset field names.


TCustomDAUpdateSQL.InsertObject Property

TCustomDAUpdateSQL.InsertObject Property

Provides ability to perform advanced adjustment of insert operations.

Class

TCustomDAUpdateSQL

Syntax

property InsertObject: TComponent;

Remarks

Assign SQL component or TOraDataSet descendant to this property to perform advanced adjustment of insert operations. In some cases this can give some additional performance. Set the SQL property of the object in the same way as used for the InsertSQL property.

See Also

  • InsertSQL


TCustomDAUpdateSQL.InsertSQL Property

TCustomDAUpdateSQL.InsertSQL Property

Used when inserting a record.

Class

TCustomDAUpdateSQL

Syntax

property InsertSQL: _TStrings;

Remarks

Set the InsertSQL property to an INSERT INTO statement to use when inserting a record. Statements can be parameterized queries with parameter names corresponding to the dataset field names.


TCustomDAUpdateSQL.LockObject Property

TCustomDAUpdateSQL.LockObject Property

Provides ability to perform advanced adjustment of lock operations.

Class

TCustomDAUpdateSQL

Syntax

property LockObject: TComponent;

Remarks

Assign a SQL component or TOraDataSet descendant to this property to perform advanced adjustment of lock operations. In some cases that can give some additional performance. Set the SQL property of an object in the same way as used for the LockSQL property.

See Also

  • LockSQL


TCustomDAUpdateSQL.LockSQL Property

TCustomDAUpdateSQL.LockSQL Property

Used to lock the current record.

Class

TCustomDAUpdateSQL

Syntax

property LockSQL: _TStrings;

Remarks

Use the LockSQL property to lock the current record. Statements can be parameterized queries with parameter names corresponding to the dataset field names.


TCustomDAUpdateSQL.ModifyObject Property

TCustomDAUpdateSQL.ModifyObject Property

Provides ability to perform advanced adjustment of modify operations.

Class

TCustomDAUpdateSQL

Syntax

property ModifyObject: TComponent;

Remarks

Assign a SQL component or TOraDataSet descendant to this property to perform advanced adjustment of modify operations. In some cases this can give some additional performance. Set the SQL property of the object in the same way as used for the ModifySQL property.

See Also

  • ModifySQL


TCustomDAUpdateSQL.ModifySQL Property

TCustomDAUpdateSQL.ModifySQL Property

Used when updating a record.

Class

TCustomDAUpdateSQL

Syntax

property ModifySQL: _TStrings;

Remarks

Set ModifySQL to an UPDATE statement to use when updating a record. Statements can be parameterized queries with parameter names corresponding to the dataset field names.


TCustomDAUpdateSQL.RefreshObject Property

TCustomDAUpdateSQL.RefreshObject Property

Provides ability to perform advanced adjustment of refresh operations.

Class

TCustomDAUpdateSQL

Syntax

property RefreshObject: TComponent;

Remarks

Assign a SQL component or TOraDataSet descendant to this property to perform advanced adjustment of refresh operations. In some cases that can give some additional performance. Set the SQL property of the object in the same way as used for the RefreshSQL property.

See Also

  • RefreshSQL


TCustomDAUpdateSQL.RefreshSQL Property

TCustomDAUpdateSQL.RefreshSQL Property

Used to specify an SQL statement that will be used for refreshing the current record by TCustomDADataSet.RefreshRecord procedure.

Class

TCustomDAUpdateSQL

Syntax

property RefreshSQL: _TStrings;

Remarks

Use the RefreshSQL property to specify a SQL statement that will be used for refreshing the current record by the TCustomDADataSet.RefreshRecord procedure.

You can assign to SQLRefresh a WHERE clause only. In such a case it is added to SELECT defined by the SQL property by TCustomDADataSet.AddWhere.

To create a RefreshSQL statement at design time, use the query statements editor.

See Also

  • TCustomDADataSet.RefreshRecord


TCustomDAUpdateSQL.SQL Property(Indexer)

TCustomDAUpdateSQL.SQL Property(Indexer)

Used to return a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL properties.

Class

TCustomDAUpdateSQL

Syntax

property SQL[UpdateKind: TUpdateKind]: _TStrings;

Parameters
UpdateKind
Specifies which of update SQL statements to return.

Remarks

Returns a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL properties, depending on the value of the UpdateKind index.


TCustomDAUpdateSQL Methods

TCustomDAUpdateSQL Methods

Methods of the TCustomDAUpdateSQL class.

For a complete list of the TCustomDAUpdateSQL class members, see the TCustomDAUpdateSQL Members topic.

Public

Name | Description
Apply | Sets parameters for a SQL statement and executes it to update a record.
ExecSQL | Executes a SQL statement.

See Also

  • TCustomDAUpdateSQL Class
  • TCustomDAUpdateSQL Class Members


TCustomDAUpdateSQL.Apply Method

TCustomDAUpdateSQL.Apply Method

Sets parameters for a SQL statement and executes it to update a record.

Class

TCustomDAUpdateSQL

Syntax

procedure Apply(UpdateKind: TUpdateKind); virtual;

Parameters
UpdateKind
Specifies which of update SQL statements to execute.

Remarks

Call the Apply method to set parameters for a SQL statement and execute it to update a record. UpdateKind indicates which SQL statement to bind and execute.

Apply is primarily intended for manually executing update statements from an OnUpdateRecord event handler.

Note: If a SQL statement does not contain parameters, it is more efficient to call ExecSQL instead of Apply.

See Also

  • ExecSQL


TCustomDAUpdateSQL.ExecSQL Method

TCustomDAUpdateSQL.ExecSQL Method

Executes a SQL statement.

Class

TCustomDAUpdateSQL

Syntax

procedure ExecSQL(UpdateKind: TUpdateKind);

Parameters
UpdateKind
Specifies the kind of update statement to be executed.

Remarks

Call the ExecSQL method to execute a SQL statement, necessary for updating the records belonging to a read-only result set when cached updates is enabled. UpdateKind specifies the statement to execute.

ExecSQL is primarily intended for manually executing update statements from the OnUpdateRecord event handler.

Note: To both bind parameters and execute a statement, call Apply.

See Also

  • Apply


TDAConnectionOptions Class

TDAConnectionOptions Class

This class allows setting up the behaviour of the TDAConnection class.

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

Unit

DBAccess

Syntax

TDAConnectionOptions = class(TPersistent);

Inheritance Hierarchy

TObject
TPersistent
TDAConnectionOptions


TDAConnectionOptions Members

TDAConnectionOptions Members

TDAConnectionOptions class overview.

Properties

Name | Description
DefaultSortType | Used to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.
DisconnectedMode | Used to open a connection only when needed for performing a server call and closes after performing the operation.
KeepDesignConnected | Used to prevent an application from establishing a connection at the time of startup.
LocalFailover | If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation can be performed after connection breaks.


TDAConnectionOptions Properties

TDAConnectionOptions Properties

Properties of the TDAConnectionOptions class.

For a complete list of the TDAConnectionOptions class members, see the TDAConnectionOptions Members topic.

Public

Name | Description
DefaultSortType | Used to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.
DisconnectedMode | Used to open a connection only when needed for performing a server call and closes after performing the operation.
KeepDesignConnected | Used to prevent an application from establishing a connection at the time of startup.
LocalFailover | If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation can be performed after connection breaks.

See Also

  • TDAConnectionOptions Class
  • TDAConnectionOptions Class Members


TDAConnectionOptions.DefaultSortType Property

TDAConnectionOptions.DefaultSortType Property

Used to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.

Class

TDAConnectionOptions

Syntax

property DefaultSortType: TSortType default stCaseSensitive;

Remarks

Use the DefaultSortType property to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.


TDAConnectionOptions.DisconnectedMode Property

TDAConnectionOptions.DisconnectedMode Property

Used to open a connection only when needed for performing a server call and closes after performing the operation.

Class

TDAConnectionOptions

Syntax

property DisconnectedMode: boolean default False;

Remarks

If True, connection opens only when needed for performing a server call and closes after performing the operation. Datasets remain opened when connection closes. May be useful to save server resources and operate in unstable or expensive network. Drawback of using disconnect mode is that each connection establishing requires some time for authorization. If connection is often closed and opened it can slow down the application work. See the Working with Disconnected Mode topic for more information.


TDAConnectionOptions.KeepDesignConnected Property

TDAConnectionOptions.KeepDesignConnected Property

Used to prevent an application from establishing a connection at the time of startup.

Class

TDAConnectionOptions

Syntax

property KeepDesignConnected: boolean default True;

Remarks

At the time of startup prevents application from establishing a connection even if the Connected property was set to True at design-time.


TDAConnectionOptions.LocalFailover Property

TDAConnectionOptions.LocalFailover Property

If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation can be performed after connection breaks.

Class

TDAConnectionOptions

Syntax

property LocalFailover: boolean default False;

Remarks

If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation can be performed after connection breaks. Read the Working in an Unstable Network topic for more information about using failover.


TDADataSetOptions Class

TDADataSetOptions Class

This class allows setting up the behaviour of the TDADataSet class.

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

Unit

DBAccess

Syntax

TDADataSetOptions = class(TPersistent);

Inheritance Hierarchy

TObject
TPersistent
TDADataSetOptions


TDADataSetOptions Members

TDADataSetOptions Members

TDADataSetOptions class overview.

Properties

Name | Description
AutoPrepare | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields | Used to enable caching of the TField.Calculated and TField.Lookup fields.
DefaultValues | Used to request default values/expressions from the server and assign them to the DefaultExpression property.
DetailDelay | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsOrigin | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
LocalMasterDetail | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RemoveOnRefresh | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams | Used to return the new value of fields to dataset after insert or update.
SetFieldsReadOnly | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.


TDADataSetOptions Properties

TDADataSetOptions Properties

Properties of the TDADataSetOptions class.

For a complete list of the TDADataSetOptions class members, see the TDADataSetOptions Members topic.

Public

Name | Description
AutoPrepare | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields | Used to enable caching of the TField.Calculated and TField.Lookup fields.
DefaultValues | Used to request default values/expressions from the server and assign them to the DefaultExpression property.
DetailDelay | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsOrigin | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
LocalMasterDetail | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RemoveOnRefresh | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams | Used to return the new value of fields to dataset after insert or update.
SetFieldsReadOnly | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

See Also

  • TDADataSetOptions Class
  • TDADataSetOptions Class Members


TDADataSetOptions.AutoPrepare Property

TDADataSetOptions.AutoPrepare Property

Used to execute automatic TCustomDADataSet.Prepare on the query execution.

Class

TDADataSetOptions

Syntax

property AutoPrepare: boolean default False;

Remarks

Use the AutoPrepare property to execute automatic TCustomDADataSet.Prepare on the query execution. Makes sense for cases when a query will be executed several times, for example, in Master/Detail relationships.


TDADataSetOptions.CacheCalcFields Property

TDADataSetOptions.CacheCalcFields Property

Used to enable caching of the TField.Calculated and TField.Lookup fields.

Class

TDADataSetOptions

Syntax

property CacheCalcFields: boolean default False;

Remarks

Use the CacheCalcFields property to enable caching of the TField.Calculated and TField.Lookup fields. It can be useful for reducing CPU usage for calculated fields. Using caching of calculated and lookup fields increases memory usage on the client side.


TDADataSetOptions.DefaultValues Property

TDADataSetOptions.DefaultValues Property

Used to request default values/expressions from the server and assign them to the DefaultExpression property.

Class

TDADataSetOptions

Syntax

property DefaultValues: boolean default False;

Remarks

If True, the default values/expressions are requested from the server and assigned to the DefaultExpression property of TField objects replacing already existent values.


TDADataSetOptions.DetailDelay Property

TDADataSetOptions.DetailDelay Property

Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.

Class

TDADataSetOptions

Syntax

property DetailDelay: integer default 0;

Remarks

Use the DetailDelay property to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset. If DetailDelay is 0 (the default value) then refreshing of detail dataset occurs immediately. The DetailDelay option should be used for detail dataset.


TDADataSetOptions.FieldsOrigin Property

TDADataSetOptions.FieldsOrigin Property

Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.

Class

TDADataSetOptions

Syntax

property FieldsOrigin: boolean default False;

Remarks

If True, TCustomDADataSet fills the Origin property of the TField objects by appropriate value when opening a dataset.


TDADataSetOptions.FlatBuffers Property

TDADataSetOptions.FlatBuffers Property

Used to control how a dataset treats data of the ftString and ftVarBytes fields.

Class

TDADataSetOptions

Syntax

property FlatBuffers: boolean default False;

Remarks

Use the FlatBuffers property to control how a dataset treats data of the ftString and ftVarBytes fields. When set to True, all data fetched from the server is stored in record pdata without unused tails.


TDADataSetOptions.LocalMasterDetail Property

TDADataSetOptions.LocalMasterDetail Property

Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.

Class

TDADataSetOptions

Syntax

property LocalMasterDetail: boolean default False;

Remarks

If True, for detail dataset in master-detail relationship TCustomDADataSet uses local filtering for establishing master/detail relationship and does not refer to the server. Otherwise detail dataset performs query each time a record is selected in master dataset. This option is useful for reducing server calls number, server resources economy. It can be useful for slow connection. The TMemDataSet.CachedUpdates mode can be used for detail dataset only when this option is set to true. Setting the LocalMasterDetail option to True is not recommended when detail table contains too many rows, because when it is set to False, only records that correspond to the current record in master dataset are fetched.


TDADataSetOptions.LongStrings Property

TDADataSetOptions.LongStrings Property

Used to represent string fields with the length that is greater than 255 as TStringField.

Class

TDADataSetOptions

Syntax

property LongStrings: boolean default True;

Remarks

Use the LongStrings property to represent string fields with the length that is greater than 255 as TStringField, not as TMemoField.


TDADataSetOptions.NumberRange Property

TDADataSetOptions.NumberRange Property

Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.

Class

TDADataSetOptions

Syntax

property NumberRange: boolean default False;

Remarks

Use the NumberRange property to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.


TDADataSetOptions.QueryRecCount Property

TDADataSetOptions.QueryRecCount Property

Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.

Class

TDADataSetOptions

Syntax

property QueryRecCount: boolean default False;

Remarks

If True, and the TOraDataSet.FetchAll property is False, TCustomDADataSet performs additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records. Does not have any effect if the FetchAll property is True.


TDADataSetOptions.QuoteNames Property

TDADataSetOptions.QuoteNames Property

Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.

Class

TDADataSetOptions

Syntax

property QuoteNames: boolean default False;

Remarks

If True, TCustomDADataSet quotes all database object names in autogenerated SQL statements such as update SQL.


TDADataSetOptions.RemoveOnRefresh Property

TDADataSetOptions.RemoveOnRefresh Property

Used for a dataset to locally remove a record that can not be found on the server.

Class

TDADataSetOptions

Syntax

property RemoveOnRefresh: boolean default True;

Remarks

When the RefreshRecord procedure can't find necessary record on the server and RemoveOnRefresh is set to True, dataset removes the record locally. Usually RefreshRecord can't find necessary record when someone else dropped the record or changed the key value of it.

This option makes sense only if the StrictUpdate option is set to False. If the StrictUpdate option is True, error will be generated regardless of the RemoveOnRefresh option value.


TDADataSetOptions.RequiredFields Property

TDADataSetOptions.RequiredFields Property

Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.

Class

TDADataSetOptions

Syntax

property RequiredFields: boolean default True;

Remarks

If True, TCustomDADataSet sets the Required property of the TField objects for the NOT NULL fields. It is useful when table has a trigger which updates the NOT NULL fields.


TDADataSetOptions.ReturnParams Property

TDADataSetOptions.ReturnParams Property

Used to return the new value of fields to dataset after insert or update.

Class

TDADataSetOptions

Syntax

property ReturnParams: boolean default False;

Remarks

Use the ReturnParams property to return the new value of fields to dataset after insert or update. The actual value of field after insert or update may be different from the value stored in the local memory if the table has a trigger. When ReturnParams is True, OUT parameters of the SQLInsert and SQLUpdate statements is assigned to the corresponding fields.


TDADataSetOptions.SetFieldsReadOnly Property

TDADataSetOptions.SetFieldsReadOnly Property

Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.

Class

TDADataSetOptions

Syntax

property SetFieldsReadOnly: boolean default False;

Remarks

If True, dataset sets the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated. Set this option for datasets that use automatic generation of the update SQL statements only.


TDADataSetOptions.StrictUpdate Property

TDADataSetOptions.StrictUpdate Property

Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.

Class

TDADataSetOptions

Syntax

property StrictUpdate: boolean default True;

Remarks

If True, TCustomDADataSet raises an exception when the number of updated or deleted records is not equal 1. Setting this option also causes an exception if the RefreshRecord procedure returns more than one record. The exception does not occur when you use a non-SQL block.

Note: There can be problems if this option is set to True and triggers for UPDATE, DELETE, REFRESH commands that are defined for the table. So it is recommended to disable (set to False) this option with triggers.

TrimFixedChar specifies whether to discard all trailing spaces in the string fields of a dataset.


TDADataSetOptions.TrimFixedChar Property

TDADataSetOptions.TrimFixedChar Property

Specifies whether to discard all trailing spaces in the string fields of a dataset.

Class

TDADataSetOptions

Syntax

property TrimFixedChar: boolean default True;

Remarks

Specifies whether to discard all trailing spaces in the string fields of a dataset.


TDADataSetOptions.UpdateAllFields Property

TDADataSetOptions.UpdateAllFields Property

Used to iclude all dataset fields in the generated UPDATE and INSERT statements.

Class

TDADataSetOptions

Syntax

property UpdateAllFields: boolean default False;

Remarks

If True, all dataset fields will be included in the generated UPDATE and INSERT statements. Unspecified fields will have NULL value in the INSERT statements. Otherwise, only updated fields will be included to the generated update statements.


TDADataSetOptions.UpdateBatchSize Property

TDADataSetOptions.UpdateBatchSize Property

Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

Class

TDADataSetOptions

Syntax

property UpdateBatchSize: Integer default 1;

Remarks

Use the UpdateBatchSize property to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. Takes effect only when updating dataset in the TMemDataSet.CachedUpdates mode. The default value is 1.


TDAMetaData Class

TDAMetaData Class

A class for retrieving metainformation of the specified database objects in the form of dataset.

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

Unit

DBAccess

Syntax

TDAMetaData = class(TMemDataSet);

Remarks

TDAMetaData is a TDataSet descendant standing for retrieving metainformation of the specified database objects in the form of dataset. First of all you need to specify which kind of metainformation you want to see. For this you need to assign the TDAMetaData.MetaDataKind property. Provide one or more conditions in the TDAMetaData.Restrictions property to diminish the size of the resultset and get only information you are interested in.

Use the TDAMetaData.GetMetaDataKinds method to get the full list of supported kinds of meta data. With the TDAMetaData.GetRestrictions method you can find out what restrictions are applicable to the specified MetaDataKind.

Example

The code below demonstrates how to get information about columns of the 'emp' table:

MetaData.Connection := Connection;
MetaData.MetaDataKind := 'Columns';
MetaData.Restrictions.Values['TABLE_NAME'] := 'Emp';
MetaData.Open;

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TDAMetaData

See Also

  • TDAMetaData.MetaDataKind
  • TDAMetaData.Restrictions
  • TDAMetaData.GetMetaDataKinds
  • TDAMetaData.GetRestrictions


TDAMetaData Members

TDAMetaData Members

TDAMetaData class overview.

Properties

Name | Description
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
Connection | Used to specify a connection object to use to connect to a data store.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
MetaDataKind | Used to specify which kind of metainformation to show.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
Restrictions | Used to provide one or more conditions restricting the list of objects to be described.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetMetaDataKinds | Used to get values acceptable in the MetaDataKind property.
GetRestrictions | Used to find out which restrictions are applicable to a certain MetaDataKind.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TDAMetaData Properties

TDAMetaData Properties

Properties of the TDAMetaData class.

For a complete list of the TDAMetaData class members, see the TDAMetaData Members topic.

Public

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection | Used to specify a connection object to use to connect to a data store.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
MetaDataKind | Used to specify which kind of metainformation to show.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Restrictions | Used to provide one or more conditions restricting the list of objects to be described.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TDAMetaData Class
  • TDAMetaData Class Members


TDAMetaData.Connection Property

TDAMetaData.Connection Property

Used to specify a connection object to use to connect to a data store.

Class

TDAMetaData

Syntax

property Connection: TCustomDAConnection;

Remarks

Use the Connection property to specify a connection object to use to connect to a data store.

Set at design-time by selecting from the list of provided TCustomDAConnection or its descendant class objects.

At runtime, set the Connection property to reference an instanciated TCustomDAConnection object.


TDAMetaData.MetaDataKind Property

TDAMetaData.MetaDataKind Property

Used to specify which kind of metainformation to show.

Class

TDAMetaData

Syntax

property MetaDataKind: string;

Remarks

This string property specifies which kind of metainformation to show. The value of this property should be assigned before activating the component. If MetaDataKind equals to an empty string (the default value), the full value list that this property accepts will be shown.

They are described in the table below:

MetaDataKind | Description
Columns | show metainformation about the columns of the existing tables
Constraints | show metainformation about the constraints defined in the database
IndexColumns | show metainformation about the indexed columns
Indexes | show metainformation about indexes in the database
MetaDataKinds | show the acceptable values of this property. You will get the same result if the MetadataKind property is an empty string
ProcedureParameters | show metainformation about the parameters of the existing procedures
Procedures | show metainformation about the existing procedures
Restrictions | generates a dataset that describes which restrictions are applicable to each MetaDataKind
Tables | show metainformation about the existing tables

If you provide a value that equals neither of the values described in the table, an error will be raised.

See Also

  • Restrictions


TDAMetaData.Restrictions Property

TDAMetaData.Restrictions Property

Used to provide one or more conditions restricting the list of objects to be described.

Class

TDAMetaData

Syntax

property Restrictions: _TStrings;

Remarks

Use the Restriction list to provide one or more conditions restricting the list of objects to be described. To see the full list of restrictions and to which metadata kinds they are applicable, you should assign the Restrictions value to the MetaDataKind property and view the result.

See Also

  • MetaDataKind


TDAMetaData Methods

TDAMetaData Methods

Methods of the TDAMetaData class.

For a complete list of the TDAMetaData class members, see the TDAMetaData Members topic.

Public

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetMetaDataKinds | Used to get values acceptable in the MetaDataKind property.
GetRestrictions | Used to find out which restrictions are applicable to a certain MetaDataKind.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TDAMetaData Class
  • TDAMetaData Class Members


TDAMetaData.GetMetaDataKinds Method

TDAMetaData.GetMetaDataKinds Method

Used to get values acceptable in the MetaDataKind property.

Class

TDAMetaData

Syntax

procedure GetMetaDataKinds(List: _TStrings);

Parameters
List
Holds the object that will be filled with metadata kinds (restrictions).

Remarks

Call the GetMetaDataKinds method to get values acceptable in the MetaDataKind property. The List parameter will be cleared and then filled with values.

See Also

  • MetaDataKind


TDAMetaData.GetRestrictions Method

TDAMetaData.GetRestrictions Method

Used to find out which restrictions are applicable to a certain MetaDataKind.

Class

TDAMetaData

Syntax

procedure GetRestrictions(List: _TStrings; const MetaDataKind: string);

Parameters
List
Holds the object that will be filled with metadata kinds (restrictions).
MetaDataKind
Holds the metadata kind for which restrictions are returned.

Remarks

Call the GetRestrictions method to find out which restrictions are applicable to a certain MetaDataKind. The List parameter will be cleared and then filled with values.

See Also

  • Restrictions
  • GetMetaDataKinds


TDAParam Class

TDAParam Class

A class that forms objects to represent the values of the parameters set.

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

Unit

DBAccess

Syntax

TDAParam = class(TParam);

Remarks

Use the properties of TDAParam to set the value of a parameter. Objects that use parameters create TDAParam objects to represent these parameters. For example, TDAParam objects are used by TCustomDASQL, TCustomDADataSet.

TDAParam shares many properties with TField, as both describe the value of a field in a dataset. However, a TField object has several properties to describe the field binding and the way the field is displayed, edited, or calculated, that are not needed in a TDAParam object. Conversely, TDAParam includes properties that indicate how the field value is passed as a parameter.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TParam
TDAParam

See Also

  • TCustomDADataSet
  • TCustomDASQL
  • TDAParams


TDAParam Members

TDAParam Members

TDAParam class overview.

Properties

Name | Description
AsBlob | Used to set and read the value of the BLOB parameter as string.
AsBlobRef | Used to set and read the value of the BLOB parameter as a TBlob object.
AsFloat | Used to assign the value for a float field to a parameter.
AsInteger | Used to assign the value for an integer field to the parameter.
AsLargeInt | Used to assign the value for a LargeInteger field to the parameter.
AsMemo | Used to assign the value for a memo field to the parameter.
AsMemoRef | Used to set and read the value of the memo parameter as a TBlob object.
AsSQLTimeStamp | Used to specify the value of the parameter when it represents a SQL timestamp field.
AsString | Used to assign the string value to the parameter.
AsWideString | Used to assign the Unicode string value to the parameter.
DataType | Indicates the data type of the parameter.
IsNull | Used to indicate whether the value assigned to a parameter is NULL.
ParamType | Used to indicate the type of use for a parameter.
Size | Specifies the size of a string type parameter.
Value | Used to represent the value of the parameter as Variant.

Methods

Name | Description
AssignField | Assigns field name and field value to a param.
AssignFieldValue | Assigns the specified field properties and value to a parameter.
LoadFromFile | Places the content of a specified file into a TDAParam object.
LoadFromStream | Places the content from a stream into a TDAParam object.
SetBlobData | Overloaded. Writes the data from a specified buffer to BLOB.


TDAParam Properties

TDAParam Properties

Properties of the TDAParam class.

For a complete list of the TDAParam class members, see the TDAParam Members topic.

Public

Name | Description
AsBlob | Used to set and read the value of the BLOB parameter as string.
AsBlobRef | Used to set and read the value of the BLOB parameter as a TBlob object.
AsFloat | Used to assign the value for a float field to a parameter.
AsInteger | Used to assign the value for an integer field to the parameter.
AsLargeInt | Used to assign the value for a LargeInteger field to the parameter.
AsMemo | Used to assign the value for a memo field to the parameter.
AsMemoRef | Used to set and read the value of the memo parameter as a TBlob object.
AsSQLTimeStamp | Used to specify the value of the parameter when it represents a SQL timestamp field.
AsString | Used to assign the string value to the parameter.
AsWideString | Used to assign the Unicode string value to the parameter.
IsNull | Used to indicate whether the value assigned to a parameter is NULL.

Published

Name | Description
DataType | Indicates the data type of the parameter.
ParamType | Used to indicate the type of use for a parameter.
Size | Specifies the size of a string type parameter.
Value | Used to represent the value of the parameter as Variant.

See Also

  • TDAParam Class
  • TDAParam Class Members


TDAParam.AsBlob Property

TDAParam.AsBlob Property

Used to set and read the value of the BLOB parameter as string.

Class

TDAParam

Syntax

property AsBlob: TBlobData;

Remarks

Use the AsBlob property to set and read the value of the BLOB parameter as string. Setting AsBlob will set the DataType property to ftBlob. AsBlob is the value of the parameter when it represents the value of the LONG RAW type.


TDAParam.AsBlobRef Property

TDAParam.AsBlobRef Property

Used to set and read the value of the BLOB parameter as a TBlob object.

Class

TDAParam

Syntax

property AsBlobRef: TBlob;

Remarks

Use the AsBlobRef property to set and read the value of the BLOB parameter as a TBlob object. Setting AsBlobRef will set the DataType property to ftBlob. Specifies the value of the parameter when it represents the value of the LONG RAW type.


TDAParam.AsFloat Property

TDAParam.AsFloat Property

Used to assign the value for a float field to a parameter.

Class

TDAParam

Syntax

property AsFloat: double;

Remarks

Use the AsFloat property to assign the value for a float field to the parameter. Setting AsFloat will set the DataType property to dtFloat.

Read the AsFloat property to determine the value that was assigned to an output parameter, represented as Double. The value of the parameter will be converted to the Double value if possible.


TDAParam.AsInteger Property

TDAParam.AsInteger Property

Used to assign the value for an integer field to the parameter.

Class

TDAParam

Syntax

property AsInteger: integer;

Remarks

Use the AsInteger property to assign the value for an integer field to the parameter. Setting AsInteger will set the DataType property to dtInteger.

Read the AsInteger property to determine the value that was assigned to an output parameter, represented as a 32-bit integer. The value of the parameter will be converted to the Integer value if possible.


TDAParam.AsLargeInt Property

TDAParam.AsLargeInt Property

Used to assign the value for a LargeInteger field to the parameter.

Class

TDAParam

Syntax

property AsLargeInt: Int64;

Remarks

Set the AsLargeInt property to assign the value for an Int64 field to the parameter. Setting AsLargeInt will set the DataType property to dtLargeint.

Read the AsLargeInt property to determine the value that was assigned to an output parameter, represented as a 64-bit integer. The value of the parameter will be converted to the Int64 value if possible.


TDAParam.AsMemo Property

TDAParam.AsMemo Property

Used to assign the value for a memo field to the parameter.

Class

TDAParam

Syntax

property AsMemo: string;

Remarks

Use the AsMemo property to assign the value for a memo field to the parameter. Setting AsMemo will set the DataType property to ftMemo. AsMemo is the value of the parameter when it represents the value of the LONG type.


TDAParam.AsMemoRef Property

TDAParam.AsMemoRef Property

Used to set and read the value of the memo parameter as a TBlob object.

Class

TDAParam

Syntax

property AsMemoRef: TBlob;

Remarks

Use the AsMemoRef property to set and read the value of the memo parameter as a TBlob object. Setting AsMemoRef will set the DataType property to ftMemo. Specifies the value of the parameter when it represents the value of the LONG type.


TDAParam.AsSQLTimeStamp Property

TDAParam.AsSQLTimeStamp Property

Used to specify the value of the parameter when it represents a SQL timestamp field.

Class

TDAParam

Syntax

property AsSQLTimeStamp: TSQLTimeStamp;

Remarks

Set the AsSQLTimeStamp property to assign the value for a SQL timestamp field to the parameter. Setting AsSQLTimeStamp sets the DataType property to ftTimeStamp.


TDAParam.AsString Property

TDAParam.AsString Property

Used to assign the string value to the parameter.

Class

TDAParam

Syntax

property AsString: string;

Remarks

Use the AsString property to assign the string value to the parameter. Setting AsString will set the DataType property to ftString.

Read the AsString property to determine the value that was assigned to an output parameter represented as a string. The value of the parameter will be converted to a string.


TDAParam.AsWideString Property

TDAParam.AsWideString Property

Used to assign the Unicode string value to the parameter.

Class

TDAParam

Syntax

property AsWideString: string;

Remarks

Set AsWideString to assign the Unicode string value to the parameter. Setting AsWideString will set the DataType property to ftWideString.

Read the AsWideString property to determine the value that was assigned to an output parameter, represented as a Unicode string. The value of the parameter will be converted to a Unicode string.


TDAParam.DataType Property

TDAParam.DataType Property

Indicates the data type of the parameter.

Class

TDAParam

Syntax

property DataType: TFieldType stored IsDataTypeStored;

Remarks

DataType is set automatically when a value is assigned to a parameter. Do not set DataType for bound fields, as this may cause the assigned value to be misinterpreted.

Read DataType to learn the type of data that was assigned to the parameter. Every possible value of DataType corresponds to the type of a database field.


TDAParam.IsNull Property

TDAParam.IsNull Property

Used to indicate whether the value assigned to a parameter is NULL.

Class

TDAParam

Syntax

property IsNull: boolean;

Remarks

Use the IsNull property to indicate whether the value assigned to a parameter is NULL.


TDAParam.ParamType Property

TDAParam.ParamType Property

Used to indicate the type of use for a parameter.

Class

TDAParam

Syntax

property ParamType: TParamType default DB . ptUnknown;

Remarks

Objects that use TDAParam objects to represent field parameters set ParamType to indicate the type of use for a parameter.

To learn the description of TParamType refer to Delphi Help.

Note: The value of ParamType is important for the LONG, LONG RAW, BLOB and CLOB parameters. To write data to database, set ptInput to ParamType, to read data from database, set ptOutput to ParamType.


TDAParam.Size Property

TDAParam.Size Property

Specifies the size of a string type parameter.

Class

TDAParam

Syntax

property Size: integer default 0;

Remarks

Use the Size property to indicate the maximum number of characters the parameter may contain. Use the Size property only for Output parameters of the ftString, ftFixedChar, ftBytes, ftVarBytes, or ftWideString type.


TDAParam.Value Property

TDAParam.Value Property

Used to represent the value of the parameter as Variant.

Class

TDAParam

Syntax

property Value: variant stored IsValueStored;

Remarks

The Value property represents the value of the parameter as Variant.

Use Value in generic code that manipulates the values of parameters without the need to know the field type the parameter represent.


TDAParam Methods

TDAParam Methods

Methods of the TDAParam class.

For a complete list of the TDAParam class members, see the TDAParam Members topic.

Public

Name | Description
AssignField | Assigns field name and field value to a param.
AssignFieldValue | Assigns the specified field properties and value to a parameter.
LoadFromFile | Places the content of a specified file into a TDAParam object.
LoadFromStream | Places the content from a stream into a TDAParam object.
SetBlobData | Overloaded. Writes the data from a specified buffer to BLOB.

See Also

  • TDAParam Class
  • TDAParam Class Members


TDAParam.AssignField Method

TDAParam.AssignField Method

Assigns field name and field value to a param.

Class

TDAParam

Syntax

procedure AssignField(Field: TField);

Parameters
Field
Holds the field which name and value should be assigned to the param.

Remarks

Call the AssignField method to assign field name and field value to a param.


TDAParam.AssignFieldValue Method

TDAParam.AssignFieldValue Method

Assigns the specified field properties and value to a parameter.

Class

TDAParam

Syntax

procedure AssignFieldValue(Field: TField; const Value: Variant); virtual;

Parameters
Field
Holds the field the properties of which will be assigned to the parameter.
Value
Holds the value for the parameter.

Remarks

Call the AssignFieldValue method to assign the specified field properties and value to a parameter.


TDAParam.LoadFromFile Method

TDAParam.LoadFromFile Method

Places the content of a specified file into a TDAParam object.

Class

TDAParam

Syntax

procedure LoadFromFile(const FileName: string; BlobType: TBlobType);

Parameters
FileName
Holds the name of the file.
BlobType
Holds a value that modifies the DataType property so that this TDAParam object now holds the BLOB value.

Remarks

Use the LoadFromFile method to place the content of a file specified by FileName into a TDAParam object. The BlobType value modifies the DataType property so that this TDAParam object now holds the BLOB value.

See Also

  • LoadFromStream


TDAParam.LoadFromStream Method

TDAParam.LoadFromStream Method

Places the content from a stream into a TDAParam object.

Class

TDAParam

Syntax

procedure LoadFromStream(Stream: TStream; BlobType: TBlobType); virtual;

Parameters
Stream
Holds the stream to copy content from.
BlobType
Holds a value that modifies the DataType property so that this TDAParam object now holds the BLOB value.

Remarks

Call the LoadFromStream method to place the content from a stream into a TDAParam object. The BlobType value modifies the DataType property so that this TDAParam object now holds the BLOB value.

See Also

  • LoadFromFile


TDAParam.SetBlobData Overload

TDAParam.SetBlobData Overload

Writes the data from a specified buffer to BLOB.

Class

TDAParam

Overload List

Name | Description
SetBlobData | Writes the data from a specified buffer to BLOB.
SetBlobData(Buffer: TValueBuffer) | Writes the data from a specified buffer to BLOB.


TDAParam.SetBlobData

TDAParam.SetBlobData

Writes the data from a specified buffer to BLOB.

Unit

Syntax

Remarks

Call the SetBlobData method to write data from a specified buffer to BLOB.


TDAParam.SetBlobData Method

TDAParam.SetBlobData Method

Writes the data from a specified buffer to BLOB.

Class

TDAParam

Syntax

procedure SetBlobData(Buffer: TValueBuffer); overload

Parameters
Buffer
Holds the pointer to the data.


TDAParams Class

TDAParams Class

This class is used to manage a list of TDAParam objects for an object that uses field parameters.

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

Unit

DBAccess

Syntax

TDAParams = class(TParams);

Remarks

Use TDAParams to manage a list of TDAParam objects for an object that uses field parameters. For example, TCustomDADataSet objects and TCustomDASQL objects use TDAParams objects to create and access their parameters.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TParams
TDAParams

See Also

  • TCustomDADataSet.Params
  • TCustomDASQL.Params
  • TDAParam


TDAParams Members

TDAParams Members

TDAParams class overview.

Properties

Name | Description
Items | Used to interate through all parameters.

Methods

Name | Description
FindParam | Searches for a parameter with the specified name.
ParamByName | Searches for a parameter with the specified name.


TDAParams Properties

TDAParams Properties

Properties of the TDAParams class.

For a complete list of the TDAParams class members, see the TDAParams Members topic.

Public

Name | Description
Items | Used to interate through all parameters.

See Also

  • TDAParams Class
  • TDAParams Class Members


TDAParams.Items Property(Indexer)

TDAParams.Items Property(Indexer)

Used to interate through all parameters.

Class

TDAParams

Syntax

property Items[Index: integer]: TDAParam; default;

Parameters
Index
Holds an index in the range 0..Count - 1.

Remarks

Use the Items property to iterate through all parameters. Index identifies the index in the range 0..Count - 1. Items can reference a particular parameter by its index, but the ParamByName method is preferred in order to avoid depending on the order of the parameters.


TDAParams Methods

TDAParams Methods

Methods of the TDAParams class.

For a complete list of the TDAParams class members, see the TDAParams Members topic.

Public

Name | Description
FindParam | Searches for a parameter with the specified name.
ParamByName | Searches for a parameter with the specified name.

See Also

  • TDAParams Class
  • TDAParams Class Members


TDAParams.FindParam Method

TDAParams.FindParam Method

Searches for a parameter with the specified name.

Class

TDAParams

Syntax

function FindParam(const Value: string): TDAParam;

Parameters
Value
Holds the parameter name.
Return Value
a parameter, if a match was found. Nil otherwise.

Remarks

Use the FindParam method to find a parameter with the name passed in Value. If a match is found, FindParam returns the parameter. Otherwise, it returns nil. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate more than one parameter at a time by name, use the GetParamList method instead. To get only the value of a named parameter, use the ParamValues property.


TDAParams.ParamByName Method

TDAParams.ParamByName Method

Searches for a parameter with the specified name.

Class

TDAParams

Syntax

function ParamByName(const Value: string): TDAParam;

Parameters
Value
Holds the parameter name.
Return Value
a parameter, if the match was found. otherwise an exception is raised.

Remarks

Use the ParamByName method to find a parameter with the name passed in Value. If a match was found, ParamByName returns the parameter. Otherwise, an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate a parameter by name without raising an exception if the parameter is not found, use the FindParam method.


TDATransaction Class

TDATransaction Class

A base class that implements functionality for controlling transactions.

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

Unit

DBAccess

Syntax

TDATransaction = class(TComponent);

Remarks

TDATransaction is a base class for components implementing functionality for managing transactions.

Do not create instances of TDATransaction. Use descendants of the TDATransaction class instead.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDATransaction


TDATransaction Members

TDATransaction Members

TDATransaction class overview.

Properties

Name | Description
Active | Used to determine if the transaction is active.
DefaultCloseAction | Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.

Methods

Name | Description
Commit | Commits the current transaction.
Rollback | Discards all modifications of data associated with the current transaction and ends the transaction.
StartTransaction | Begins a new transaction.

Events

Name | Description
OnError | Used to process errors that occur during executing a transaction.


TDATransaction Properties

TDATransaction Properties

Properties of the TDATransaction class.

For a complete list of the TDATransaction class members, see the TDATransaction Members topic.

Public

Name | Description
Active | Used to determine if the transaction is active.
DefaultCloseAction | Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.

See Also

  • TDATransaction Class
  • TDATransaction Class Members


TDATransaction.Active Property

TDATransaction.Active Property

Used to determine if the transaction is active.

Class

TDATransaction

Syntax

property Active: boolean;

Remarks

Indicates whether the transaction is active. This property is read-only.


TDATransaction.DefaultCloseAction Property

TDATransaction.DefaultCloseAction Property

Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.

Class

TDATransaction

Syntax

property DefaultCloseAction: TCRTransactionAction default taRollback;

Remarks

Use DefaultCloseAction to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.


TDATransaction Methods

TDATransaction Methods

Methods of the TDATransaction class.

For a complete list of the TDATransaction class members, see the TDATransaction Members topic.

Public

Name | Description
Commit | Commits the current transaction.
Rollback | Discards all modifications of data associated with the current transaction and ends the transaction.
StartTransaction | Begins a new transaction.

See Also

  • TDATransaction Class
  • TDATransaction Class Members


TDATransaction.Commit Method

TDATransaction.Commit Method

Commits the current transaction.

Class

TDATransaction

Syntax

procedure Commit; virtual;

Remarks

Call the Commit method to commit the current transaction. On commit server writes permanently all pending data updates associated with the current transaction to the database, and then finishes the transaction.

See Also

  • Rollback
  • StartTransaction


TDATransaction.Rollback Method

TDATransaction.Rollback Method

Discards all modifications of data associated with the current transaction and ends the transaction.

Class

TDATransaction

Syntax

procedure Rollback; virtual;

Remarks

Call Rollback to cancel all data modifications made within the current transaction to the database server, and finish the transaction.

See Also

  • Commit
  • StartTransaction


TDATransaction.StartTransaction Method

TDATransaction.StartTransaction Method

Begins a new transaction.

Class

TDATransaction

Syntax

procedure StartTransaction; virtual;

Remarks

Call the StartTransaction method to begin a new transaction against the database server. Before calling StartTransaction, an application should check the Active property. If TDATransaction.Active is True, indicating that a transaction is already in progress, a subsequent call to StartTransaction will raise EDatabaseError. An active transaction must be finished by call to Commit or Rollback before call to StartTransaction. Call to StartTransaction when connection is closed also will raise EDatabaseError.

Updates, insertions, and deletions that take place after a call to StartTransaction are held by the server until the application calls Commit to save the changes, or Rollback to cancel them.

See Also

  • Commit
  • Rollback


TDATransaction Events

TDATransaction Events

Events of the TDATransaction class.

For a complete list of the TDATransaction class members, see the TDATransaction Members topic.

Public

Name | Description
OnError | Used to process errors that occur during executing a transaction.

See Also

  • TDATransaction Class
  • TDATransaction Class Members


TDATransaction.OnError Event

TDATransaction.OnError Event

Used to process errors that occur during executing a transaction.

Class

TDATransaction

Syntax

property OnError: TDATransactionErrorEvent;

Remarks

Add a handler to the OnError event to process errors that occur during executing a transaction and save point control statements such as Commit, Rollback, TOraTransaction.Savepoint, TOraTransaction.RollbackToSavepoint, and others. Check the E parameter to get the error code.

See Also

  • Commit
  • Rollback
  • StartTransaction


TMacro Class

TMacro Class

Object that represents the value of a macro.

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

Unit

DBAccess

Syntax

TMacro = class(TCollectionItem);

Remarks

TMacro object represents the value of a macro. Macro is a variable that holds string value. You just insert & MacroName in a SQL query text and change the value of macro by the Macro property editor at design time or the Value property at run time. At the time of opening query macro is replaced by its value.

If by any reason it is not convenient for you to use the ' & ' symbol as a character of macro replacement, change the value of the MacroChar variable.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TMacro

See Also

  • TMacros


TMacro Members

TMacro Members

TMacro class overview.

Properties

Name | Description
Active | Used to determine if the macro should be expanded.
AsDateTime | Used to set the TDataTime value to a macro.
AsFloat | Used to set the float value to a macro.
AsInteger | Used to set the integer value to a macro.
AsString | Used to assign the string value to a macro.
Name | Used to identify a particular macro.
Value | Used to set the value to a macro.


TMacro Properties

TMacro Properties

Properties of the TMacro class.

For a complete list of the TMacro class members, see the TMacro Members topic.

Public

Name | Description
AsDateTime | Used to set the TDataTime value to a macro.
AsFloat | Used to set the float value to a macro.
AsInteger | Used to set the integer value to a macro.
AsString | Used to assign the string value to a macro.

Published

Name | Description
Active | Used to determine if the macro should be expanded.
Name | Used to identify a particular macro.
Value | Used to set the value to a macro.

See Also

  • TMacro Class
  • TMacro Class Members


TMacro.Active Property

TMacro.Active Property

Used to determine if the macro should be expanded.

Class

TMacro

Syntax

property Active: boolean default True;

Remarks

When set to True, the macro will be expanded, otherwise macro definition is replaced by null string. You can use the Active property to modify the SQL property.

The default value is True.

Example

OraQuery.SQL.Text := 'SELECT * FROM Dept WHERE DeptNo > 20 &Cond1';
OraQuery.Macros[0].Value := 'and DName is NULL';
OraQuery.Macros[0].Active:= False;


TMacro.AsDateTime Property

TMacro.AsDateTime Property

Used to set the TDataTime value to a macro.

Class

TMacro

Syntax

property AsDateTime: TDateTime;

Remarks

Use the AsDataTime property to set the TDataTime value to a macro.


TMacro.AsFloat Property

TMacro.AsFloat Property

Used to set the float value to a macro.

Class

TMacro

Syntax

property AsFloat: double;

Remarks

Use the AsFloat property to set the float value to a macro.


TMacro.AsInteger Property

TMacro.AsInteger Property

Used to set the integer value to a macro.

Class

TMacro

Syntax

property AsInteger: integer;

Remarks

Use the AsInteger property to set the integer value to a macro.


TMacro.AsString Property

TMacro.AsString Property

Used to assign the string value to a macro.

Class

TMacro

Syntax

property AsString: string;

Remarks

Use the AsString property to assign the string value to a macro. Read the AsString property to determine the value of macro represented as a string.


TMacro.Name Property

TMacro.Name Property

Used to identify a particular macro.

Class

TMacro

Syntax

property Name: string;

Remarks

Use the Name property to identify a particular macro.


TMacro.Value Property

TMacro.Value Property

Used to set the value to a macro.

Class

TMacro

Syntax

property Value: string;

Remarks

Use the Value property to set the value to a macro.


TMacros Class

TMacros Class

Controls a list of TMacro objects for the TCustomDASQL.Macros or TCustomDADataSet components.

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

Unit

DBAccess

Syntax

TMacros = class(TCollection);

Remarks

Use TMacros to manage a list of TMacro objects for the TCustomDASQL or TCustomDADataSet components.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TMacros

See Also

  • TMacro


TMacros Members

TMacros Members

TMacros class overview.

Properties

Name | Description
Items | Used to iterate through all the macros parameters.

Methods

Name | Description
AssignValues | Copies the macros values and properties from the specified source.
Expand | Changes the macros in the passed SQL statement to their values.
FindMacro | Searches for a TMacro object by its name.
IsEqual | Compares itself with another TMacro object.
MacroByName | Used to search for a macro with the specified name.
Scan | Creates a macros from the passed SQL statement.


TMacros Properties

TMacros Properties

Properties of the TMacros class.

For a complete list of the TMacros class members, see the TMacros Members topic.

Public

Name | Description
Items | Used to iterate through all the macros parameters.

See Also

  • TMacros Class
  • TMacros Class Members


TMacros.Items Property(Indexer)

TMacros.Items Property(Indexer)

Used to iterate through all the macros parameters.

Class

TMacros

Syntax

property Items[Index: integer]: TMacro; default;

Parameters
Index
Holds the index in the range 0..Count - 1.

Remarks

Use the Items property to iterate through all macros parameters. Index identifies the index in the range 0..Count - 1.


TMacros Methods

TMacros Methods

Methods of the TMacros class.

For a complete list of the TMacros class members, see the TMacros Members topic.

Public

Name | Description
AssignValues | Copies the macros values and properties from the specified source.
Expand | Changes the macros in the passed SQL statement to their values.
FindMacro | Searches for a TMacro object by its name.
IsEqual | Compares itself with another TMacro object.
MacroByName | Used to search for a macro with the specified name.
Scan | Creates a macros from the passed SQL statement.

See Also

  • TMacros Class
  • TMacros Class Members


TMacros.AssignValues Method

TMacros.AssignValues Method

Copies the macros values and properties from the specified source.

Class

TMacros

Syntax

procedure AssignValues(Value: TMacros);

Parameters
Value
Holds the source to copy the macros values and properties from.

Remarks

The Assign method copies the macros values and properties from the specified source. Macros are not recreated. Only the values of macros with matching names are assigned.


TMacros.Expand Method

TMacros.Expand Method

Changes the macros in the passed SQL statement to their values.

Class

TMacros

Syntax

procedure Expand(var SQL: string);

Parameters
SQL
Holds the passed SQL statement.

Remarks

Call the Expand method to change the macros in the passed SQL statement to their values.


TMacros.FindMacro Method

TMacros.FindMacro Method

Searches for a TMacro object by its name.

Class

TMacros

Syntax

function FindMacro(const Value: string): TMacro;

Parameters
Value
Holds the value of a macro to search for.
Return Value
TMacro object if a match was found, nil otherwise.

Remarks

Call the FindMacro method to find a macro with the name passed in Value. If a match is found, FindMacro returns the macro. Otherwise, it returns nil. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.


TMacros.IsEqual Method

TMacros.IsEqual Method

Compares itself with another TMacro object.

Class

TMacros

Syntax

function IsEqual(Value: TMacros): boolean;

Parameters
Value
Holds the values of TMacro objects.
Return Value
True, if the number of TMacro objects and the values of all TMacro objects are equal.

Remarks

Call the IsEqual method to compare itself with another TMacro object. Returns True if the number of TMacro objects and the values of all TMacro objects are equal.


TMacros.MacroByName Method

TMacros.MacroByName Method

Used to search for a macro with the specified name.

Class

TMacros

Syntax

function MacroByName(const Value: string): TMacro;

Parameters
Value
Holds a name of the macro to search for.
Return Value
TMacro object, if a macro with specified name was found.

Remarks

Call the MacroByName method to find a Macro with the name passed in Value. If a match is found, MacroByName returns the Macro. Otherwise, an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate a macro by name without raising an exception if the parameter is not found, use the FindMacro method.


TMacros.Scan Method

TMacros.Scan Method

Creates a macros from the passed SQL statement.

Class

TMacros

Syntax

procedure Scan(SQL: string);

Parameters
SQL
Holds the passed SQL statement.

Remarks

Call the Scan method to create a macros from the passed SQL statement. On that all existing TMacro objects are cleared.


TPoolingOptions Class

TPoolingOptions Class

This class allows setting up the behaviour of the connection pool.

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

Unit

DBAccess

Syntax

TPoolingOptions = class(TPersistent);

Inheritance Hierarchy

TObject
TPersistent
TPoolingOptions


TPoolingOptions Members

TPoolingOptions Members

TPoolingOptions class overview.

Properties

Name | Description
ConnectionLifetime | Used to specify the maximum time during which an opened connection can be used by connection pool.
MaxPoolSize | Used to specify the maximum number of connections that can be opened in connection pool.
MinPoolSize | Used to specify the minimum number of connections that can be opened in the connection pool.
Validate | Used for a connection to be validated when it is returned from the pool.


TPoolingOptions Properties

TPoolingOptions Properties

Properties of the TPoolingOptions class.

For a complete list of the TPoolingOptions class members, see the TPoolingOptions Members topic.

Published

Name | Description
ConnectionLifetime | Used to specify the maximum time during which an opened connection can be used by connection pool.
MaxPoolSize | Used to specify the maximum number of connections that can be opened in connection pool.
MinPoolSize | Used to specify the minimum number of connections that can be opened in the connection pool.
Validate | Used for a connection to be validated when it is returned from the pool.

See Also

  • TPoolingOptions Class
  • TPoolingOptions Class Members


TPoolingOptions.ConnectionLifetime Property

TPoolingOptions.ConnectionLifetime Property

Used to specify the maximum time during which an opened connection can be used by connection pool.

Class

TPoolingOptions

Syntax

property ConnectionLifetime: integer default 0;

Remarks

Use the ConnectionLifeTime property to specify the maximum time during which an opened connection can be used by connection pool. Measured in milliseconds. Pool deletes connections with exceeded connection lifetime when TCustomDAConnection is about to close. If the ConnectionLifetime property is set to 0 (by default), then the lifetime of connection is infinity. ConnectionLifetime concerns only inactive connections in the pool.


TPoolingOptions.MaxPoolSize Property

TPoolingOptions.MaxPoolSize Property

Used to specify the maximum number of connections that can be opened in connection pool.

Class

TPoolingOptions

Syntax

property MaxPoolSize: integer default 100;

Remarks

Specifies the maximum number of connections that can be opened in connection pool. Once this value is reached, no more connections are opened. The valid values are 1 and higher.


TPoolingOptions.MinPoolSize Property

TPoolingOptions.MinPoolSize Property

Used to specify the minimum number of connections that can be opened in the connection pool.

Class

TPoolingOptions

Syntax

property MinPoolSize: integer default 0;

Remarks

Use the MinPoolSize property to specify the minimum number of connections that can be opened in the connection pool.


TPoolingOptions.Validate Property

TPoolingOptions.Validate Property

Used for a connection to be validated when it is returned from the pool.

Class

TPoolingOptions

Syntax

property Validate: boolean default False;

Remarks

If the Validate property is set to True, connection will be validated when it is returned from the pool. By default this option is set to False and pool does not validate connection when it is returned to be used by a TCustomDAConnection component.


Types in DBAccess

Types in DBAccess

Types in the DBAccess unit.

Types

Name | Description
TAfterExecuteEvent | This type is used for the TCustomDADataSet.AfterExecute and TCustomDASQL.AfterExecute events.
TAfterFetchEvent | This type is used for the TCustomDADataSet.AfterFetch event.
TBeforeFetchEvent | This type is used for the TCustomDADataSet.BeforeFetch event.
TConnectionLostEvent | This type is used for the TCustomDAConnection.OnConnectionLost event.
TDAConnectionErrorEvent | This type is used for the TCustomDAConnection.OnError event.
TDATransactionErrorEvent | This type is used for the TDATransaction.OnError event.
TRefreshOptions | Represents the set of TRefreshOption.


TAfterExecuteEvent Procedure Reference

TAfterExecuteEvent Procedure Reference

This type is used for the TCustomDADataSet.AfterExecute and TCustomDASQL.AfterExecute events.

Unit

DBAccess

Syntax

TAfterExecuteEvent = procedure (Sender: TObject; Result: boolean) of object;

Parameters
Sender
An object that raised the event.
Result
The result is True if SQL statement is executed successfully. False otherwise.


TAfterFetchEvent Procedure Reference

TAfterFetchEvent Procedure Reference

This type is used for the TCustomDADataSet.AfterFetch event.

Unit

DBAccess

Syntax

TAfterFetchEvent = procedure (DataSet: TCustomDADataSet) of object;

Parameters
DataSet
Holds the TCustomDADataSet descendant to synchronize the record position with.


TBeforeFetchEvent Procedure Reference

TBeforeFetchEvent Procedure Reference

This type is used for the TCustomDADataSet.BeforeFetch event.

Unit

DBAccess

Syntax

TBeforeFetchEvent = procedure (DataSet: TCustomDADataSet; var Cancel: boolean) of object;

Parameters
DataSet
Holds the TCustomDADataSet descendant to synchronize the record position with.
Cancel
True, if the current fetch operation should be aborted.


TConnectionLostEvent Procedure Reference

TConnectionLostEvent Procedure Reference

This type is used for the TCustomDAConnection.OnConnectionLost event.

Unit

DBAccess

Syntax

TConnectionLostEvent = procedure (Sender: TObject; Component: TComponent; ConnLostCause: TConnLostCause; var RetryMode: TRetryMode) of object;

Parameters
Sender
An object that raised the event.
Component
ConnLostCause
The reason of the connection loss.
RetryMode
The application behavior when connection is lost.


TDAConnectionErrorEvent Procedure Reference

TDAConnectionErrorEvent Procedure Reference

This type is used for the TCustomDAConnection.OnError event.

Unit

DBAccess

Syntax

TDAConnectionErrorEvent = procedure (Sender: TObject; E: EDAError; var Fail: boolean) of object;

Parameters
Sender
An object that raised the event.
E
The error information.
Fail
False, if an error dialog should be prevented from being displayed and EAbort exception should be raised to cancel current operation .


TDATransactionErrorEvent Procedure Reference

TDATransactionErrorEvent Procedure Reference

This type is used for the TDATransaction.OnError event.

Unit

DBAccess

Syntax

TDATransactionErrorEvent = procedure (Sender: TObject; E: EDAError; var Fail: boolean) of object;

Parameters
Sender
An object that raised the event.
E
The error code.
Fail
False, if an error dialog should be prevented from being displayed and EAbort exception to cancel the current operation should be raised.


TRefreshOptions Set

TRefreshOptions Set

Represents the set of TRefreshOption.

Unit

DBAccess

Syntax

TRefreshOptions = set of TRefreshOption;


Enumerations in DBAccess

Enumerations in DBAccess

Enumerations in the DBAccess unit.

Enumerations

Name | Description
TLabelSet | Sets the languauge of labels in the connect dialog.
TLockMode | Specifies when the locking of an editing record should be performed.
TRefreshOption | Indicates when the editing record will be refreshed.
TRetryMode | Specifies the application behavior when connection is lost.


TLabelSet Enumeration

TLabelSet Enumeration

Sets the languauge of labels in the connect dialog.

Unit

DBAccess

Syntax

TLabelSet = (lsCustom, lsEnglish, lsFrench, lsGerman, lsItalian, lsPolish, lsPortuguese, lsRussian, lsSpanish);

Values

Value | Meaning
lsCustom | Set the language of labels in the connect dialog manually.
lsEnglish | Set English as the language of labels in the connect dialog.
lsFrench | Set French as the language of labels in the connect dialog.
lsGerman | Set German as the language of labels in the connect dialog.
lsItalian | Set Italian as the language of labels in the connect dialog.
lsPolish | Set Polish as the language of labels in the connect dialog.
lsPortuguese | Set Portuguese as the language of labels in the connect dialog.
lsRussian | Set Russian as the language of labels in the connect dialog.
lsSpanish | Set Spanish as the language of labels in the connect dialog.


TLockMode Enumeration

TLockMode Enumeration

Specifies when the locking of an editing record should be performed.

Unit

DBAccess

Syntax

TLockMode = (lmNone);

Values

Value | Meaning
lmLockDelayed | Locking is performed, then the user posts an edited record. After that the lock is released.
lmLockImmediate | Locking is performed then the user starts editing a record. The lock remains until the user posts or cancels the changes.
lmNone | No locking is performed. This should only be used in single user applications. The default value.


TRefreshOption Enumeration

TRefreshOption Enumeration

Indicates when the editing record will be refreshed.

Unit

DBAccess

Syntax

TRefreshOption = (roAfterInsert, roAfterUpdate, roBeforeEdit);

Values

Value | Meaning
roAfterInsert | Refresh is performed after inserting.
roAfterUpdate | Refresh is performed after updating.
roBeforeEdit | Refresh is performed by Edit method.


TRetryMode Enumeration

TRetryMode Enumeration

Specifies the application behavior when connection is lost.

Unit

DBAccess

Syntax

TRetryMode = (rmRaise, rmReconnect, rmReconnectExecute);

Values

Value | Meaning
rmRaise | An exception is raised.
rmReconnect | Reconnect is performed and then exception is raised.
rmReconnectExecute | Reconnect is performed and abortive operation is reexecuted. Exception is not raised.


Variables in DBAccess

Variables in DBAccess

Variables in the DBAccess unit.

Variables

Name | Description
BaseSQLOldBehavior | After assigning SQL text and modifying it by AddWhere, DeleteWhere, and SetOrderBy, all subsequent changes of the SQL property will not be reflected in the BaseSQL property.
ChangeCursor | When set to True allows data access components to change screen cursor for the execution time.
MacroChar | Determinates what character is used for macros.
SQLGeneratorCompatibility | The value of the TCustomDADataSet.BaseSQL property is used to complete the refresh SQL statement, if the manually assigned TCustomDAUpdateSQL.RefreshSQL property contains only WHERE clause.


DBAccess.BaseSQLOldBehavior Variable

DBAccess.BaseSQLOldBehavior Variable

After assigning SQL text and modifying it by AddWhere, DeleteWhere, and SetOrderBy, all subsequent changes of the SQL property will not be reflected in the BaseSQL property.

Unit

DBAccess

Syntax

BaseSQLOldBehavior: boolean;

Remarks

The BaseSQL property is similar to the SQL property, but it does not store changes made by the AddWhere, DeleteWhere, and SetOrderBy methods. After assigning SQL text and modifying it by one of these methods, all subsequent changes of the SQL property will not be reflected in the BaseSQL property. This behavior was changed in ODAC 5.55.1.26. To restore old behavior, set the BaseSQLOldBehavior variable to True.


DBAccess.ChangeCursor Variable

DBAccess.ChangeCursor Variable

When set to True allows data access components to change screen cursor for the execution time.

Unit

DBAccess

Syntax

ChangeCursor: boolean;


DBAccess.MacroChar Variable

DBAccess.MacroChar Variable

Determinates what character is used for macros.

Unit

DBAccess

Syntax

MacroChar: _char;


DBAccess.SQLGeneratorCompatibility Variable

DBAccess.SQLGeneratorCompatibility Variable

The value of the TCustomDADataSet.BaseSQL property is used to complete the refresh SQL statement, if the manually assigned TCustomDAUpdateSQL.RefreshSQL property contains only WHERE clause.

Unit

DBAccess

Syntax

SQLGeneratorCompatibility: boolean;

Remarks

If the manually assigned TCustomDAUpdateSQL.RefreshSQL property contains only WHERE clause, ODAC uses the value of the TCustomDADataSet.BaseSQL property to complete the refresh SQL statement. In this situation all modifications applied to the SELECT query by functions TCustomDADataSet.AddWhere, TCustomDADataSet.DeleteWhere are not taken into account. This behavior was changed in ODAC 6.00.0.4. To restore the old behavior, set the BaseSQLOldBehavior variable to True.


Enumerations in DBMonitorIntf

Enumerations in DBMonitorIntf

Enumerations in the DBMonitorIntf unit.

Enumerations

Name | Description
TEventType | Specifies the kind of messages used by the TOraAlerter component.


TEventType Enumeration

TEventType Enumeration

Specifies the kind of messages used by the TOraAlerter component.

Unit

DBMonitorIntf

Syntax

TEventType = ();

Values

Value | Meaning
etAlert | Lets all listening sessions be notified when another session broadcasts its message with the corresponding name parameter. The default value.
etPipe | Causes only one of the listening sessions to receive a message.


Devart.Dac.DataAdapter Unit Members

Devart.Dac.DataAdapter Unit Members

This unit contains implementation of the DADataAdapter class.

Classes

Name | Description
DADataAdapter | DataAdapter serves as a bridge between a System.Data.DataSet and a TDataSet component (data source) for retrieving and saving data.


Classes in Devart.Dac.DataAdapter

Classes in Devart.Dac.DataAdapter

Classes in the Devart.Dac.DataAdapter unit.

Classes

Name | Description
DADataAdapter | DataAdapter serves as a bridge between a System.Data.DataSet and a TDataSet component (data source) for retrieving and saving data.


DADataAdapter Class

DADataAdapter Class

DataAdapter serves as a bridge between a System.Data.DataSet and a TDataSet component (data source) for retrieving and saving data.

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

Unit

Devart.Dac.DataAdapter

Syntax

DADataAdapter = class(TComponent);

Remarks

DataAdapter serves as a bridge between a System.Data.DataSet and a TDataSet component (data source) for retrieving and saving data. DataAdapter provides this bridge by mapping DADataAdapter.Fill, which changes the data in the System.Data.DataSet to match the data in the data source, and DADataAdapter.Update, which changes the data in the data source to match the data in the System.Data.DataSet.

Inheritance Hierarchy

TObject
TPersistent
TComponent
DADataAdapter


DADataAdapter Members

DADataAdapter Members

DADataAdapter class overview.

Properties

Name | Description
DataSet | Used to specify a TDataSet object which will be used as data source for DADataAdapter component.

Methods

Name | Description
Fill | Adds or refreshes rows in the System.Data.DataSet to match those in the TDataSet and creates a DataTable.
Update | Performs Insert, Edit, Delete for each inserted, updated, or deleted row in the specified System.Data.DataSet due to the ordering of the rows in the DataTable.


DADataAdapter Properties

DADataAdapter Properties

Properties of the DADataAdapter class.

For a complete list of the DADataAdapter class members, see the DADataAdapter Members topic.

Public

Name | Description
DataSet | Used to specify a TDataSet object which will be used as data source for DADataAdapter component.

See Also

  • DADataAdapter Class
  • DADataAdapter Class Members


DADataAdapter.DataSet Property

DADataAdapter.DataSet Property

Used to specify a TDataSet object which will be used as data source for DADataAdapter component.

Class

DADataAdapter

Syntax

property DataSet: TDataSet;

Remarks

Specify a TDataSet object which will be used as data source for DADataAdapter component.


DADataAdapter Methods

DADataAdapter Methods

Methods of the DADataAdapter class.

For a complete list of the DADataAdapter class members, see the DADataAdapter Members topic.

Public

Name | Description
Fill | Adds or refreshes rows in the System.Data.DataSet to match those in the TDataSet and creates a DataTable.
Update | Performs Insert, Edit, Delete for each inserted, updated, or deleted row in the specified System.Data.DataSet due to the ordering of the rows in the DataTable.

See Also

  • DADataAdapter Class
  • DADataAdapter Class Members


DADataAdapter.Fill Method

DADataAdapter.Fill Method

Adds or refreshes rows in the System.Data.DataSet to match those in the TDataSet and creates a DataTable.

Class

DADataAdapter

Syntax

function Fill(Data: DataSet; tableName: string): integer;

Parameters
Data
holds the dataset updates of which are to be commented to the database.
tableName
holds the name of the DataTable.
Return Value
the number of rows successfully inserted into DataSet.

Remarks

Adds or refreshes rows in the System.Data.DataSet to match those in the TDataSet using the DataSet parameter, and creates a DataTable named tableName. Function returns the number of rows successfully inserted into DataSet.

TDataSet object associated with DADataAdapter must be valid, but it does not need to be opened. If TDataSet is closed before Fill is called, it is opened to retrieve data, then closed. If TDataSet is opened before Fill is called, it remains opened.

If an error is encountered while populating the dataset, rows added prior to the occurrence of the error remain in the dataset. The remainder of the operation is aborted.

If TDataSet does not return any rows, fields are created and no rows are added to the DataSet, and no exception is raised.

See Also

  • Update


DADataAdapter.Update Method

DADataAdapter.Update Method

Performs Insert, Edit, Delete for each inserted, updated, or deleted row in the specified System.Data.DataSet due to the ordering of the rows in the DataTable.

Class

DADataAdapter

Syntax

function Update(Data: DataSet; tableName: string): integer;

Parameters
Data
holds the dataset updates of which are to be commented to the database.
tableName
holds the name of the DataTable.
Return Value
the number of rows successfully updated from the DataSet.

Remarks

Performs Insert, Edit, Delete for each inserted, updated, or deleted row in the specified System.Data.DataSet due to the ordering of the rows in the DataTable. It should be noted that these statements are not performed as a batch process; each row is updated individually. Function returns the number of rows successfully updated from the DataSet.

See Also

  • Fill


Devart.Odac.DataAdapter Unit Members

Devart.Odac.DataAdapter Unit Members

This unit contains implementation of the OraDataAdapter class.

Classes

Name | Description
OraDataAdapter | A class for using with TCustomOraDataSet components and as data source for retrieving and saving data.


Classes in Devart.Odac.DataAdapter

Classes in Devart.Odac.DataAdapter

Classes in the Devart.Odac.DataAdapter unit.

Classes

Name | Description
OraDataAdapter | A class for using with TCustomOraDataSet components and as data source for retrieving and saving data.


OraDataAdapter Class

OraDataAdapter Class

A class for using with TCustomOraDataSet components and as data source for retrieving and saving data.

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

Unit

Devart.Odac.DataAdapter

Syntax

OraDataAdapter = class(DADataAdapter);

Remarks

The OraDataAdapter class is designed for the use with TOraDataSet components and for the use as data source for retrieving and saving data. OraDataAdapter provides this bridge by mapping Fill, which changes data in System.Data.DataSet to match data in data source, and Update, which changes data in data source to match data in System.Data.DataSet.

Inheritance Hierarchy

TObject
TPersistent
TComponent
DADataAdapter
OraDataAdapter

See Also

  • DADataAdapter


OraDataAdapter Members

OraDataAdapter Members

OraDataAdapter class overview.

Properties

Name | Description
DataSet (inherited from DADataAdapter) | Used to specify a TDataSet object which will be used as data source for DADataAdapter component.

Methods

Name | Description
Fill (inherited from DADataAdapter) | Adds or refreshes rows in the System.Data.DataSet to match those in the TDataSet and creates a DataTable.
Update (inherited from DADataAdapter) | Performs Insert, Edit, Delete for each inserted, updated, or deleted row in the specified System.Data.DataSet due to the ordering of the rows in the DataTable.


MemData Unit Members

MemData Unit Members

This unit contains classes for storing data in memory.

Classes

Name | Description
TAttribute | Holds the description of object attributes.
TBlob | Holds large object value for field and parameter dtBlob, dtMemo data types.
TCompressedBlob | Holds large object value for field and parameter dtBlob, dtMemo data types and can compress its data.
TDBObject | A base class for classes that work with user-defined data types that have attributes.
TObjectType | Holds description object type and its attributes.
TSharedObject | A base class that allows to simplify memory management for object referenced by several other objects.

Types

Name | Description
TLocateExOptions | Represents the set of TLocateExOption.

Enumerations

Name | Description
TConnLostCause | Specifies the cause of the connection loss.
TDANumericType | Specifies the format of storing and representing of the NUMERIC (DECIMAL) fields.
TLocateExOption | Allows to set additional search parameters which will be used by the LocateEx method.
TSortType | Specifies a sort type for string fields.
TUpdateRecKind | Specifies the type of records modification.


Classes in MemData

Classes in MemData

Classes in the MemData unit.

Classes

Name | Description
TAttribute | Holds the description of object attributes.
TBlob | Holds large object value for field and parameter dtBlob, dtMemo data types.
TCompressedBlob | Holds large object value for field and parameter dtBlob, dtMemo data types and can compress its data.
TDBObject | A base class for classes that work with user-defined data types that have attributes.
TObjectType | Holds description object type and its attributes.
TSharedObject | A base class that allows to simplify memory management for object referenced by several other objects.


TAttribute Class

TAttribute Class

Holds the description of object attributes.

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

Unit

MemData

Syntax

TAttribute = class(System.TObject);

Remarks

The TAttribute class holds the description of object attributes. You can use TObjectType.Attibutes to access individual attributes. To create TAttribute objects call the TOraType.Describe method. It is called implicitly when ODAC fetches Oracle objects.

Inheritance Hierarchy

TObject
TAttribute

See Also

  • TObjectType
  • TOraType


TAttribute Members

TAttribute Members

TAttribute class overview.

Properties

Name | Description
AttributeNo | Returns an attribute's ordinal position in object.
DataSize | Returns the size of an attribute value in internal representation.
DataType | Returns the type of data that was assigned to the Attribute.
Length | Returns the length of the string for dtString attribute and precision for dtInteger and dtFloat attribute.
ObjectType | Returns a TObjectType object for an object attribute.
Offset | Returns an offset of the attribute value in internal representation.
Owner | Indicates TObjectType that uses the attribute to represent one of its attributes.
Scale | Returns the scale of dtFloat and dtInteger attributes.
Size | Returns the size of an attribute value in external representation.


TAttribute Properties

TAttribute Properties

Properties of the TAttribute class.

For a complete list of the TAttribute class members, see the TAttribute Members topic.

Public

Name | Description
AttributeNo | Returns an attribute's ordinal position in object.
DataSize | Returns the size of an attribute value in internal representation.
DataType | Returns the type of data that was assigned to the Attribute.
Length | Returns the length of the string for dtString attribute and precision for dtInteger and dtFloat attribute.
ObjectType | Returns a TObjectType object for an object attribute.
Offset | Returns an offset of the attribute value in internal representation.
Owner | Indicates TObjectType that uses the attribute to represent one of its attributes.
Scale | Returns the scale of dtFloat and dtInteger attributes.
Size | Returns the size of an attribute value in external representation.

See Also

  • TAttribute Class
  • TAttribute Class Members


TAttribute.AttributeNo Property

TAttribute.AttributeNo Property

Returns an attribute's ordinal position in object.

Class

TAttribute

Syntax

property AttributeNo: word;

Remarks

Use the AttributeNo property to learn an attribute's ordinal position in object, where 1 is the first field.

See Also

  • TObjectType.Attributes


TAttribute.DataSize Property

TAttribute.DataSize Property

Returns the size of an attribute value in internal representation.

Class

TAttribute

Syntax

property DataSize: word;

Remarks

Use the DataSize property to learn the size of an attribute value in internal representation.

For example:

dtDate | 17 (sizeof(OCIDate)
dtFloat | 22 (sizeof(OCINumber))
dtInteger | 22 (sizeof(OCINumber))

See Also

  • TOraObject.Instance
  • Offset


TAttribute.DataType Property

TAttribute.DataType Property

Returns the type of data that was assigned to the Attribute.

Class

TAttribute

Syntax

property DataType: word;

Remarks

Use the DataType property to discover the type of data that was assigned to the Attribute.

Possible values: dtDate, dtFloat, dtInteger, dtString, dtObject.


TAttribute.Length Property

TAttribute.Length Property

Returns the length of the string for dtString attribute and precision for dtInteger and dtFloat attribute.

Class

TAttribute

Syntax

property Length: word;

Remarks

Use the Length property to learn the length of the string for dtString attribute and precision for dtInteger and dtFloat attribute.

See Also

  • Scale


TAttribute.ObjectType Property

TAttribute.ObjectType Property

Returns a TObjectType object for an object attribute.

Class

TAttribute

Syntax

property ObjectType: TObjectType;

Remarks

Use the ObjectType property to return a TObjectType object for an object attribute.


TAttribute.Offset Property

TAttribute.Offset Property

Returns an offset of the attribute value in internal representation.

Class

TAttribute

Syntax

property Offset: word;

Remarks

Use the DataSize property to learn an offset of the attribute value in internal representation.

See Also

  • TOraObject.Instance
  • DataSize


TAttribute.Owner Property

TAttribute.Owner Property

Indicates TObjectType that uses the attribute to represent one of its attributes.

Class

TAttribute

Syntax

property Owner: TObjectType;

Remarks

Check the value of the Owner property to determine TObjectType that uses the attribute to represent one of its attributes. Applications should not assign the Owner property directly. It is assigned automatically when attribute is created from TOraType.Describe.


TAttribute.Scale Property

TAttribute.Scale Property

Returns the scale of dtFloat and dtInteger attributes.

Class

TAttribute

Syntax

property Scale: word;

Remarks

Use the Scale property to learn the scale of dtFloat and dtInteger attributes.

See Also

  • Length


TAttribute.Size Property

TAttribute.Size Property

Returns the size of an attribute value in external representation.

Class

TAttribute

Syntax

property Size: word;

Remarks

Read Size to learn the size of an attribute value in external representation.

For example:

dtDate | 8 (sizeof(TDateTime)
dtFloat | 8 (sizeof(Double))
dtInteger | 4 (sizeof(Integer))

See Also

  • DataSize


TBlob Class

TBlob Class

Holds large object value for field and parameter dtBlob, dtMemo data types.

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

Unit

MemData

Syntax

TBlob = class(TSharedObject);

Remarks

Object TBlob holds large object value for the field and parameter dtBlob, dtMemo, dtWideMemo data types.

Inheritance Hierarchy

TObject
TSharedObject
TBlob

See Also

  • TBlob in Delphi Help
  • TMemDataSet.GetBlob


TBlob Members

TBlob Members

TBlob class overview.

Properties

Name | Description
AsString | Used to manipulate BLOB value as string.
AsWideString | Used to manipulate BLOB value as Unicode string.
IsUnicode | Gives choice of making TBlob store and process data in Unicode format or not.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size | Used to learn the size of the TBlob value in bytes.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
Assign | Sets BLOB value from another TBlob object.
Clear | Deletes the current value in TBlob object.
LoadFromFile | Loads the contents of a file into a TBlob object.
LoadFromStream | Copies the contents of a stream into the TBlob object.
Read | Acquires a raw sequence of bytes from the data stored in TBlob.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile | Saves the contents of the TBlob object to a file.
SaveToStream | Copies the contents of a TBlob object to a stream.
Truncate | Sets new TBlob size and discards all data over it.
Write | Stores a raw sequence of bytes into a TBlob object.


TBlob Properties

TBlob Properties

Properties of the TBlob class.

For a complete list of the TBlob class members, see the TBlob Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AsString | Used to manipulate BLOB value as string.
AsWideString | Used to manipulate BLOB value as Unicode string.
IsUnicode | Gives choice of making TBlob store and process data in Unicode format or not.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
Size | Used to learn the size of the TBlob value in bytes.

See Also

  • TBlob Class
  • TBlob Class Members


TBlob.AsString Property

TBlob.AsString Property

Used to manipulate BLOB value as string.

Class

TBlob

Syntax

property AsString: string;

Remarks

Use the AsString property to manipulate BLOB value as string.

See Also

  • Assign
  • AsWideString


TBlob.AsWideString Property

TBlob.AsWideString Property

Used to manipulate BLOB value as Unicode string.

Class

TBlob

Syntax

property AsWideString: string;

Remarks

Use the AsWideString property to manipulate BLOB value as Unicode string.

See Also

  • Assign
  • AsString


TBlob.IsUnicode Property

TBlob.IsUnicode Property

Gives choice of making TBlob store and process data in Unicode format or not.

Class

TBlob

Syntax

property IsUnicode: boolean;

Remarks

Set IsUnicode to True if you want TBlob to store and process data in Unicode format.

Note: changing this property raises an exception if TBlob is not empty.


TBlob.Size Property

TBlob.Size Property

Used to learn the size of the TBlob value in bytes.

Class

TBlob

Syntax

property Size: cardinal;

Remarks

Use the Size property to find out the size of the TBlob value in bytes.


TBlob Methods

TBlob Methods

Methods of the TBlob class.

For a complete list of the TBlob class members, see the TBlob Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
Assign | Sets BLOB value from another TBlob object.
Clear | Deletes the current value in TBlob object.
LoadFromFile | Loads the contents of a file into a TBlob object.
LoadFromStream | Copies the contents of a stream into the TBlob object.
Read | Acquires a raw sequence of bytes from the data stored in TBlob.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile | Saves the contents of the TBlob object to a file.
SaveToStream | Copies the contents of a TBlob object to a stream.
Truncate | Sets new TBlob size and discards all data over it.
Write | Stores a raw sequence of bytes into a TBlob object.

See Also

  • TBlob Class
  • TBlob Class Members


TBlob.Assign Method

TBlob.Assign Method

Sets BLOB value from another TBlob object.

Class

TBlob

Syntax

procedure Assign(Source: TBlob);

Parameters
Source
Holds the BLOB from which the value to the current object will be assigned.

Remarks

Call the Assign method to set BLOB value from another TBlob object.

See Also

  • LoadFromStream
  • AsString
  • AsWideString


TBlob.Clear Method

TBlob.Clear Method

Deletes the current value in TBlob object.

Class

TBlob

Syntax

procedure Clear; virtual;

Remarks

Call the Clear method to delete the current value in TBlob object.


TBlob.LoadFromFile Method

TBlob.LoadFromFile Method

Loads the contents of a file into a TBlob object.

Class

TBlob

Syntax

procedure LoadFromFile(const FileName: string);

Parameters
FileName
Holds the name of the file from which the TBlob value is loaded.

Remarks

Call the LoadFromFile method to load the contents of a file into a TBlob object. Specify the name of the file to load into the field as the value of the FileName parameter.

See Also

  • SaveToFile


TBlob.LoadFromStream Method

TBlob.LoadFromStream Method

Copies the contents of a stream into the TBlob object.

Class

TBlob

Syntax

procedure LoadFromStream(Stream: TStream); virtual;

Parameters
Stream
Holds the specified stream from which the field's value is copied.

Remarks

Call the LoadFromStream method to copy the contents of a stream into the TBlob object. Specify the stream from which the field's value is copied as the value of the Stream parameter.

See Also

  • SaveToStream


TBlob.Read Method

TBlob.Read Method

Acquires a raw sequence of bytes from the data stored in TBlob.

Class

TBlob

Syntax

function Read(Position: cardinal; Count: cardinal; Dest: IntPtr): cardinal; virtual;

Parameters
Position
Holds the starting point of the byte sequence.
Count
Holds the size of the sequence in bytes.
Dest
Holds a pointer to the memory area where to store the sequence.
Return Value
Actually read byte count if the sequence crosses object size limit.

Remarks

Call the Read method to acquire a raw sequence of bytes from the data stored in TBlob.

The Position parameter is the starting point of byte sequence which lasts Count number of bytes. The Dest parameter is a pointer to the memory area where to store the sequence.

If the sequence crosses object size limit, function will return actually read byte count.

See Also

  • Write


TBlob.SaveToFile Method

TBlob.SaveToFile Method

Saves the contents of the TBlob object to a file.

Class

TBlob

Syntax

procedure SaveToFile(const FileName: string);

Parameters
FileName
Holds a string that contains the name of the file.

Remarks

Call the SaveToFile method to save the contents of the TBlob object to a file. Specify the name of the file as the value of the FileName parameter.

See Also

  • LoadFromFile


TBlob.SaveToStream Method

TBlob.SaveToStream Method

Copies the contents of a TBlob object to a stream.

Class

TBlob

Syntax

procedure SaveToStream(Stream: TStream); virtual;

Parameters
Stream
Holds the name of the stream.

Remarks

Call the SaveToStream method to copy the contents of a TBlob object to a stream. Specify the name of the stream to which the field's value is saved as the value of the Stream parameter.

See Also

  • LoadFromStream


TBlob.Truncate Method

TBlob.Truncate Method

Sets new TBlob size and discards all data over it.

Class

TBlob

Syntax

procedure Truncate(NewSize: cardinal); virtual;

Parameters
NewSize
Holds the new size of TBlob.

Remarks

Call the Truncate method to set new TBlob size and discard all data over it. If NewSize is greater or equal TBlob.Size, it does nothing.


TBlob.Write Method

TBlob.Write Method

Stores a raw sequence of bytes into a TBlob object.

Class

TBlob

Syntax

procedure Write(Position: cardinal; Count: cardinal; Source: IntPtr); virtual;

Parameters
Position
Holds the starting point of the byte sequence.
Count
Holds the size of the sequence in bytes.
Source
Holds a pointer to a source memory area.

Remarks

Call the Write method to store a raw sequence of bytes into a TBlob object.

The Position parameter is the starting point of byte sequence which lasts Count number of bytes. The Source parameter is a pointer to a source memory area.

If the value of the Position parameter crosses current size limit of TBlob object, source data will be appended to the object data.

See Also

  • Read


TCompressedBlob Class

TCompressedBlob Class

Holds large object value for field and parameter dtBlob, dtMemo data types and can compress its data.

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

Unit

MemData

Syntax

TCompressedBlob = class(TBlob);

Remarks

TCompressedBlob is a descendant of the TBlob class. It holds large object value for field and parameter dtBlob, dtMemo data types and can compress its data. For more information about using BLOB compression see TCustomDADataSet.Options.

Note: Internal compression functions are available in CodeGear Delphi 2007 for Win32, Borland Developer Studio 2006, Borland Delphi 2005, Borland Delphi 8 (for .NET) and Borland Delphi 7. To use BLOB compression under Borland Delphi 6, Borland Delphi 5 and Borland C++ Builder you should use your own compression functions. To use them set the CompressProc and UncompressProc variables declared in the MemUtils unit.

Example

type
   TCompressProc = function(dest: IntPtr; destLen: IntPtr; const source: IntPtr; sourceLen: longint): longint;
   TUncompressProc = function(dest: IntPtr; destlen: IntPtr; source: IntPtr; sourceLne: longint): longint;

var
   CompressProc: TCompressProc;
   UncompressProc: TUncompressProc;

Inheritance Hierarchy

TObject
TSharedObject
TBlob
TCompressedBlob

See Also

  • TBlob
  • TMemDataSet.GetBlob
  • TCustomDADataSet.Options


TCompressedBlob Members

TCompressedBlob Members

TCompressedBlob class overview.

Properties

Name | Description
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.


TDBObject Class

TDBObject Class

A base class for classes that work with user-defined data types that have attributes.

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

Unit

MemData

Syntax

TDBObject = class(TSharedObject);

Remarks

TDBObject is a base class for classes that work with user-defined data types that have attributes.

Inheritance Hierarchy

TObject
TSharedObject
TDBObject


TDBObject Members

TDBObject Members

TDBObject class overview.

Properties

Name | Description
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.


TObjectType Class

TObjectType Class

Holds description object type and its attributes.

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

Unit

MemData

Syntax

TObjectType = class(TSharedObject);

Remarks

TObjectType holds description object type and its attributes. TObjectType is an ancestor for TOraType.

Inheritance Hierarchy

TObject
TSharedObject
TObjectType

See Also

  • TOraType


TObjectType Members

TObjectType Members

TObjectType class overview.

Properties

Name | Description
AttributeCount | Used to indicate the number of attributes of type.
Attributes | Used to access separate attributes.
DataType | Used to indicate the type of object dtObject, dtArray or dtTable.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size | Used to learn the size of an object instance.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttributeByName | Retrieves attribute information for an attribute when only the attribute's name is known.
FindAttribute | Indicates whether a specified Attribute component is referenced in the TAttributes object.
Release (inherited from TSharedObject) | Decrements the reference count.


TObjectType Properties

TObjectType Properties

Properties of the TObjectType class.

For a complete list of the TObjectType class members, see the TObjectType Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttributeCount | Used to indicate the number of attributes of type.
Attributes | Used to access separate attributes.
DataType | Used to indicate the type of object dtObject, dtArray or dtTable.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
Size | Used to learn the size of an object instance.

See Also

  • TObjectType Class
  • TObjectType Class Members


TObjectType.AttributeCount Property

TObjectType.AttributeCount Property

Used to indicate the number of attributes of type.

Class

TObjectType

Syntax

property AttributeCount: integer;

Remarks

Use the AttributeCount property to determine the number of attributes of type.


TObjectType.Attributes Property(Indexer)

TObjectType.Attributes Property(Indexer)

Used to access separate attributes.

Class

TObjectType

Syntax

property Attributes[Index: integer]: TAttribute;

Parameters
Index
Holds the attribute's ordinal position.

Remarks

Use the Attributes property to access individual attributes. The value of the Index parameter corresponds to the AttributeNo property of TAttribute.

See Also

  • TAttribute
  • FindAttribute


TObjectType.DataType Property

TObjectType.DataType Property

Used to indicate the type of object dtObject, dtArray or dtTable.

Class

TObjectType

Syntax

property DataType: word;

Remarks

Use the DataType property to determine the type of object dtObject, dtArray or dtTable.

See Also

  • MemData
  • OraClasses


TObjectType.Size Property

TObjectType.Size Property

Used to learn the size of an object instance.

Class

TObjectType

Syntax

property Size: integer;

Remarks

Use the Size property to find out the size of an object instance. Size is a sum of all attribute sizes.

See Also

  • TAttribute.Size


TObjectType Methods

TObjectType Methods

Methods of the TObjectType class.

For a complete list of the TObjectType class members, see the TObjectType Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttributeByName | Retrieves attribute information for an attribute when only the attribute's name is known.
FindAttribute | Indicates whether a specified Attribute component is referenced in the TAttributes object.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TObjectType Class
  • TObjectType Class Members


TObjectType.AttributeByName Method

TObjectType.AttributeByName Method

Retrieves attribute information for an attribute when only the attribute's name is known.

Class

TObjectType

Syntax

function AttributeByName(Name: string): TAttribute;

Parameters
Name
Holds the name of an existing attribute.
Return Value
a TAttibute object for the specified attribute. Otherwise an exception is raised.

Remarks

Call the AttributeByName method to retrieve attribute information for an attribute when only the attribute's name is known. Name is the name of an existing Attribute. AttributeByName returns a TAttibute object for the specified attribute. If the attribute can not be found, an exception is raised.

See Also

  • TAttribute
  • FindAttribute
  • Attributes


TObjectType.FindAttribute Method

TObjectType.FindAttribute Method

Indicates whether a specified Attribute component is referenced in the TAttributes object.

Class

TObjectType

Syntax

function FindAttribute(Name: string): TAttribute;

Parameters
Name
Holds the name of the attribute to search for.
Return Value
TAttribute, if an attribute with a matching name was found. Nil Otherwise.

Remarks

Call FindAttribute to determine if a specified Attribute component is referenced in the TAttributes object. Name is the name of the Attribute for which to search. If FindAttribute finds an Attribute with a matching name, it returns the TAttribute. Otherwise it returns nil.

See Also

  • TAttribute
  • AttributeByName
  • Attributes


TSharedObject Class

TSharedObject Class

A base class that allows to simplify memory management for object referenced by several other objects.

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

Unit

MemData

Syntax

TSharedObject = class(System.TObject);

Remarks

TSharedObject allows to simplify memory management for object referenced by several other objects. TSharedObject holds a count of references to itself. When any object (referer object) is going to use TSharedObject, it calls the TSharedObject.AddRef method. Referer object has to call the TSharedObject.Release method after using TSharedObject.

Inheritance Hierarchy

TObject
TSharedObject

See Also

  • TBlob
  • TObjectType


TSharedObject Members

TSharedObject Members

TSharedObject class overview.

Properties

Name | Description
RefCount | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef | Increments the reference count for the number of references dependent on the TSharedObject object.
Release | Decrements the reference count.


TSharedObject Properties

TSharedObject Properties

Properties of the TSharedObject class.

For a complete list of the TSharedObject class members, see the TSharedObject Members topic.

Public

Name | Description
RefCount | Used to return the count of reference to a TSharedObject object.

See Also

  • TSharedObject Class
  • TSharedObject Class Members


TSharedObject.RefCount Property

TSharedObject.RefCount Property

Used to return the count of reference to a TSharedObject object.

Class

TSharedObject

Syntax

property RefCount: integer;

Remarks

Returns the count of reference to a TSharedObject object.


TSharedObject Methods

TSharedObject Methods

Methods of the TSharedObject class.

For a complete list of the TSharedObject class members, see the TSharedObject Members topic.

Public

Name | Description
AddRef | Increments the reference count for the number of references dependent on the TSharedObject object.
Release | Decrements the reference count.

See Also

  • TSharedObject Class
  • TSharedObject Class Members


TSharedObject.AddRef Method

TSharedObject.AddRef Method

Increments the reference count for the number of references dependent on the TSharedObject object.

Class

TSharedObject

Syntax

procedure AddRef;

Remarks

Increments the reference count for the number of references dependent on the TSharedObject object.

See Also

  • Release


TSharedObject.Release Method

TSharedObject.Release Method

Decrements the reference count.

Class

TSharedObject

Syntax

procedure Release;

Remarks

Call the Release method to decrement the reference count. When RefCount is 1, TSharedObject is deleted from memory.

See Also

  • AddRef


Types in MemData

Types in MemData

Types in the MemData unit.

Types

Name | Description
TLocateExOptions | Represents the set of TLocateExOption.


TLocateExOptions Set

TLocateExOptions Set

Represents the set of TLocateExOption.

Unit

MemData

Syntax

TLocateExOptions = set of TLocateExOption;


Enumerations in MemData

Enumerations in MemData

Enumerations in the MemData unit.

Enumerations

Name | Description
TConnLostCause | Specifies the cause of the connection loss.
TDANumericType | Specifies the format of storing and representing of the NUMERIC (DECIMAL) fields.
TLocateExOption | Allows to set additional search parameters which will be used by the LocateEx method.
TSortType | Specifies a sort type for string fields.
TUpdateRecKind | Specifies the type of records modification.


TConnLostCause Enumeration

TConnLostCause Enumeration

Specifies the cause of the connection loss.

Unit

MemData

Syntax

TConnLostCause = (clUnknown, clExecute, clOpen, clRefresh, clApply, clServiceQuery, clTransStart, clConnectionApply, clConnect);

Values

Value | Meaning
clApply | Connection loss detected during DataSet.ApplyUpdates (Reconnect/Reexecute possible).
clConnect | Connection loss detected during connection establishing (Reconnect possible).
clConnectionApply | Connection loss detected during Connection.ApplyUpdates (Reconnect/Reexecute possible).
clExecute | Connection loss detected during SQL execution (Reconnect with exception is possible).
clOpen | Connection loss detected during execution of a SELECT statement (Reconnect with exception possible).
clRefresh | Connection loss detected during query opening (Reconnect/Reexecute possible).
clServiceQuery | Connection loss detected during service information request (Reconnect/Reexecute possible).
clTransStart | Connection loss detected during transaction start (Reconnect/Reexecute possible). clTransStart has less priority then clConnectionApply.
clUnknown | The connection loss reason is unknown.


TDANumericType Enumeration

TDANumericType Enumeration

Specifies the format of storing and representing of the NUMERIC (DECIMAL) fields.

Unit

MemData

Syntax

TDANumericType = (ntFloat, ntBCD, ntFmtBCD);

Values

Value | Meaning
ntBCD | Data is stored on the client side as currency and represented as TBCDField. This format allows storing data with precision up to 0,0001.
ntFloat | Data stored on the client side is in double format and represented as TFloatField. The default value.
ntFmtBCD | Data is represented as TFMTBCDField. TFMTBCDField gives greater precision and accuracy than TBCDField, but it is slower. Not supported for Delphi 5 and C++Builder 5.


TLocateExOption Enumeration

TLocateExOption Enumeration

Allows to set additional search parameters which will be used by the LocateEx method.

Unit

MemData

Syntax

TLocateExOption = (lxCaseInsensitive, lxPartialKey, lxNearest, lxNext, lxUp, lxPartialCompare);

Values

Value | Meaning
lxCaseInsensitive | Similar to loCaseInsensitive. Key fields and key values are matched without regard to the case.
lxNearest | LocateEx moves the cursor to a specific record in a dataset or to the first record in the dataset that is greater than the values specified in the KeyValues parameter. For this option to work correctly dataset should be sorted by the fields the search is performed in. If dataset is not sorted, the function may return a line that is not connected with the search condition.
lxNext | LocateEx searches from the current record.
lxPartialCompare | Similar to lxPartialKey, but the difference is that it can process value entries in any position. For example, 'HAM' would match both 'HAMM', 'HAMMER.', and also 'MR HAMMER'.
lxPartialKey | Similar to loPartialKey. Key values can include only a part of the matching key field value. For example, 'HAM' would match both 'HAMM' and 'HAMMER.', but not 'MR HAMMER'.
lxUp | LocateEx searches from the current record to the first record.


TSortType Enumeration

TSortType Enumeration

Specifies a sort type for string fields.

Unit

MemData

Syntax

TSortType = (stCaseSensitive, stCaseInsensitive, stBinary);

Values

Value | Meaning
stBinary | Sorting by character ordinal values (this comparison is also case sensitive).
stCaseInsensitive | Sorting without case sensitivity.
stCaseSensitive | Sorting with case sensitivity.


TUpdateRecKind Enumeration

TUpdateRecKind Enumeration

Specifies the type of records modification.

Unit

MemData

Syntax

TUpdateRecKind = (ukUpdate, ukInsert, ukDelete);

Values

Value | Meaning
ukDelete | Bind and execute a SQL statement in the DeleteSQL property.
ukInsert | Bind and execute a SQL statement in the InsertSQL property.
ukUpdate | Bind and execute a SQL statement in the ModifySQL property.


MemDS Unit Members

MemDS Unit Members

This unit contains implementation of the TMemDataSet class.

Classes

Name | Description
TMemDataSet | A base class for working with data and manipulating data in memory.

Variables

Name | Description
DoNotRaiseExcetionOnUaFail | An exception will be raised if the value of the UpdateAction parameter is uaFail.
SendDataSetChangeEventAfterOpen | The DataSetChange event is sent after a dataset gets open. It was necessary to fix a problem with disappeared vertical scrollbar in some types of DB-aware grids.


Classes in MemDS

Classes in MemDS

Classes in the MemDS unit.

Classes

Name | Description
TMemDataSet | A base class for working with data and manipulating data in memory.


TMemDataSet Class

TMemDataSet Class

A base class for working with data and manipulating data in memory.

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

Unit

MemDS

Syntax

TMemDataSet = class(TDataSet);

Remarks

TMemDataSet derives from the TDataSet database-engine independent set of properties, events, and methods for working with data and introduces additional techniques to store and manipulate data in memory.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet


TMemDataSet Members

TMemDataSet Members

TMemDataSet class overview.

Properties

Name | Description
CachedUpdates | Used to enable or disable the use of cached updates for a dataset.
IndexFieldNames | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate | Used to prevent implicit update of rows on database server.
Prepared | Determines whether a query is prepared for execution or not.
UpdateRecordTypes | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending | Used to check the status of the cached updates buffer.

Methods

Name | Description
ApplyUpdates | Writes dataset's pending cached updates to a database.
CancelUpdates | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates | Clears the cached updates buffer.
DeferredPost | Makes permanent changes to the database server.
GetBlob | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
Locate | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Prepare | Allocates resources and creates field components for a dataset.
RestoreUpdates | Marks all records in the cache of updates as unapplied.
RevertRecord | Cancels changes made to the current record when cached updates are enabled.
SaveToXML | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
OnUpdateError | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord | Occurs when a single update component can not handle the updates.


TMemDataSet Properties

TMemDataSet Properties

Properties of the TMemDataSet class.

For a complete list of the TMemDataSet class members, see the TMemDataSet Members topic.

Public

Name | Description
CachedUpdates | Used to enable or disable the use of cached updates for a dataset.
IndexFieldNames | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate | Used to prevent implicit update of rows on database server.
Prepared | Determines whether a query is prepared for execution or not.
UpdateRecordTypes | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending | Used to check the status of the cached updates buffer.

See Also

  • TMemDataSet Class
  • TMemDataSet Class Members


TMemDataSet.CachedUpdates Property

TMemDataSet.CachedUpdates Property

Used to enable or disable the use of cached updates for a dataset.

Class

TMemDataSet

Syntax

property CachedUpdates: boolean default False;

Remarks

Use the CachedUpdates property to enable or disable the use of cached updates for a dataset. Setting CachedUpdates to True enables updates to a dataset (such as posting changes, inserting new records, or deleting records) to be stored in an internal cache on the client side instead of being written directly to the dataset's underlying database tables. When changes are completed, an application writes all cached changes to the database in the context of a single transaction.

Cached updates are especially useful for client applications working with remote database servers. Enabling cached updates brings up the following benefits:

  • Fewer transactions and shorter transaction times.
  • Minimized network traffic.

The potential drawbacks of enabling cached updates are:

  • Other applications can access and change the actual data on the server while users are editing local copies of data, resulting in an update conflict when cached updates are applied to the database.
  • Other applications cannot access data changes made by an application until its cached updates are applied to the database.

The default value is False.

Note: When establishing master/detail relationship the CachedUpdates property of detail dataset works properly only when TCustomDADataSet.Options is set to True.

See Also

  • UpdatesPending
  • ApplyUpdates
  • RestoreUpdates
  • CommitUpdates
  • CancelUpdates
  • UpdateStatus
  • TCustomDADataSet.Options


TMemDataSet.IndexFieldNames Property

TMemDataSet.IndexFieldNames Property

Used to get or set the list of fields on which the recordset is sorted.

Class

TMemDataSet

Syntax

property IndexFieldNames: string;

Remarks

Use the IndexFieldNames property to get or set the list of fields on which the recordset is sorted. Specify the name of each column in IndexFieldNames to use as an index for a table. Ordering of column names is significant. Separate names with semicolon. The specified columns don't need to be indexed. Set IndexFieldNames to an empty string to reset the recordset to the sort order originally used when the recordset's data was first retrieved.

Each field may optionally be followed by the keyword ASC / DESC or CIS / CS / BIN.

Use ASC, DESC keywords to specify a sort direction for the field. If one of these keywords is not used, the default sort direction for the field is ascending.

Use CIS, CS or BIN keywords to specify a sort type for string fields:

CIS - compare without case sensitivity;

CS - compare with case sensitivity;

BIN - compare by character ordinal values (this comparison is also case sensitive).

If a dataset uses a TCustomDAConnection component, the default value of sort type depends on the TCustomDAConnection.Options option of the connection. If a dataset does not use a connection (TVirtualTable dataset), the default is CS.

Read IndexFieldNames to determine the field (or fields) on which the recordset is sorted.

Ordering is processed locally.

Note: You cannot process ordering by BLOB fields.

Example

The following procedure illustrates how to set IndexFieldNames in response to a button click:

DataSet1.IndexFieldNames := 'LastName ASC CIS; DateDue DESC';


TMemDataSet.LocalConstraints Property

TMemDataSet.LocalConstraints Property

Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.

Class

TMemDataSet

Syntax

property LocalConstraints: boolean default True;

Remarks

Use the LocalConstraints property to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet. When LocalConstrains is True, TMemDataSet ignores NOT NULL server constraints. It is useful for tables that have fields updated by triggers.

LocalConstraints is obsolete, and is only included for backward compatibility.

The default value is True.


TMemDataSet.LocalUpdate Property

TMemDataSet.LocalUpdate Property

Used to prevent implicit update of rows on database server.

Class

TMemDataSet

Syntax

property LocalUpdate: boolean default False;

Remarks

Set the LocalUpdate property to True to prevent implicit update of rows on database server. Data changes are cached locally in client memory.


TMemDataSet.Prepared Property

TMemDataSet.Prepared Property

Determines whether a query is prepared for execution or not.

Class

TMemDataSet

Syntax

property Prepared: boolean;

Remarks

Check the Prepared property to determine if a query is already prepared for execution. Prepared is True if the query has already been prepared. While queries don't need to be prepared before execution, performance is often boosted if queries are prepared beforehand, particularly if there are parameterized queries that are executed more than once using the same parameter values.

See Also

  • Prepare


TMemDataSet.UpdateRecordTypes Property

TMemDataSet.UpdateRecordTypes Property

Used to indicate the update status for the current record when cached updates are enabled.

Class

TMemDataSet

Syntax

property UpdateRecordTypes: TUpdateRecordTypes default [rtModified, rtInserted, rtUnmodified];

Remarks

Use the UpdateRecordTypes property to determine the update status for the current record when cached updates are enabled. Update status can change frequently as records are edited, inserted, or deleted. UpdateRecordTypes offers a convenient method for applications to assess the current status before undertaking or completing operations that depend on the update status of records.

See Also

  • CachedUpdates


TMemDataSet.UpdatesPending Property

TMemDataSet.UpdatesPending Property

Used to check the status of the cached updates buffer.

Class

TMemDataSet

Syntax

property UpdatesPending: boolean;

Remarks

Use the UpdatesPending property to check the status of the cached updates buffer. If UpdatesPending is True, then there are edited, deleted, or inserted records remaining in local cache and not yet applied to the database. If UpdatesPending is False, there are no such records in the cache.

See Also

  • CachedUpdates


TMemDataSet Methods

TMemDataSet Methods

Methods of the TMemDataSet class.

For a complete list of the TMemDataSet class members, see the TMemDataSet Members topic.

Public

Name | Description
ApplyUpdates | Writes dataset's pending cached updates to a database.
CancelUpdates | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates | Clears the cached updates buffer.
DeferredPost | Makes permanent changes to the database server.
GetBlob | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
Locate | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Prepare | Allocates resources and creates field components for a dataset.
RestoreUpdates | Marks all records in the cache of updates as unapplied.
RevertRecord | Cancels changes made to the current record when cached updates are enabled.
SaveToXML | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TMemDataSet Class
  • TMemDataSet Class Members


TMemDataSet.ApplyUpdates Method

TMemDataSet.ApplyUpdates Method

Writes dataset's pending cached updates to a database.

Class

TMemDataSet

Syntax

procedure ApplyUpdates; virtual;

Remarks

Call the ApplyUpdates method to write a dataset's pending cached updates to a database. This method passes cached data to the database, but the changes are not committed to the database if there is an active transaction. An application must explicitly call the database component's Commit method to commit the changes to the database if the write is successful, or call the database's Rollback method to undo the changes if there is an error.

Following a successful write to the database, and following a successful call to a connection's Commit method, an application should call the CommitUpdates method to clear the cached update buffer.

Note: The preferred method for updating datasets is to call a connection component's ApplyUpdates method rather than to call each individual dataset's ApplyUpdates method. The connection component's ApplyUpdates method takes care of committing and rolling back transactions and clearing the cache when the operation is successful.

Example

The following procedure illustrates how to apply a dataset's cached updates to a database in response to a button click:

procedure ApplyButtonClick(Sender: TObject);
begin
   with MyQuery do
   begin
      Session.StartTransaction;
      try
         ... {Modify data}
         ApplyUpdates; {try to write the updates to the database}
         Session.Commit; {on success, commit the changes}
      except
         RestoreUpdates; {restore update result for applied records}
         Session.Rollback; {on failure, undo the changes}
         raise; {raise the exception to prevent a call to CommitUpdates!}
      end;
      CommitUpdates; {on success, clear the cache}
   end;
end;

See Also

  • CachedUpdates
  • CancelUpdates
  • CommitUpdates
  • UpdateStatus


TMemDataSet.CancelUpdates Method

TMemDataSet.CancelUpdates Method

Clears all pending cached updates from cache and restores dataset in its prior state.

Class

TMemDataSet

Syntax

procedure CancelUpdates;

Remarks

Call the CancelUpdates method to clear all pending cached updates from cache and restore dataset in its prior state.

It restores the dataset to the state it was in when the table was opened, cached updates were last enabled, or updates were last successfully applied to the database.

When a dataset is closed, or the CachedUpdates property is set to False, CancelUpdates is called automatically.

See Also

  • CachedUpdates
  • ApplyUpdates
  • UpdateStatus


TMemDataSet.CommitUpdates Method

TMemDataSet.CommitUpdates Method

Clears the cached updates buffer.

Class

TMemDataSet

Syntax

procedure CommitUpdates;

Remarks

Call the CommitUpdates method to clear the cached updates buffer after both a successful call to ApplyUpdates and a database component's Commit method. Clearing the cache after applying updates ensures that the cache is empty except for records that could not be processed and were skipped by the OnUpdateRecord or OnUpdateError event handlers. An application can attempt to modify the records still in cache.

CommitUpdates also checks wether there are pending updates in dataset. And if there are, it calls ApplyUpdates.

Record modifications made after a call to CommitUpdates repopulate the cached update buffer and require a subsequent call to ApplyUpdates to move them to the database.

See Also

  • CachedUpdates
  • ApplyUpdates
  • UpdateStatus


TMemDataSet.DeferredPost Method

TMemDataSet.DeferredPost Method

Makes permanent changes to the database server.

Class

TMemDataSet

Syntax

procedure DeferredPost;

Remarks

Call DeferredPost to make permanent changes to the database server while retaining dataset in its state whether it is dsEdit or dsInsert.

Explicit call to the Cancel method after DeferredPost has been applied does not abandon modifications to a dataset already fixed in database.


TMemDataSet.GetBlob Overload

TMemDataSet.GetBlob Overload

Retrieves TBlob object for a field or current record when only its name or the field itself is known.

Class

TMemDataSet

Overload List

Name | Description
GetBlob(Field: TField) | Retrieves TBlob object for a field or current record when the field itself is known.
GetBlob(const FieldName: string) | Retrieves TBlob object for a field or current record when its name is known.


TMemDataSet.GetBlob Method

TMemDataSet.GetBlob Method

Retrieves TBlob object for a field or current record when the field itself is known.

Class

TMemDataSet

Syntax

function GetBlob(Field: TField): TBlob; overload

Parameters
Field
Holds an existing TField object.
Return Value
TBlob object that was retrieved.

Remarks

Call the GetBlob method to retrieve TBlob object for a field or current record when only its name or the field itself is known. FieldName is the name of an existing field. The field should have MEMO or BLOB type.


TMemDataSet.GetBlob Method

TMemDataSet.GetBlob Method

Retrieves TBlob object for a field or current record when its name is known.

Class

TMemDataSet

Syntax

function GetBlob(const FieldName: string): TBlob; overload

Parameters
FieldName
Holds the name of an existing field.
Return Value
TBlob object that was retrieved.

Example

OraQuery1.GetBlob('Comment').SaveToFile('Comment.txt');

See Also

  • TBlob


TMemDataSet.Locate Overload

TMemDataSet.Locate Overload

Searches a dataset for a specific record and positions the cursor on it.

Class

TMemDataSet

Overload List

Name | Description
Locate(const KeyFields: array of TField; const KeyValues: variant; Options: TLocateOptions) | Searches a dataset by the specified fields for a specific record and positions cursor on it.
Locate(const KeyFields: string; const KeyValues: variant; Options: TLocateOptions) | Searches a dataset by the fields specified by name for a specific record and positions the cursor on it.


TMemDataSet.Locate Method

TMemDataSet.Locate Method

Searches a dataset by the specified fields for a specific record and positions cursor on it.

Class

TMemDataSet

Syntax

function Locate(const KeyFields: array of TField; const KeyValues: variant; Options: TLocateOptions): boolean; reintroduce; overload

Parameters
KeyFields
Holds TField objects in which to search.
KeyValues
Holds the variant that specifies the values to match in the key fields.
Options
Holds additional search latitude when searching in string fields.
Return Value
True if it finds a matching record, and makes this record the current one. Otherwise it returns False.


TMemDataSet.Locate Method

TMemDataSet.Locate Method

Searches a dataset by the fields specified by name for a specific record and positions the cursor on it.

Class

TMemDataSet

Syntax

function Locate(const KeyFields: string; const KeyValues: variant; Options: TLocateOptions): boolean; overload; override

Parameters
KeyFields
Holds a semicolon-delimited list of field names in which to search.
KeyValues
Holds the variant that specifies the values to match in the key fields.
Options
Holds additional search latitude when searching in string fields.
Return Value
True if it finds a matching record, and makes this record the current one. Otherwise it returns False.

Remarks

Call the Locate method to search a dataset for a specific record and position cursor on it.

KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a variant that specifies the values to match in the key fields. If KeyFields lists a single field, KeyValues specifies the value for that field on the desired record. To specify multiple search values, pass a variant array as KeyValues, or construct a variant array on the fly using the VarArrayOf routine. An example is provided below.

Options is a set that optionally specifies additional search latitude when searching in string fields. If Options contains the loCaseInsensitive setting, then Locate ignores case when matching fields. If Options contains the loPartialKey setting, then Locate allows partial-string matching on strings in KeyValues. If Options is an empty set, or if KeyFields does not include any string fields, Options is ignored.

Locate returns True if it finds a matching record, and makes this record the current one. Otherwise it returns False.

The Locate function works faster when dataset is locally sorted on the KeyFields fields. Local dataset sorting can be set with the TMemDataSet.IndexFieldNames property.

Example

An example of specifying multiple search values:

with CustTable do
   Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P',
      '408-431-1000']), [loPartialKey]);

See Also

  • TMemDataSet.IndexFieldNames
  • TMemDataSet.LocateEx


TMemDataSet.LocateEx Overload

TMemDataSet.LocateEx Overload

Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.

Class

TMemDataSet

Overload List

Name | Description
LocateEx(const KeyFields: array of TField; const KeyValues: variant; Options: TLocateExOptions) | Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet by the specified fields.
LocateEx(const KeyFields: string; const KeyValues: variant; Options: TLocateExOptions) | Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet by the specified field names.


TMemDataSet.LocateEx Method

TMemDataSet.LocateEx Method

Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet by the specified fields.

Class

TMemDataSet

Syntax

function LocateEx(const KeyFields: array of TField; const KeyValues: variant; Options: TLocateExOptions): boolean; overload

Parameters
KeyFields
Holds TField objects to search in.
KeyValues
Holds the values of the fields to search for.
Options
Holds additional search parameters which will be used by the LocateEx method.
Return Value
True, if a matching record was found. Otherwise returns False.


TMemDataSet.LocateEx Method

TMemDataSet.LocateEx Method

Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet by the specified field names.

Class

TMemDataSet

Syntax

function LocateEx(const KeyFields: string; const KeyValues: variant; Options: TLocateExOptions): boolean; overload

Parameters
KeyFields
Holds the fields to search in.
KeyValues
Holds the values of the fields to search for.
Options
Holds additional search parameters which will be used by the LocateEx method.
Return Value
True, if a matching record was found. Otherwise returns False.

Remarks

Call the LocateEx method when you need some features not to be included to the TMemDataSet.Locate method of TDataSet.

LocateEx returns True if it finds a matching record, and makes that record the current one. Otherwise LocateEx returns False.

The LocateEx function works faster when dataset is locally sorted on the KeyFields fields. Local dataset sorting can be set with the TMemDataSet.IndexFieldNames property.

Note: Please add the MemData unit to the "uses" list to use the TLocalExOption enumeration.

See Also

  • TMemDataSet.IndexFieldNames
  • TMemDataSet.Locate


TMemDataSet.Prepare Method

TMemDataSet.Prepare Method

Allocates resources and creates field components for a dataset.

Class

TMemDataSet

Syntax

procedure Prepare; virtual;

Remarks

Call the Prepare method to allocate resources and create field components for a dataset. The Prepare method is called automatically by the Open method if dataset is not prepared. To learn whether dataset is prepared or not use the Prepared property.

The UnPrepare method unprepares a query.

Note: When you change the text of a query at runtime, the query is automatically closed and unprepared.

The Prepare method is called automatically by the Open method if dataset is not prepared.

See Also

  • Prepared
  • UnPrepare


TMemDataSet.RestoreUpdates Method

TMemDataSet.RestoreUpdates Method

Marks all records in the cache of updates as unapplied.

Class

TMemDataSet

Syntax

procedure RestoreUpdates;

Remarks

Call the RestoreUpdates method to return the cache of updates to its state before calling ApplyUpdates. RestoreUpdates marks all records in the cache of updates as unapplied. It is useful when ApplyUpdates fails.

See Also

  • CachedUpdates
  • ApplyUpdates
  • CancelUpdates
  • UpdateStatus


TMemDataSet.RevertRecord Method

TMemDataSet.RevertRecord Method

Cancels changes made to the current record when cached updates are enabled.

Class

TMemDataSet

Syntax

procedure RevertRecord;

Remarks

Call the RevertRecord method to undo changes made to the current record when cached updates are enabled.

See Also

  • CachedUpdates
  • CancelUpdates


TMemDataSet.SaveToXML Overload

TMemDataSet.SaveToXML Overload

Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.

Class

TMemDataSet

Overload List

Name | Description
SaveToXML(Destination: TStream) | Saves the current dataset data to a stream in the XML format compatible with ADO format.
SaveToXML(const FileName: string) | Saves the current dataset data to a file in the XML format compatible with ADO format.


TMemDataSet.SaveToXML Method

TMemDataSet.SaveToXML Method

Saves the current dataset data to a stream in the XML format compatible with ADO format.

Class

TMemDataSet

Syntax

procedure SaveToXML(Destination: TStream); overload

Parameters
Destination
Holds a TStream object.

Remarks

Call the SaveToXML method to save the current dataset data to a file or a stream in the XML format compatible with ADO format.

If the destination file already exists, it is overwritten. It remains open from the first call to SaveToXML until the dataset is closed. This file can be read by other applications while it is opened, but they cannot write to the file.

When saving data to a stream, a TStream object must be created and its position must be set in a preferable value.

See Also

  • TVirtualTable.LoadFromFile
  • TVirtualTable.LoadFromStream


TMemDataSet.SaveToXML Method

TMemDataSet.SaveToXML Method

Saves the current dataset data to a file in the XML format compatible with ADO format.

Class

TMemDataSet

Syntax

procedure SaveToXML(const FileName: string); overload

Parameters
FileName
Holds the name of a destination file.


TMemDataSet.UnPrepare Method

TMemDataSet.UnPrepare Method

Frees the resources allocated for a previously prepared query on the server and client sides.

Class

TMemDataSet

Syntax

procedure UnPrepare; virtual;

Remarks

Call the UnPrepare method to free the resources allocated for a previously prepared query on the server and client sides.

Note: When you change the text of a query at runtime, the query is automatically closed and unprepared.

See Also

  • Prepare


TMemDataSet.UpdateResult Method

TMemDataSet.UpdateResult Method

Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.

Class

TMemDataSet

Syntax

function UpdateResult: TUpdateAction;

Return Value
a value of the TUpdateAction enumeration.

Remarks

Call the UpdateResult method to read the status of the latest call to the ApplyUpdates method while cached updates are enabled. UpdateResult reflects updates made on the records that have been edited, inserted, or deleted.

UpdateResult works on the record by record basis and is applicable to the current record only.

See Also

  • CachedUpdates


TMemDataSet.UpdateStatus Method

TMemDataSet.UpdateStatus Method

Indicates the current update status for the dataset when cached updates are enabled.

Class

TMemDataSet

Syntax

function UpdateStatus: TUpdateStatus; override;

Return Value
a value of the TUpdateStatus enumeration.

Remarks

Call the UpdateStatus method to determine the current update status for the dataset when cached updates are enabled. Update status can change frequently as records are edited, inserted, or deleted. UpdateStatus offers a convenient method for applications to assess the current status before undertaking or completing operations that depend on the update status of the dataset.

See Also

  • CachedUpdates


TMemDataSet Events

TMemDataSet Events

Events of the TMemDataSet class.

For a complete list of the TMemDataSet class members, see the TMemDataSet Members topic.

Public

Name | Description
OnUpdateError | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord | Occurs when a single update component can not handle the updates.

See Also

  • TMemDataSet Class
  • TMemDataSet Class Members


TMemDataSet.OnUpdateError Event

TMemDataSet.OnUpdateError Event

Occurs when an exception is generated while cached updates are applied to a database.

Class

TMemDataSet

Syntax

property OnUpdateError: TUpdateErrorEvent;

Remarks

Write the OnUpdateError event handler to respond to exceptions generated when cached updates are applied to a database.

E is a pointer to an EDatabaseError object from which application can extract an error message and the actual cause of the error condition. The OnUpdateError handler can use this information to determine how to respond to the error condition.

UpdateKind describes the type of update that generated the error.

UpdateAction indicates the action to take when the OnUpdateError handler exits. On entry into the handler, UpdateAction is always set to uaFail. If OnUpdateError can handle or correct the error, set UpdateAction to uaRetry before exiting the error handler.

The error handler can use the TField.OldValue and TField.NewValue properties to evaluate error conditions and set TField.NewValue to a new value to reapply. In this case, set UpdateAction to uaRetry before exiting.

Note: If a call to ApplyUpdates raises an exception and ApplyUpdates is not called within the context of a try...except block, an error message is displayed. If the OnUpdateError handler cannot correct the error condition and leaves UpdateAction set to uaFail, the error message is displayed twice. To prevent redisplay, set UpdateAction to uaAbort in the error handler.

See Also

  • CachedUpdates


TMemDataSet.OnUpdateRecord Event

TMemDataSet.OnUpdateRecord Event

Occurs when a single update component can not handle the updates.

Class

TMemDataSet

Syntax

property OnUpdateRecord: TUpdateRecordEvent;

Remarks

Write the OnUpdateRecord event handler to process updates that cannot be handled by a single update component, such as implementation of cascading updates, insertions, or deletions. This handler is also useful for applications that require additional control over parameter substitution in update components.

UpdateKind describes the type of update to perform.

UpdateAction indicates the action taken by the OnUpdateRecord handler before it exits. On entry into the handler, UpdateAction is always set to uaFail. If OnUpdateRecord is successful, it should set UpdateAction to uaApplied before exiting.

See Also

  • CachedUpdates


Variables in MemDS

Variables in MemDS

Variables in the MemDS unit.

Variables

Name | Description
DoNotRaiseExcetionOnUaFail | An exception will be raised if the value of the UpdateAction parameter is uaFail.
SendDataSetChangeEventAfterOpen | The DataSetChange event is sent after a dataset gets open. It was necessary to fix a problem with disappeared vertical scrollbar in some types of DB-aware grids.


MemDS.DoNotRaiseExcetionOnUaFail Variable

MemDS.DoNotRaiseExcetionOnUaFail Variable

An exception will be raised if the value of the UpdateAction parameter is uaFail.

Unit

MemDS

Syntax

DoNotRaiseExcetionOnUaFail: boolean = False;

Remarks

Starting with ODAC 6.20.0.12, if the OnUpdateRecord event handler sets the UpdateAction parameter to uaFail, an exception is raised. The default value of UpdateAction is uaFail. So, the exception will be raised when the value of this parameter is left unchanged.

To restore the old behaviour, set DoNotRaiseExcetionOnUaFail to True.


MemDS.SendDataSetChangeEventAfterOpen Variable

MemDS.SendDataSetChangeEventAfterOpen Variable

The DataSetChange event is sent after a dataset gets open. It was necessary to fix a problem with disappeared vertical scrollbar in some types of DB-aware grids.

Unit

MemDS

Syntax

SendDataSetChangeEventAfterOpen: boolean = True;

Remarks

Starting with ODAC 6.20.0.11, the DataSetChange event is sent after a dataset gets open. It was necessary to fix a problem with disappeared vertical scrollbar in some types of DB-aware grids. This problem appears only under Windows XP when visual styles are enabled.

To disable sending this event, change the value of this variable to False.


OdacVcl Unit Members

OdacVcl Unit Members

This unit contains the visual constituent of ODAC.

Classes

Name | Description
TConnectDialog | A component providing a dialog box for a user to supply login information.


Classes in OdacVcl

Classes in OdacVcl

Classes in the OdacVcl unit.

Classes

Name | Description
TConnectDialog | A component providing a dialog box for a user to supply login information.


TConnectDialog Class

TConnectDialog Class

A component providing a dialog box for a user to supply login information.

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

Unit

OdacVcl

Syntax

TConnectDialog = class(TCustomConnectDialog);

Remarks

TConnectDialog component is a direct descendent of TCustomConnectDialog class. Use TConnectDialog to provide a dialog box for a user to supply username, password and server name. You may want to customize appearance of the dialog box using the properties of this class.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomConnectDialog
TConnectDialog

See Also

  • TCustomDAConnection.ConnectDialog


TConnectDialog Members

TConnectDialog Members

TConnectDialog class overview.

Properties

Name | Description
CancelButton (inherited from TCustomConnectDialog) | Used to specify the label for the Cancel button.
Caption (inherited from TCustomConnectDialog) | Used to set the caption of dialog box.
ConnectButton (inherited from TCustomConnectDialog) | Used to specify the label for the Connect button.
DialogClass (inherited from TCustomConnectDialog) | Used to specify the class of the form that will be displayed to enter login information.
LabelSet (inherited from TCustomConnectDialog) | Used to set the language of buttons and labels captions.
PasswordLabel (inherited from TCustomConnectDialog) | Used to specify a prompt for password edit.
ReadAliases | Used to specify where the TConnectDialog object should acquire the names of database instances.
Retries (inherited from TCustomConnectDialog) | Used to indicate the number of retries of failed connections.
SavePassword (inherited from TCustomConnectDialog) | Used for the password to be displayed in ConnectDialog in asterisks.
ServerLabel (inherited from TCustomConnectDialog) | Used to specify a prompt for the server name edit.
Session | Shows what TOraSession component uses TConnectDialog object.
StoreLogInfo (inherited from TCustomConnectDialog) | Used to specify whether the login information should be kept in system registry after a connection was established.
UsernameLabel (inherited from TCustomConnectDialog) | Used to specify a prompt for username edit.

Methods

Name | Description
Execute (inherited from TCustomConnectDialog) | Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button.
GetServerList (inherited from TCustomConnectDialog) | Retrieves a list of available server names.


TConnectDialog Properties

TConnectDialog Properties

Properties of the TConnectDialog class.

For a complete list of the TConnectDialog class members, see the TConnectDialog Members topic.

Public

Name | Description
CancelButton (inherited from TCustomConnectDialog) | Used to specify the label for the Cancel button.
Caption (inherited from TCustomConnectDialog) | Used to set the caption of dialog box.
ConnectButton (inherited from TCustomConnectDialog) | Used to specify the label for the Connect button.
DialogClass (inherited from TCustomConnectDialog) | Used to specify the class of the form that will be displayed to enter login information.
Execute (inherited from TCustomConnectDialog) | Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button.
GetServerList (inherited from TCustomConnectDialog) | Retrieves a list of available server names.
LabelSet (inherited from TCustomConnectDialog) | Used to set the language of buttons and labels captions.
PasswordLabel (inherited from TCustomConnectDialog) | Used to specify a prompt for password edit.
Retries (inherited from TCustomConnectDialog) | Used to indicate the number of retries of failed connections.
SavePassword (inherited from TCustomConnectDialog) | Used for the password to be displayed in ConnectDialog in asterisks.
ServerLabel (inherited from TCustomConnectDialog) | Used to specify a prompt for the server name edit.
Session | Shows what TOraSession component uses TConnectDialog object.
StoreLogInfo (inherited from TCustomConnectDialog) | Used to specify whether the login information should be kept in system registry after a connection was established.
UsernameLabel (inherited from TCustomConnectDialog) | Used to specify a prompt for username edit.

Published

Name | Description
ReadAliases | Used to specify where the TConnectDialog object should acquire the names of database instances.

See Also

  • TConnectDialog Class
  • TConnectDialog Class Members


TConnectDialog.ReadAliases Property

TConnectDialog.ReadAliases Property

Used to specify where the TConnectDialog object should acquire the names of database instances.

Class

TConnectDialog

Syntax

property ReadAliases: boolean default False;

Remarks

Use ReadAliases property to specify whether the TConnectDialog object should acquire the names of database instances from TNSNAMES.ORA configuration file found in the Oracle home directory or read them from Odac registry entries.

Set this property to False to make ODAC read aliases from registry.

The default value is False.

Note: ODAC relies on valid local Oracle home directory structure if ReadAliases property is set to True.

Description

OdacVcl


TConnectDialog.Session Property

TConnectDialog.Session Property

Shows what TOraSession component uses TConnectDialog object.

Class

TConnectDialog

Syntax

property Session: TOraSession;

Remarks

Read Session property to learn what TOraSession component uses TConnectDialog object. This property is read-only.

See Also

  • TCustomDAConnection.ConnectDialog


Ora Unit Members

Ora Unit Members

This unit contains main components of ODAC.

Classes

Name | Description
TBFileField | A class representing BFile field in dataset.
TCursorField | A class representing REF CURSOR field in dataset.
TCustomOraQuery | A base class defining functionality for descendent classes which access database using SQL statements.
TOraChangeNotification | A component for keeping information in local dataset up-to-date through receiving notifications.
TOraDataSet | A class defining the Oracle functionality for a dataset.
TOraDataSetField | A class providing access to Oracle nested datasets.
TOraDataSetOptions | This class allows setting up the behaviour of the TOraDataSet class.
TOraDataSetOptionsDS | This class allows setting up the behaviour of the TOraDaatSet class (this property is obsolete).
TOraDataSource | TOraDataSource provides an interface between an ODAC dataset components and data-aware controls on a form.
TOraIntervalField | A class providing access to the Oracle interval fields.
TOraMetaData | A component for obtaining metainformation about database objects from the server.
TOraNestedTable | A component for controlling nested table data.
TOraNumberField | A class providing access to the Oracle number fields.
TOraParam | A class that is used to set the values of individual parameters passed with queries or stored procedures.
TOraParams | Used to control TOraParam objects.
TOraPoolingOptions | This class allows setting up the behaviour of the connecton pool.
TOraQuery | A component for executing queries and operating record sets. It also provides flexible way to update data.
TOraReferenceField | A class representing an Oracle REF field in a dataset.
TOraSession | A component for maintaining connection to an Oracle database.
TOraSessionOptions | This class allows setting up the behaviour of the TOraSession class.
TOraSQL | A component for executing SQL statements and calling stored procedures on the database server.
TOraStoredProc | A component for accessing and executing stored procedures and functions.
TOraTimeStampField | A class providing access to the Oracle timestamp fields.
TOraTrace | A component allowing starting and stopping a SQL trace for a specified session. This component provides access to the DBMS_TRACE package.
TOraUpdateSQL | A component for tuning update operations for the DataSet component.
TOraXMLField | A class providing access to the Oracle SYS.XMLTYPE objects.

Types

Name | Description
TFailoverEvent | This Type is used for the TOraSession.OnFailover event.
TOraChangeNotificationEvent | This type is used for the TOraChangeNotification.OnChange event.
TPlSqlTraceMode | Specifies the level of PL/SQL trace.
TSqlTraceMode | Specifies the level of SQL trace statistics level.

Enumerations

Name | Description
TCheckMode | Specifies the action to take when another user makes modifications to a record.
TFailoverState | Indicates the failover state.
TFailoverType | Specifies the failover type.
TOraIsolationLevel | Specifies the way the transactions containing database modifications are handled.
TRefreshMode | Defines when to refresh an editing record.
TSequenceMode | Specifies the method used internally to generate sequenced field.

Routines

Name | Description
AddWhere | Appends condition to WHERE clause.
DefaultSession | Call this function to get pointer to default session object.
DeleteWhere | Removes WHERE clause from a SELECT statement.
GetOrderBy | Returns fields from ORDER BY.
SessionByName | Returns pointer to session object by its name.
SetFieldList | Sets list of selecting fields.
SetGroupBy | Sets grouping fields.
SetOrderBy | Sets ordering fields.
SetSubscriptionPort | Sets change notification subscription port. Before setting the subscription port all opened sessions close and oci.dll unloads.
SetTableList | Sets list of tables.
SetWhere | Call this function to replace WHERE clause of a SELECT statement to Condition. You should pass SELECT statement by SQL.If condition is blank SetWhere removes WHERE clause.

Variables

Name | Description
DefSession | Read this variable to get pointer to default session object. Same as DefaultSession function.
Sessions | Holds pointers to all TOraSession objects of an application.
UseDefSession | When set to True enables TOraDataSet and TOraSQL components to use default session if they are not attached to any session.

Constants

Name | Description
OdacVersion | Read this constant to get current version number for ODAC.
OraQueryCompatibilityMode | All TOraQuery components in project become editable, and can be modified by the end users.


Classes in Ora

Classes in Ora

Classes in the Ora unit.

Classes

Name | Description
TBFileField | A class representing BFile field in dataset.
TCursorField | A class representing REF CURSOR field in dataset.
TCustomOraQuery | A base class defining functionality for descendent classes which access database using SQL statements.
TOraChangeNotification | A component for keeping information in local dataset up-to-date through receiving notifications.
TOraDataSet | A class defining the Oracle functionality for a dataset.
TOraDataSetField | A class providing access to Oracle nested datasets.
TOraDataSetOptions | This class allows setting up the behaviour of the TOraDataSet class.
TOraDataSetOptionsDS | This class allows setting up the behaviour of the TOraDaatSet class (this property is obsolete).
TOraDataSource | TOraDataSource provides an interface between an ODAC dataset components and data-aware controls on a form.
TOraIntervalField | A class providing access to the Oracle interval fields.
TOraMetaData | A component for obtaining metainformation about database objects from the server.
TOraNestedTable | A component for controlling nested table data.
TOraNumberField | A class providing access to the Oracle number fields.
TOraParam | A class that is used to set the values of individual parameters passed with queries or stored procedures.
TOraParams | Used to control TOraParam objects.
TOraPoolingOptions | This class allows setting up the behaviour of the connecton pool.
TOraQuery | A component for executing queries and operating record sets. It also provides flexible way to update data.
TOraReferenceField | A class representing an Oracle REF field in a dataset.
TOraSession | A component for maintaining connection to an Oracle database.
TOraSessionOptions | This class allows setting up the behaviour of the TOraSession class.
TOraSQL | A component for executing SQL statements and calling stored procedures on the database server.
TOraStoredProc | A component for accessing and executing stored procedures and functions.
TOraTimeStampField | A class providing access to the Oracle timestamp fields.
TOraTrace | A component allowing starting and stopping a SQL trace for a specified session. This component provides access to the DBMS_TRACE package.
TOraUpdateSQL | A component for tuning update operations for the DataSet component.
TOraXMLField | A class providing access to the Oracle SYS.XMLTYPE objects.


TBFileField Class

TBFileField Class

A class representing BFile field in dataset.

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

Unit

Ora

Syntax

TBFileField = class(TBlobField);

Remarks

TBFileField object represents BFile field in dataset.

The BFile datatype provides access to file LOBs that are stored in file systems outside an Oracle database. Oracle 8 currently supports access to binary files, or BFILEs. The BFILE datatype allows read-only support of large binary files; you cannot modify a file through Oracle.

TBFileField holds a TOraFile object. To get it use the AsFile property.

As a descendent of TField, TBFileField inherits many properties, methods, and events that are useful for managing the value and properties of a field in the database.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TBlobField
TBFileField

See Also

  • TOraFile


TBFileField Members

TBFileField Members

TBFileField class overview.

Properties

Name | Description
AsFile | Returns a TOraFile object.
AutoRefresh | Used to refresh content of BFile when FileDir or FileName is being changed.
BlobType | Indicates the type of BLOB field.
Exists | Returns True when a file associated with BFile exists, False otherwise.
FileDir | Used to indicate the directory alias where BFile is stored.
FileName | Indicates the name of a file associated with BFile.

Methods

Name | Description
Refresh | Reloads BFile.


TBFileField Properties

TBFileField Properties

Properties of the TBFileField class.

For a complete list of the TBFileField class members, see the TBFileField Members topic.

Public

Name | Description
AsFile | Returns a TOraFile object.
Exists | Returns True when a file associated with BFile exists, False otherwise.
FileDir | Used to indicate the directory alias where BFile is stored.
FileName | Indicates the name of a file associated with BFile.

Published

Name | Description
AutoRefresh | Used to refresh content of BFile when FileDir or FileName is being changed.
BlobType | Indicates the type of BLOB field.

See Also

  • TBFileField Class
  • TBFileField Class Members


TBFileField.AsFile Property

TBFileField.AsFile Property

Returns a TOraFile object.

Class

TBFileField

Syntax

property AsFile: TOraFile;

Remarks

Returns a TOraFile object. Later you can open TOraDataSet once.

See Also

  • TOraFile


TBFileField.AutoRefresh Property

TBFileField.AutoRefresh Property

Used to refresh content of BFile when FileDir or FileName is being changed.

Class

TBFileField

Syntax

property AutoRefresh: boolean default True;

Remarks

When AutoRefresh is True, TBFileField will refresh content of BFile when FileDir or FileName is changed.

The default value is True.


TBFileField.BlobType Property

TBFileField.BlobType Property

Indicates the type of BLOB field.

Class

TBFileField

Syntax

property BlobType: TBlobType;

Remarks

Indicates the type of BLOB field. For TBFileField is always equal to ftBlob.


TBFileField.Exists Property

TBFileField.Exists Property

Returns True when a file associated with BFile exists, False otherwise.

Class

TBFileField

Syntax

property Exists: boolean;

Remarks

Exists returns True when a file associated with BFile exists, False otherwise.

Example

if not TBFileField(DataSet.FieldByName('Value')).Exists then
   St:= St + '   (NoExist)';


TBFileField.FileDir Property

TBFileField.FileDir Property

Used to indicate the directory alias where BFile is stored.

Class

TBFileField

Syntax

property FileDir: string;

Remarks

Use the FileDir property to determine the directory alias where BFile is stored.

To create a directory alias use CREATE DIRECTORY.

Example

edFileDir.Text:= TBFileField(OraQuery.FieldByName('Value')).FileDir;


TBFileField.FileName Property

TBFileField.FileName Property

Indicates the name of a file associated with BFile.

Class

TBFileField

Syntax

property FileName: string;

Remarks

Use the FileName property to determine the name of a file associated with BFile.

Example

edFileName.Text := BFileField(OraQuery.FieldByName('Value')).FileName;


TBFileField Methods

TBFileField Methods

Methods of the TBFileField class.

For a complete list of the TBFileField class members, see the TBFileField Members topic.

Public

Name | Description
Refresh | Reloads BFile.

See Also

  • TBFileField Class
  • TBFileField Class Members


TBFileField.Refresh Method

TBFileField.Refresh Method

Reloads BFile.

Class

TBFileField

Syntax

procedure Refresh;

Remarks

Call the Refresh procedure to reload BFile.


TCursorField Class

TCursorField Class

A class representing REF CURSOR field in dataset.

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

Unit

Ora

Syntax

TCursorField = class(TDACursorField);

Remarks

A TCursorField object represents REF CURSOR field in dataset.

TCursorField holds a TOraCursor object. To get it use the AsCursor property.

As a descendent of TField, TCursorField inherits many properties, methods, and events that are useful for managing the value and properties of a field in a database.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TDACursorField
TCursorField

See Also

  • TOraCursor
  • TOraDataSet.Cursor


TCursorField Members

TCursorField Members

TCursorField class overview.

Properties

Name | Description
AsCursor | Returns a TOraCursor object you can assign to the Cursor property of TOraDataSet.


TCursorField Properties

TCursorField Properties

Properties of the TCursorField class.

For a complete list of the TCursorField class members, see the TCursorField Members topic.

Public

Name | Description
AsCursor | Returns a TOraCursor object you can assign to the Cursor property of TOraDataSet.

See Also

  • TCursorField Class
  • TCursorField Class Members


TCursorField.AsCursor Property

TCursorField.AsCursor Property

Returns a TOraCursor object you can assign to the Cursor property of TOraDataSet.

Class

TCursorField

Syntax

property AsCursor: TOraCursor;

Remarks

Returns a TOraCursor object which you can assign to the Cursor property of TOraDataSet. Later you can open TOraDataSet once.

See Also

  • TOraDataSet.Cursor


TCustomOraQuery Class

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

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery

See Also

  • TOraDataSet
  • TOraQuery
  • TSmartQuery
  • TOraStoredProc
  • TOraTable


TCustomOraQuery Members

TCustomOraQuery Members

TCustomOraQuery class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TCustomOraQuery Methods

TCustomOraQuery Methods

Methods of the TCustomOraQuery class.

For a complete list of the TCustomOraQuery class members, see the TCustomOraQuery Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLLock (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to perform a record lock.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TCustomOraQuery Class
  • TCustomOraQuery Class Members


TCustomOraQuery.ExecSQL Method

TCustomOraQuery.ExecSQL Method

Executes a SQL statement on the server.

Class

TCustomOraQuery

Syntax

procedure ExecSQL;

Remarks

The ExecSQL method does the same as the TCustomDADataSet.Execute method. It is included in TCustomOraQuery for compatibility with TQuery.

See Also

  • TCustomDADataSet.Execute


TOraChangeNotification Class

TOraChangeNotification Class

A component for keeping information in local dataset up-to-date through receiving notifications.

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

Unit

Ora

Syntax

TOraChangeNotification = class(TComponent);

Remarks

The TOraChangeNotification component is used to register queries with the database and receive notifications in response to DML or DDL changes on the objects associated with queries. The notifications are published by database when the DML or DDL transaction commits.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraChangeNotification

See Also

  • Change Notification demo
  • Working with TOraChangeNotification Component


TOraChangeNotification Members

TOraChangeNotification Members

TOraChangeNotification class overview.

Properties

Name | Description
Active | Description is not available at the moment.
Enabled | Used to enable or disable using change notification.
Operations | Used to be notified of the particular operations execution.
Persistent | Used to store notifications in a database persistently.
Port | Used to subscribe for the database change notification.
TimeOut | Indicates the interval for a notification to remain active.

Methods

Name | Description
RemoveRegistration | Removes the change notification registration for all open datasets, connected with the TOraChangeNotification component.

Events

Name | Description
OnChange | Occurs when data in one of the associated datasets was changed on the server.


TOraChangeNotification Properties

TOraChangeNotification Properties

Properties of the TOraChangeNotification class.

For a complete list of the TOraChangeNotification class members, see the TOraChangeNotification Members topic.

Public

Name | Description
Active | Description is not available at the moment.
Port | Used to subscribe for the database change notification.

Published

Name | Description
Enabled | Used to enable or disable using change notification.
Operations | Used to be notified of the particular operations execution.
Persistent | Used to store notifications in a database persistently.
TimeOut | Indicates the interval for a notification to remain active.

See Also

  • TOraChangeNotification Class
  • TOraChangeNotification Class Members


TOraChangeNotification.Active Property

TOraChangeNotification.Active Property

Class

TOraChangeNotification

Syntax

property Active: boolean;

Remarks

Indicates whether there is an active dataset connected with the TOraChangeNotification component.


TOraChangeNotification.Enabled Property

TOraChangeNotification.Enabled Property

Used to enable or disable using change notification.

Class

TOraChangeNotification

Syntax

property Enabled: boolean default True;

Remarks

Set the Enabled property to False to disable change notification for all datasets connected to the TOraChangeNotification component. Setting this property to True allows datasets, connected to the TOraChangeNotification component, to use change notification.


TOraChangeNotification.Operations Property

TOraChangeNotification.Operations Property

Used to be notified of the particular operations execution.

Class

TOraChangeNotification

Syntax

property Operations: TChangeNotifyDMLOperations default [cnoInsert, cnoUpdate, cnoDelete];

Remarks

Set the Operations property to provide a notification when particular operations are being executed.


TOraChangeNotification.Persistent Property

TOraChangeNotification.Persistent Property

Used to store notifications in a database persistently.

Class

TOraChangeNotification

Syntax

property Persistent: boolean default False;

Remarks

If True, notifications will be stored persistently in a database and would not be lost if server instance crashes after generating notifications, and they would be sent after Oracle server restart.


TOraChangeNotification.Port Property

TOraChangeNotification.Port Property

Used to subscribe for the database change notification.

Class

TOraChangeNotification

Syntax

property Port: integer;

Remarks

Set the Port property for the database change notification subscription.


TOraChangeNotification.TimeOut Property

TOraChangeNotification.TimeOut Property

Indicates the interval for a notification to remain active.

Class

TOraChangeNotification

Syntax

property TimeOut: integer default 0;

Remarks

Set the TimeOut property to determine time interval in seconds, after which the notification registration will expire.

The minimum value is 1 second, maximum is 2^31-1 seconds.


TOraChangeNotification Methods

TOraChangeNotification Methods

Methods of the TOraChangeNotification class.

For a complete list of the TOraChangeNotification class members, see the TOraChangeNotification Members topic.

Public

Name | Description
RemoveRegistration | Removes the change notification registration for all open datasets, connected with the TOraChangeNotification component.

See Also

  • TOraChangeNotification Class
  • TOraChangeNotification Class Members


TOraChangeNotification.RemoveRegistration Method

TOraChangeNotification.RemoveRegistration Method

Removes the change notification registration for all open datasets, connected with the TOraChangeNotification component.

Class

TOraChangeNotification

Syntax

procedure RemoveRegistration(Session: TOraSession);

Parameters
Session

Remarks

Use the RemoveRegistration method to remove the change notification registration for all open datasets, connected with the TOraChangeNotification component. To register the change notification again, reopen all required datasets.


TOraChangeNotification Events

TOraChangeNotification Events

Events of the TOraChangeNotification class.

For a complete list of the TOraChangeNotification class members, see the TOraChangeNotification Members topic.

Published

Name | Description
OnChange | Occurs when data in one of the associated datasets was changed on the server.

See Also

  • TOraChangeNotification Class
  • TOraChangeNotification Class Members


TOraChangeNotification.OnChange Event

TOraChangeNotification.OnChange Event

Occurs when data in one of the associated datasets was changed on the server.

Class

TOraChangeNotification

Syntax

property OnChange: TOraChangeNotificationEvent;

Remarks

The OnChange event occurs when data in one of the associated datasets has been changed on the server. To receive change notifications the Enabled property must be set to True. The NotifyType parameter contains the type of the event occurred. The TableChanges parameter contains information on all table changes.

See Also

  • Enabled
  • Working with TOraChangeNotification Component


TOraDataSet Class

TOraDataSet Class

A class defining the Oracle functionality for a dataset.

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

Unit

Ora

Syntax

TOraDataSet = class(TCustomDADataSet);

Remarks

TOraDataSet is a component that defines the Oracle functionality for a dataset. TOraDataSet can execute queries, fetch rows and control Oracle specific data types. Applications never use TOraDataSet objects directly. Instead they use descendants of TOraDataSet, such as TOraQuery, TSmartQuery, TOraStoredProc, and TOraTable, which inherit its database-related properties and methods.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet

See Also

  • TOraQuery
  • TSmartQuery
  • TOraStoredProc
  • TOraTable


TOraDataSet Members

TOraDataSet Members

TOraDataSet class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification | Used to receive database change notification messages to refresh dataset when required.
CheckMode | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh | Used to refresh record by RETURNING clause when insert or update is performed.
FetchAll | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL | Indicates whether a SQL statement is a PL/SQL block.
IsQuery | Indicates whether SQL statement returns rows or not.
KeyFields | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode | Used to define when to perform the locking of an editing record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking | Used to execute a SQL statement and fetch rows by a separate thread.
Options | Used to specify the behaviour of TOraDataSetObject.
OptionsDS | Used to specify the behaviour of TOraDataSetObject.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed | Returns the number of rows processed by a query.
SequenceMode | Used to specify the methods used internally to generate a sequenced field.
Session | Used to specify the session in which dataset will be executed.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLLock (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to perform a record lock.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
ErrorOffset | Returns the parse error offset.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam | Determines whether a parameter with the specified name exists in a dataset.
GetArray | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile | Retrieves a TOraFile object for a field with known name.
GetInterval | Retrieves a TOraInterval object for a field with known name.
GetKeyList | Returns the list of table primary key fields.
GetLob | Retrieves a TOraLob object for a field with known name.
GetLobLocator | Retrieves a TOraLob object for a field with known name.
GetObject | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef | Retrieves a TOraRef object for a field with known name.
GetTable | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TOraDataSet Properties

TOraDataSet Properties

Properties of the TOraDataSet class.

For a complete list of the TOraDataSet class members, see the TOraDataSet Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification | Used to receive database change notification messages to refresh dataset when required.
CheckMode | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
Cursor | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh | Used to refresh record by RETURNING clause when insert or update is performed.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TCustomDADataSet) | Determines if a parameter with the specified name exists in a dataset.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL | Indicates whether a SQL statement is a PL/SQL block.
IsQuery | Indicates whether SQL statement returns rows or not.
KeyFields | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options | Used to specify the behaviour of TOraDataSetObject.
OptionsDS | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TCustomDADataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode | Used to specify the methods used internally to generate a sequenced field.
Session | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLLock (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to perform a record lock.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TOraDataSet Class
  • TOraDataSet Class Members


TOraDataSet.ChangeNotification Property

TOraDataSet.ChangeNotification Property

Used to receive database change notification messages to refresh dataset when required.

Class

TOraDataSet

Syntax

property ChangeNotification: TOraChangeNotification;

Remarks

Use the ChangeNotification property to associate the component with the TOraChangeNotification component to receive database change notification messages to refresh dataset when required.

See Also

  • TOraChangeNotification
  • Working with TOraChangeNotification Component
  • Options


TOraDataSet.CheckMode Property

TOraDataSet.CheckMode Property

Used to define the check mode before editing a record.

Class

TOraDataSet

Syntax

property CheckMode: TCheckMode default cmNone;

Remarks

Use the CheckMode property to define the check mode before editing a record. Checking records is useful in creating concurrent multi-user applications. Set CheckMode to specify what action to take when another user makes modifications to a record. TOraDataSet first refetches record values and compares them with those of a client.


TOraDataSet.Cursor Property

TOraDataSet.Cursor Property

Used to fetch data from the cursor parameter and cursor field in Oracle 8.

Class

TOraDataSet

Syntax

property Cursor: TOraCursor;

Remarks

Use the Cursor property to fetch data from the cursor parameter and cursor field in Oracle 8. You can assign the value of TOraParam.AsCursor or TCursorField.AsCursor to the Cursor property. After assigning you can open the dataset once.

Example

OraQuery1.Cursor := OraSQL1.ParamByName('Cur').AsCursor;
OraQuery1.Open;

See Also

  • TOraCursor
  • TOraParam.AsCursor


TOraDataSet.DMLRefresh Property

TOraDataSet.DMLRefresh Property

Used to refresh record by RETURNING clause when insert or update is performed.

Class

TOraDataSet

Syntax

property DMLRefresh: boolean;

Remarks

Use the DMLRefresh property to refresh record by RETURNING clause when insert or update is performed. This feature is only for Oracle 8.

The default value is False.


TOraDataSet.FetchAll Property

TOraDataSet.FetchAll Property

Used to request all records of the query from database server when a dataset is being opened.

Class

TOraDataSet

Syntax

property FetchAll: boolean;

Remarks

When set to True, all records of the query are requested from database server when a dataset is being opened. When set to False, records are retrieved when a data-aware component or a program requests it. If a query can return a lot of records, set this property to False if initial response time is important.

When the FetchAll property is False, the first call to the TMemDataSet.Locate and TMemDataSet.LocateEx methods may take a lot of time to retrieve additional records to the client side.


TOraDataSet.IsPLSQL Property

TOraDataSet.IsPLSQL Property

Indicates whether a SQL statement is a PL/SQL block.

Class

TOraDataSet

Syntax

property IsPLSQL: boolean;

Remarks

Use the IsPLSQL property to check whether a SQL statement is a PL/SQL block. TOraDataSet must be prepared beforehand.

IsPLSQL is a read-only property.

See Also

  • IsQuery


TOraDataSet.IsQuery Property

TOraDataSet.IsQuery Property

Indicates whether SQL statement returns rows or not.

Class

TOraDataSet

Syntax

property IsQuery: boolean;

Remarks

When the TOraDataSet component is prepared, it returns True. If SQL statement is SELECT or PL/SQL block it returns the REF CURSOR parameter.

Use the IsQuery property to check whether SQL statement returns rows or not. TOraDataSet returns rows when SQL statement is SELECT or PL/SQL block with the REF CURSOR parameter. TOraDataSet must be prepared beforehand.

IsQuery is a read-only property.

See Also

  • IsPLSQL


TOraDataSet.KeyFields Property

TOraDataSet.KeyFields Property

Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.

Class

TOraDataSet

Syntax

property KeyFields: string;

Remarks

Assign the KeyFields property to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database. To exploit this feature KeyFields may hold a list of semicolon-delimited field names. If KeyFields was not defined before opening the dataset, ROWID pseudo fields are used.

Besides, the KeyFields property may hold the name of a field which will be later assigned with Oracle sequenced values. Beforehand Oracle sequence must be created and its name passed to the KeySequence property.

Sequences are generated when either TDataSet.Insert or TDataSet.Post method is called. Which of these two methods is used to modify the database is determined by the SequenceMode property.

Note: Although keys may be created across a number of table fields, sequence is generated only for the first field found in the KeyFields property.

See Also

  • KeySequence
  • SequenceMode
  • TCustomDADataSet.SQLDelete
  • TCustomDADataSet.SQLInsert
  • TCustomDADataSet.SQLRefresh
  • TCustomDADataSet.SQLUpdate


TOraDataSet.KeySequence Property

TOraDataSet.KeySequence Property

Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.

Class

TOraDataSet

Syntax

property KeySequence: string;

Remarks

Use the KeySequence property to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.

Note: KeySequence is used by TOraDataSet only if the KeyFields property is assigned.

Example

Here is an example of PL/SQL block generated by TOraDataSet:

begin
   SELECT DEPT_SEQ.NEXTVAL
   INTO :DEPTNO
   FROM Dual;
   INSERT INTO DEPT
      (DEPTNO, DNAME)
   VALUES
      (:DEPTNO, :DNAME);
end;

See Also

  • SequenceMode


TOraDataSet.LockMode Property

TOraDataSet.LockMode Property

Used to define when to perform the locking of an editing record.

Class

TOraDataSet

Syntax

property LockMode: TLockMode;

Remarks

Use the LockMode property to define when to perform the locking of an editing record. Locking a record is useful when creating multi-user applications. It prevents the possibility of several users modifying a record at the same time. Locking is realized through the execution of SELECT FOR UPDATE NOWAIT statement.

Locking is performed by the RefreshRecord method.

To set pessimistic locking use LockMode = lmLockImmediate, CheckMode = cmException. To set optimistic locking use LockMode = lmLockDelayed, CheckMode = cmException.

The default value is lmNone.

See Also

  • TCustomDADataSet.Lock
  • TCustomOraQuery.SQLLock
  • CheckMode


TOraDataSet.NonBlocking Property

TOraDataSet.NonBlocking Property

Used to execute a SQL statement and fetch rows by a separate thread.

Class

TOraDataSet

Syntax

property NonBlocking: boolean default False;

Remarks

Set the NonBlocking property to True to execute SQL statement and fetch rows by a separate thread.


TOraDataSet.Options Property

TOraDataSet.Options Property

Used to specify the behaviour of TOraDataSetObject.

Class

TOraDataSet

Syntax

property Options: TOraDataSetOptions;

Remarks

Set the properties of Options to specify the behaviour of a TOraDataSet object.

Descriptions of all options are in the table below.

Option Name | Description
AutoClose | Used to close OCI cursor after fetching all rows.
CacheLobs | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues | Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate value.
DeferredLobRead | Used to fetch all Oracle 8 Lob values when they are explicitly requested.
ExtendedFieldsInfo | Used to perform an additional query to get information about returned fields and the tables they belong to.
FieldsAsString | Used to treat all non-BLOB fields as being of string datatype.
FullRefresh | Used to refresh fields of all tables by the RefreshRecord method.
PrefetchRows | Used to get or set the number of rows that OCI prefetches when executing a query.
PrepareUpdateSQL | Used to automatically prepare update queries before execution.
RawAsString | Used to treat all RAW fields as being of string datatype.
ReflectChangeNotify | Used for a dataset component to refresh its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.
ScrollableCursor | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.
TemporaryLobUpdate | Temporary LOBs are used to write input and input/output LOB parameters into database when executing dataset's SQL statements.

See Also

  • TCustomDADataSet.Options


TOraDataSet.OptionsDS Property

TOraDataSet.OptionsDS Property

Used to specify the behaviour of TOraDataSetObject.

Class

TOraDataSet

Syntax

property OptionsDS: TOraDataSetOptionsDS stored False;

Remarks

Set the properties of OptionsDS to specify the behaviour of a TOraDataSet object.

Descriptions of all options are in the table below.

Option Name | Description
AutoClose | Used to close OCI cursor after fetching all rows.
CacheLobs | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues | Used for TOraDataSet to fill the DefaultExpression property of TField objects with the appropriate value.
DeferredLobRead | Used fetch all Oracle 8 Lob values only when they are explicitly requested.
FieldsAsString | Used to treat all non-BLOB fields as being of string datatype.
KeepPrepared | Used to keep TOraDataSet prepared after closing.
RawAsString | Used to treat all RAW fields as being of string datatype.
ScrollableCursor | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.

See Also

  • TCustomDADataSet.Options


TOraDataSet.Params Property

TOraDataSet.Params Property

Contains the parameters for a query's SQL statement.

Class

TOraDataSet

Syntax

property Params: TOraParams stored False;

Remarks

The Params parameter contains the parameters for a query's SQL statement.

Access Params at runtime to view and set parameter names, values, and data types dynamically (at design time use the Parameters editor to set parameter information). Params is a zero-based array of parameter records. Index specifies the array element to access.

An easier way to set and retrieve parameter values when the name of each parameter is known is to call ParamByName.

See Also

  • TOraParam
  • ParamByName


TOraDataSet.RefreshMode Property

TOraDataSet.RefreshMode Property

Used to specify when to refresh an editing record.

Class

TOraDataSet

Syntax

property RefreshMode: TRefreshMode stored False;

Remarks

Use the RefreshMode property to define when to perform a refresh of editing record. Refreshing a record is useful when a table has triggers or fields of a table have default value.

Refresh is performed by the RefreshRecord method.

The default value is rmNone.

Note: RefreshMode is obsolete, and only included for backward compatibility. Use TCustomDADataSet.RefreshOptions instead.

See Also

  • TCustomDADataSet.RefreshRecord
  • TCustomDADataSet.SQLRefresh


TOraDataSet.ReturnParams Property

TOraDataSet.ReturnParams Property

Used to return a new fields value to dataset after insert or update.

Class

TOraDataSet

Syntax

property ReturnParams: boolean stored False;

Remarks

Use the ReturnParams property to return the new fields value to dataset after insert or update. The actual value of a field after insert or update may be different from the value stored in local memory if a table has a trigger.

When ReturnParams is True, OUT parameters of SQLInsert and SQLUpdate statements are assigned to the corresponding fields.

OUT parameters can have PL/SQL block or DML statements with the RETURNING clause (for Oracle 8 only).

The default value is False.


TOraDataSet.RowsProcessed Property

TOraDataSet.RowsProcessed Property

Returns the number of rows processed by a query.

Class

TOraDataSet

Syntax

property RowsProcessed: integer;

Remarks

Use the RowsProcessed property to return the number of rows processed by a query. Useful for SELECT, UPDATE and DELETE statements. In case of SELECT statement, RowsProcessed increments by FetchRows.

See Also

  • TCustomDADataSet.RowsAffected


TOraDataSet.SequenceMode Property

TOraDataSet.SequenceMode Property

Used to specify the methods used internally to generate a sequenced field.

Class

TOraDataSet

Syntax

property SequenceMode: TSequenceMode default smPost;

Remarks

Set the SequenceMode property to specify which method is used internally to generate a sequenced field.

See Also

  • KeyFields
  • KeySequence


TOraDataSet.Session Property

TOraDataSet.Session Property

Used to specify the session in which dataset will be executed.

Class

TOraDataSet

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session in which dataset will be executed. If Session is not connected, the Open method calls Session.Connect.

See Also

  • TOraSession


TOraDataSet.SQLType Property

TOraDataSet.SQLType Property

Used to get the typecode of the SQL statement being processed by Oracle database server.

Class

TOraDataSet

Syntax

property SQLType: integer;

Remarks

Read the SQLType property to get the typecode of the SQL statement being processed by Oracle database server.


TOraDataSet.StrictUpdate Property

TOraDataSet.StrictUpdate Property

Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.

Class

TOraDataSet

Syntax

property StrictUpdate: boolean stored False;

Remarks

When True, TOraDataSet raises the 'Update failed' exception when the number of updated or deleted records are not equal 1. The exception does not occur when you use a PL/SQL block.

The default value is True.

Note: StrictUpdate is obsolete, and included for backward compatibility only. Use TCustomDADataSet.Options instead.


TOraDataSet.UpdateObject Property

TOraDataSet.UpdateObject Property

Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.

Class

TOraDataSet

Syntax

property UpdateObject: TOraUpdateSQL;

Remarks

The UpdateObject property points to an update object component which provides SQL statements that perform updates of the read-only datasets when cached updates are enabled.


TOraDataSet Methods

TOraDataSet Methods

Methods of the TOraDataSet class.

For a complete list of the TOraDataSet class members, see the TOraDataSet Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall | Generates the stored procedure call.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
ErrorOffset | Returns the parse error offset.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam | Determines whether a parameter with the specified name exists in a dataset.
GetArray | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile | Retrieves a TOraFile object for a field with known name.
GetInterval | Retrieves a TOraInterval object for a field with known name.
GetKeyList | Returns the list of table primary key fields.
GetLob | Retrieves a TOraLob object for a field with known name.
GetLobLocator | Retrieves a TOraLob object for a field with known name.
GetObject | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef | Retrieves a TOraRef object for a field with known name.
GetTable | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsQuery (inherited from TCustomDADataSet) | Used to check whether SQL statement returns rows.
KeyFields (inherited from TCustomDADataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating the database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TCustomDADataSet) | Used to specify the behaviour of TCustomDADataSet object.
ParamByName | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TCustomDADataSet) | Used to view and set parameter names, values, and data types dynamically.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLLock (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to perform a record lock.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TOraDataSet Class
  • TOraDataSet Class Members


TOraDataSet.BreakExec Method

TOraDataSet.BreakExec Method

Breaks execution of a SQL statement on the server.

Class

TOraDataSet

Syntax

procedure BreakExec;

Remarks

Call the BreakExec method to break execution of a SQL statement on the server. Useful when NonBlocking is True.

There are some notions to keep in mind when using this procedure:

  • execution of the PL/SQL block cannot be interrupted by BreakExec;
  • calling BreakExec to interrupt dataset opening in the NonBlocking mode may not have effect if a fetch operation has already begun (this happens when BreakExec falls between two fetch operations).

See Also

  • TCustomDADataSet.Execute
  • NonBlocking


TOraDataSet.CreateProcCall Method

TOraDataSet.CreateProcCall Method

Generates the stored procedure call.

Class

TOraDataSet

Syntax

procedure CreateProcCall(Name: string; Overload: integer = 0);

Parameters
Name
Holds the name of the stored procedure.
Overload
Holds the numder of the overloaded procedure.

Remarks

Call the CreateProcCall method to assign a PL/SQL block that calls stored procedure specified by Name to the SQL property. Overload parameter must contain the number of the overloaded procedure. Retrieves the information about the procedure parameters from Oracle. After calling CreateProcCall you can execute stored procedure by the Execute method.

See Also

  • TCustomDADataSet.Execute
  • TCustomDAConnection.ExecProc
  • TOraStoredProc


TOraDataSet.ErrorOffset Method

TOraDataSet.ErrorOffset Method

Returns the parse error offset.

Class

TOraDataSet

Syntax

function ErrorOffset: integer;

Return Value
the parse error offset.

Remarks

Call the ErrorOffset method to return the parse error offset for a SQL statement. Check ErrorOffset after TOraDataSet raises an exception.

See Also

  • GetErrorPos


TOraDataSet.Fetched Method

TOraDataSet.Fetched Method

Indicates if TCustomDADataSet has already fetched all rows.

Class

TOraDataSet

Syntax

function Fetched: boolean; override;

Remarks

Check the Fetched property to learn whether TCustomDADataSet has already fetched all rows.

See Also

  • TCustomDADataSet.Fetching


TOraDataSet.FindParam Method

TOraDataSet.FindParam Method

Determines whether a parameter with the specified name exists in a dataset.

Class

TOraDataSet

Syntax

function FindParam(const Value: string): TOraParam;

Parameters
Value
Holds the name of the param to search for.
Return Value
a TOraParam object for the specified Name.

Remarks

Call the FindParam method to determine if parameter with the specified name exists in a dataset. Name is the name of the param for which to search. If FindParam finds a param with a matching name, it returns a TOraParam object for the specified Name. Otherwise it returns nil.

See Also

  • Params
  • ParamByName


TOraDataSet.GetArray Method

TOraDataSet.GetArray Method

Retrieves a TOraArray object for a field when only its name is known.

Class

TOraDataSet

Syntax

function GetArray(const FieldName: string): TOraArray;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraArray object for a field with known name.

Remarks

Call the GetArray method to retrieve a TOraArray object for a field when only its name is known. FieldName is the name of an existing field. The field should have the ftArray type.

See Also

  • TOraArray
  • TCustomDADataSet.GetDataType
  • TOraParam.AsArray


TOraDataSet.GetErrorPos Method

TOraDataSet.GetErrorPos Method

Returns a row and column of parse error for a SQL statement.

Class

TOraDataSet

Syntax

procedure GetErrorPos(var Row: integer; var Col: integer);

Parameters
Row
Holds the row number.
Col
Holds the column number.

Remarks

Call the GetErrorPos method to return a row and column of parse error for a SQL statement. Use GetErrorPos after TOraDataSet raises an exception.

See Also

  • ErrorOffset


TOraDataSet.GetFile Method

TOraDataSet.GetFile Method

Retrieves a TOraFile object for a field with known name.

Class

TOraDataSet

Syntax

function GetFile(const FieldName: string): TOraFile;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraFile object for a field with known name.

Remarks

Call the GetFile method to retrieve a TOraFile object for a field when only its name is known. FieldName is the name of an existing field. The field should have ftBFile.

See Also

  • TOraFile
  • TCustomDADataSet.GetDataType
  • TBFileField
  • TOraParam.AsBFile


TOraDataSet.GetInterval Method

TOraDataSet.GetInterval Method

Retrieves a TOraInterval object for a field with known name.

Class

TOraDataSet

Syntax

function GetInterval(const FieldName: string): TOraInterval;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraInterval object for a field with known name.

Remarks

Call the GetInterval method to retrieve a TOraInterval object for a field when only its name is known. FieldName is the name of an existing field. The field should have ftIntervalYM or ftIntervalDS.

See Also

  • TOraInterval
  • TOraParam.AsInterval


TOraDataSet.GetKeyList Method

TOraDataSet.GetKeyList Method

Returns the list of table primary key fields.

Class

TOraDataSet

Syntax

function GetKeyList(TableName: string; List: _TStrings): string;

Parameters
TableName
Holds the table name.
List
Return Value
the list of table primary key fields.

Remarks

Call the GetKeyList method to get the list of table primary key fields.


TOraDataSet.GetLob Method

TOraDataSet.GetLob Method

Retrieves a TOraLob object for a field with known name.

Class

TOraDataSet

Syntax

function GetLob(const FieldName: string): TOraLob;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraLob object for a field with known name.

Remarks

Call the GetLob method to retrieve a TOraLob object for a field when only its name is known. FieldName is the name of an existing field. The field should have the ftOraClob or ftOraBlob type.

See Also

  • TOraLob
  • TCustomDADataSet.GetDataType
  • TOraParam.AsBLOBLocator


TOraDataSet.GetLobLocator Method

TOraDataSet.GetLobLocator Method

Retrieves a TOraLob object for a field with known name.

Class

TOraDataSet

Syntax

function GetLobLocator(const FieldName: string): TOraLob;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraLob object for a field with known name.

Remarks

Call the GetLobLocator method to retrieve a TOraLob object for a field when only its name is known. FieldName is the name of an existing field. The field should have the ftOraClob or ftOraBlob type.

Note: GetLobLocator is an obsolete method. In newer projects call GetLob instead.

See Also

  • GetLob
  • TOraLob
  • TCustomDADataSet.GetDataType
  • TOraParam.AsBLOBLocator


TOraDataSet.GetObject Method

TOraDataSet.GetObject Method

Retrieves a TOraObject object for a field with known name.

Class

TOraDataSet

Syntax

function GetObject(const FieldName: string): TOraObject;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraObject object for a field with known name.

Remarks

Call the GetObject method to retrieve a TOraObject object for a field when only its name is known. FieldName is the name of an existing field. The field should have the ftObject, ftReference, ftArray or ftTable type.

See Also

  • TOraObject
  • TCustomDADataSet.GetDataType
  • TOraParam.AsObject


TOraDataSet.GetRef Method

TOraDataSet.GetRef Method

Retrieves a TOraRef object for a field with known name.

Class

TOraDataSet

Syntax

function GetRef(const FieldName: string): TOraRef;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraRef object for a field with known name.

Remarks

Call the GetRef method to retrieve a TOraRef object for a field when only its name is known. FieldName is the name of an existing field. The field should have the ftReference type.

See Also

  • TOraRef
  • TCustomDADataSet.GetDataType
  • TOraNestedTable.Ref
  • TOraParam.AsRef


TOraDataSet.GetTable Method

TOraDataSet.GetTable Method

Retrieve a TOraNestTable object for a field with known name.

Class

TOraDataSet

Syntax

function GetTable(const FieldName: string): TOraNestTable;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraNestTable object for a field with known name.

Remarks

Call the GetTable to retrieve a TOraNestTable object for a field when only its name is known. FieldName is the name of an existing field. The field should have the ftTable type.

See Also

  • TOraNestTable
  • TCustomDADataSet.GetDataType
  • TOraNestedTable.Table
  • TOraParam.AsTable


TOraDataSet.GetTimeStamp Method

TOraDataSet.GetTimeStamp Method

Retrieves a TOraTimeStamp object for a field with known name.

Class

TOraDataSet

Syntax

function GetTimeStamp(const FieldName: string): TOraTimeStamp;

Parameters
FieldName
Holds the name of an existing field.
Return Value
a TOraTimeStamp object for a field with known name.

Remarks

Call the GetTimeStamp method to retrieve a TOraTimeStamp object for a field when only its name is known. FieldName is the name of an existing field. The field should have ftTimeStamp.

See Also

  • TOraTimeStamp
  • TOraParam.AsTimeStamp


TOraDataSet.ParamByName Method

TOraDataSet.ParamByName Method

Sets or uses parameter information for a specific parameter based on its name.

Class

TOraDataSet

Syntax

function ParamByName(const Value: string): TOraParam;

Parameters
Value
holds the name of the parameter to retrieve information for.
Return Value
a object.

Remarks

Call the ParamByName method to set or use parameter information for a specific parameter based on its name. Name is the name of the parameter for which to retrieve information. ParamByName is used to set a parameter's value at runtime and returns a TOraParam object.

Example

The following statement retrieves the current value of a parameter called "Contact" into an edit box:

Edit1.Text := Query1.ParamsByName('Contact').AsString;

See Also

  • TOraParam
  • Params
  • TCustomDADataSet.FindParam


TOraDataSetField Class

TOraDataSetField Class

A class providing access to Oracle nested datasets.

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

Unit

Ora

Syntax

TOraDataSetField = class(TDataSetField);

Remarks

TOraDataSetField provides access to Oracle nested datasets.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TObjectField
TDataSetField
TOraDataSetField


TOraDataSetField Members

TOraDataSetField Members

TOraDataSetField class overview.

Properties

Name | Description
Modified | Indicates whether tafield was modified.


TOraDataSetField Properties

TOraDataSetField Properties

Properties of the TOraDataSetField class.

For a complete list of the TOraDataSetField class members, see the TOraDataSetField Members topic.

Public

Name | Description
Modified | Indicates whether tafield was modified.

See Also

  • TOraDataSetField Class
  • TOraDataSetField Class Members


TOraDataSetField.Modified Property

TOraDataSetField.Modified Property

Indicates whether tafield was modified.

Class

TOraDataSetField

Syntax

property Modified: boolean;

Remarks

The Modified proprty indicates whether a field was modified. The property is writable.


TOraDataSetOptions Class

TOraDataSetOptions Class

This class allows setting up the behaviour of the TOraDataSet class.

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

Unit

Ora

Syntax

TOraDataSetOptions = class(TOraDataSetOptionsDS);

Remarks

Cached Gets a value indicating whether Oracle resources assosiated with the current statement will be cached inside a session. If you execute many different SELECT statements this option may significantly increase the performance of your application. But using this property you may easily step over maximum open cursors on Oracle server. And thus you must be attentive when using the Cached option. This option is only available with Oracle 9.2i and higher. It will work only if TOraSession.Options is set to True.

Inheritance Hierarchy

TObject
TPersistent
TDADataSetOptions
TOraDataSetOptionsDS
TOraDataSetOptions


TOraDataSetOptions Members

TOraDataSetOptions Members

TOraDataSetOptions class overview.

Properties

Name | Description
AutoClose | Used to close OCI cursor after fetching all rows.
AutoPrepare (inherited from TDADataSetOptions) | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields (inherited from TDADataSetOptions) | Used to enable caching of the TField.Calculated and TField.Lookup fields.
CacheLobs | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues | Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate value.
DeferredLobRead | Used to fetch all Oracle 8 Lob values when they are explicitly requested.
DetailDelay (inherited from TDADataSetOptions) | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
ExtendedFieldsInfo | Used to perform an additional query to get information about returned fields and the tables they belong to.
FieldsAsString | Used to treat all non-BLOB fields as being of string datatype.
FieldsOrigin (inherited from TDADataSetOptions) | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers (inherited from TDADataSetOptions) | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
FullRefresh | Used to refresh fields of all tables by the RefreshRecord method.
KeepPrepared (inherited from TOraDataSetOptionsDS) | Used to keep TOraDataSet prepared after closing.
LocalMasterDetail (inherited from TDADataSetOptions) | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings (inherited from TDADataSetOptions) | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange (inherited from TDADataSetOptions) | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
PrefetchRows | Used to get or set the number of rows that OCI prefetches when executing a query.
PrepareUpdateSQL | Used to automatically prepare update queries before execution.
QueryRecCount (inherited from TDADataSetOptions) | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames (inherited from TDADataSetOptions) | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RawAsString | Used to treat all RAW fields as being of string datatype.
ReflectChangeNotify | Used for a dataset component to refresh its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.
RemoveOnRefresh (inherited from TDADataSetOptions) | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields (inherited from TDADataSetOptions) | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams (inherited from TDADataSetOptions) | Used to return the new value of fields to dataset after insert or update.
ScrollableCursor | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.
SetFieldsReadOnly (inherited from TDADataSetOptions) | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate (inherited from TDADataSetOptions) | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TemporaryLobUpdate | Temporary LOBs are used to write input and input/output LOB parameters into database when executing dataset's SQL statements.
TrimFixedChar (inherited from TDADataSetOptions) | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields (inherited from TDADataSetOptions) | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize (inherited from TDADataSetOptions) | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.


TOraDataSetOptions Properties

TOraDataSetOptions Properties

Properties of the TOraDataSetOptions class.

For a complete list of the TOraDataSetOptions class members, see the TOraDataSetOptions Members topic.

Public

Name | Description
AutoPrepare (inherited from TDADataSetOptions) | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields (inherited from TDADataSetOptions) | Used to enable caching of the TField.Calculated and TField.Lookup fields.
DetailDelay (inherited from TDADataSetOptions) | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsOrigin (inherited from TDADataSetOptions) | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers (inherited from TDADataSetOptions) | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
LocalMasterDetail (inherited from TDADataSetOptions) | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings (inherited from TDADataSetOptions) | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange (inherited from TDADataSetOptions) | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount (inherited from TDADataSetOptions) | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames (inherited from TDADataSetOptions) | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RemoveOnRefresh (inherited from TDADataSetOptions) | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields (inherited from TDADataSetOptions) | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams (inherited from TDADataSetOptions) | Used to return the new value of fields to dataset after insert or update.
SetFieldsReadOnly (inherited from TDADataSetOptions) | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate (inherited from TDADataSetOptions) | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar (inherited from TDADataSetOptions) | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields (inherited from TDADataSetOptions) | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize (inherited from TDADataSetOptions) | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

Published

Name | Description
AutoClose | Used to close OCI cursor after fetching all rows.
CacheLobs | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues | Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate value.
DeferredLobRead | Used to fetch all Oracle 8 Lob values when they are explicitly requested.
ExtendedFieldsInfo | Used to perform an additional query to get information about returned fields and the tables they belong to.
FieldsAsString | Used to treat all non-BLOB fields as being of string datatype.
FullRefresh | Used to refresh fields of all tables by the RefreshRecord method.
KeepPrepared (inherited from TOraDataSetOptionsDS) | Used to keep TOraDataSet prepared after closing.
PrefetchRows | Used to get or set the number of rows that OCI prefetches when executing a query.
PrepareUpdateSQL | Used to automatically prepare update queries before execution.
RawAsString | Used to treat all RAW fields as being of string datatype.
ReflectChangeNotify | Used for a dataset component to refresh its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.
ScrollableCursor | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.
TemporaryLobUpdate | Temporary LOBs are used to write input and input/output LOB parameters into database when executing dataset's SQL statements.

See Also

  • TOraDataSetOptions Class
  • TOraDataSetOptions Class Members


TOraDataSetOptions.AutoClose Property

TOraDataSetOptions.AutoClose Property

Used to close OCI cursor after fetching all rows.

Class

TOraDataSetOptions

Syntax

property AutoClose: boolean stored True;

Remarks

Use the AutoClose property for TOraDataSet to close OCI cursor after fetching all rows. Allows reducing the number of opened cursors on the server.


TOraDataSetOptions.CacheLobs Property

TOraDataSetOptions.CacheLobs Property

Used to allocate local memory buffer to hold a copy of the Lob content.

Class

TOraDataSetOptions

Syntax

property CacheLobs: boolean stored True;

Remarks

If True, (the default value) then local memory buffer is allocated to hold a copy of the Lob content. If this option is set to False, it is highly recommended to set the DeferredLobRead option to True. Otherwise, LOB values are fetched to the dataset, and it can result in performance loss.

Note: The CacheLobs option controls the way Lob objects are handled while an application fetches records from the database. Setting CacheLobs to False may bring up the following benefits for time-critical applications: reduced traffic over the network since Lob objects are only transferred on demand; less memory is needed on the client side because returned record sets do not hold contents of the Lob fields. Actual value for the Lob field is passed to the client only when a data-aware control requests it.


TOraDataSetOptions.DefaultValues Property

TOraDataSetOptions.DefaultValues Property

Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate value.

Class

TOraDataSetOptions

Syntax

property DefaultValues: boolean stored True;

Remarks

If True, TOraDataSet fills the DefaultExpression property of TField objects by appropriate value.


TOraDataSetOptions.DeferredLobRead Property

TOraDataSetOptions.DeferredLobRead Property

Used to fetch all Oracle 8 Lob values when they are explicitly requested.

Class

TOraDataSetOptions

Syntax

property DeferredLobRead: boolean stored True;

Remarks

If True, all Oracle 8 Lob values are only fetched when they are explicitly requested. Otherwise entire record set with any Lob values is returned when dataset is opened. Whether Lob values are cached locally to be reused later or not is controlled by CacheLobs option.


TOraDataSetOptions.ExtendedFieldsInfo Property

TOraDataSetOptions.ExtendedFieldsInfo Property

Used to perform an additional query to get information about returned fields and the tables they belong to.

Class

TOraDataSetOptions

Syntax

property ExtendedFieldsInfo: boolean;

Remarks

If True, an additional query is performed to get information about returned fields and the tables they belong to. True by default for TSmartQuery, and False by default for other TOraDataSet descendants.


TOraDataSetOptions.FieldsAsString Property

TOraDataSetOptions.FieldsAsString Property

Used to treat all non-BLOB fields as being of string datatype.

Class

TOraDataSetOptions

Syntax

property FieldsAsString: boolean stored True;

Remarks

If True, all non-BLOB fields are treated as being of string datatype.


TOraDataSetOptions.FullRefresh Property

TOraDataSetOptions.FullRefresh Property

Used to refresh fields of all tables by the RefreshRecord method.

Class

TOraDataSetOptions

Syntax

property FullRefresh: boolean;

Remarks

Set the FullRefresh property to True to refresh fields of all tables by the RefreshRecord method. To perform full refreshing TCustomSmartQuery executes modified SELECT statement defined by the SQL property. When FullRefresh is False TCustomSmartQuery performs refreshing fields of the updating table only. The default value is False.


TOraDataSetOptions.PrefetchRows Property

TOraDataSetOptions.PrefetchRows Property

Used to get or set the number of rows that OCI prefetches when executing a query.

Class

TOraDataSetOptions

Syntax

property PrefetchRows: integer default 1;

Remarks

Use the PrefetchRows property to get or set the number of rows that OCI prefetches when executing a query. Setting a value greater than 0 for this option minimizes server round trip count, what increases performance of the application. By default the value of this options is 1 - OCI always prefetches one extra row.

Note: Some queries (for example, query SELECT * FROM DUAL CONNECT BY LEVEL <= 5 returns 1 row when prefetch is enabled, and 5 rows when it is disabled) can return invalid rows count when prefetch is enabled.


TOraDataSetOptions.PrepareUpdateSQL Property

TOraDataSetOptions.PrepareUpdateSQL Property

Used to automatically prepare update queries before execution.

Class

TOraDataSetOptions

Syntax

property PrepareUpdateSQL: boolean;

Remarks

If True, update queries are automatically prepared before executing.


TOraDataSetOptions.RawAsString Property

TOraDataSetOptions.RawAsString Property

Used to treat all RAW fields as being of string datatype.

Class

TOraDataSetOptions

Syntax

property RawAsString: boolean stored True;

Remarks

If True, all RAW fields are treated as being of string datatype, i.e. represented as hexadecimal string.


TOraDataSetOptions.ReflectChangeNotify Property

TOraDataSetOptions.ReflectChangeNotify Property

Used for a dataset component to refresh its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.

Class

TOraDataSetOptions

Syntax

property ReflectChangeNotify: boolean default False;

Remarks

If True and the TOraDataSet.ChangeNotification property is set, dataset component refreshes its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.


TOraDataSetOptions.ScrollableCursor Property

TOraDataSetOptions.ScrollableCursor Property

Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.

Class

TOraDataSetOptions

Syntax

property ScrollableCursor: boolean stored True;

Remarks

If True, TOraDataSet does not cache data on the client side but uses scrollable server cursor (available since Oracle 9 only). This option can be used to reduce memory usage, because dataset stores only current fetched block. Unlike the TCustomDADataSet.UniDirectional option ScrollableCursor allows bidirectional dataset navigation. Note that scrollable cursor is read-only by its nature.


TOraDataSetOptions.TemporaryLobUpdate Property

TOraDataSetOptions.TemporaryLobUpdate Property

Temporary LOBs are used to write input and input/output LOB parameters into database when executing dataset's SQL statements.

Class

TOraDataSetOptions

Syntax

property TemporaryLobUpdate: boolean default False;

Remarks

Set the TemporaryLobUpdate property to True to use temporary LOBs to write input and input/output LOB parameters into database when executing dataset's SQL statements.

Note: CacheLobs option controls the way Lob objects are handled while the application fetches records from the database. Setting CacheLobs to False may bring up the following benefits for time-critical applications: reduced traffic over the network since Lob objects are only transferred on demand; less memory is needed on the client side because returned record sets do not hold contents of Lob fields. Actual value for the Lob field is passed to the client only when a data-aware control requests it.


TOraDataSetOptionsDS Class

TOraDataSetOptionsDS Class

This class allows setting up the behaviour of the TOraDaatSet class (this property is obsolete).

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

Unit

Ora

Syntax

TOraDataSetOptionsDS = class(TDADataSetOptions);

Remarks

Note: The OptionsDS property is obsolete. It is provided for backward compatibility only.

Inheritance Hierarchy

TObject
TPersistent
TDADataSetOptions
TOraDataSetOptionsDS


TOraDataSetOptionsDS Members

TOraDataSetOptionsDS Members

TOraDataSetOptionsDS class overview.

Properties

Name | Description
AutoClose | Used to close OCI cursor after fetching all rows.
AutoPrepare (inherited from TDADataSetOptions) | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields (inherited from TDADataSetOptions) | Used to enable caching of the TField.Calculated and TField.Lookup fields.
CacheLobs | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues | Used for TOraDataSet to fill the DefaultExpression property of TField objects with the appropriate value.
DeferredLobRead | Used fetch all Oracle 8 Lob values only when they are explicitly requested.
DetailDelay (inherited from TDADataSetOptions) | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsAsString | Used to treat all non-BLOB fields as being of string datatype.
FieldsOrigin (inherited from TDADataSetOptions) | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers (inherited from TDADataSetOptions) | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
KeepPrepared | Used to keep TOraDataSet prepared after closing.
LocalMasterDetail (inherited from TDADataSetOptions) | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings (inherited from TDADataSetOptions) | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange (inherited from TDADataSetOptions) | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount (inherited from TDADataSetOptions) | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames (inherited from TDADataSetOptions) | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RawAsString | Used to treat all RAW fields as being of string datatype.
RemoveOnRefresh (inherited from TDADataSetOptions) | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields (inherited from TDADataSetOptions) | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams (inherited from TDADataSetOptions) | Used to return the new value of fields to dataset after insert or update.
ScrollableCursor | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.
SetFieldsReadOnly (inherited from TDADataSetOptions) | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate (inherited from TDADataSetOptions) | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar (inherited from TDADataSetOptions) | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields (inherited from TDADataSetOptions) | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize (inherited from TDADataSetOptions) | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.


TOraDataSetOptionsDS Properties

TOraDataSetOptionsDS Properties

Properties of the TOraDataSetOptionsDS class.

For a complete list of the TOraDataSetOptionsDS class members, see the TOraDataSetOptionsDS Members topic.

Public

Name | Description
AutoPrepare (inherited from TDADataSetOptions) | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields (inherited from TDADataSetOptions) | Used to enable caching of the TField.Calculated and TField.Lookup fields.
DetailDelay (inherited from TDADataSetOptions) | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsOrigin (inherited from TDADataSetOptions) | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers (inherited from TDADataSetOptions) | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
LocalMasterDetail (inherited from TDADataSetOptions) | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings (inherited from TDADataSetOptions) | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange (inherited from TDADataSetOptions) | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount (inherited from TDADataSetOptions) | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames (inherited from TDADataSetOptions) | Used for TCustomDADataSet to quote all database object names in autogenerated SQL statements such as update SQL.
RemoveOnRefresh (inherited from TDADataSetOptions) | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields (inherited from TDADataSetOptions) | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams (inherited from TDADataSetOptions) | Used to return the new value of fields to dataset after insert or update.
SetFieldsReadOnly (inherited from TDADataSetOptions) | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate (inherited from TDADataSetOptions) | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar (inherited from TDADataSetOptions) | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields (inherited from TDADataSetOptions) | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize (inherited from TDADataSetOptions) | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

Published

Name | Description
AutoClose | Used to close OCI cursor after fetching all rows.
CacheLobs | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues | Used for TOraDataSet to fill the DefaultExpression property of TField objects with the appropriate value.
DeferredLobRead | Used fetch all Oracle 8 Lob values only when they are explicitly requested.
FieldsAsString | Used to treat all non-BLOB fields as being of string datatype.
KeepPrepared | Used to keep TOraDataSet prepared after closing.
RawAsString | Used to treat all RAW fields as being of string datatype.
ScrollableCursor | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.

See Also

  • TOraDataSetOptionsDS Class
  • TOraDataSetOptionsDS Class Members


TOraDataSetOptionsDS.AutoClose Property

TOraDataSetOptionsDS.AutoClose Property

Used to close OCI cursor after fetching all rows.

Class

TOraDataSetOptionsDS

Syntax

property AutoClose: boolean stored False default False;

Remarks

Use the AutoClose property for TOraDataSet to close OCI cursor after fetching all rows. Allows to reduce the number of opened cursors on the server.


TOraDataSetOptionsDS.CacheLobs Property

TOraDataSetOptionsDS.CacheLobs Property

Used to allocate local memory buffer to hold a copy of the Lob content.

Class

TOraDataSetOptionsDS

Syntax

property CacheLobs: boolean stored False default True;

Remarks

If True, (the default value) then local memory buffer is allocated to hold a copy of the Lob content. See the notes below for further details.

Note: CacheLobs option controls the way Lob objects are handled while the application fetches records from the database. Setting CacheLobs to False may bring up the following benefits for time-critical applications: reduced traffic over the network since Lob objects are only transferred on demand; less memory is needed on the client side because returned record sets do not hold contents of Lob fields. Actual value for the Lob field is passed to the client only when a data-aware control requests it.


TOraDataSetOptionsDS.DefaultValues Property

TOraDataSetOptionsDS.DefaultValues Property

Used for TOraDataSet to fill the DefaultExpression property of TField objects with the appropriate value.

Class

TOraDataSetOptionsDS

Syntax

property DefaultValues: boolean stored False;

Remarks

If True, TOraDataSet fills the DefaultExpression property of TField objects with the appropriate value.


TOraDataSetOptionsDS.DeferredLobRead Property

TOraDataSetOptionsDS.DeferredLobRead Property

Used fetch all Oracle 8 Lob values only when they are explicitly requested.

Class

TOraDataSetOptionsDS

Syntax

property DeferredLobRead: boolean stored False default False;

Remarks

If True, all Oracle 8 Lob values are only fetched when they are explicitly requested. Otherwise entire record set with any Lob values is returned when dataset is opened. Whether Lob values are cached locally to be reused later or not is controlled by CacheLobs option.


TOraDataSetOptionsDS.FieldsAsString Property

TOraDataSetOptionsDS.FieldsAsString Property

Used to treat all non-BLOB fields as being of string datatype.

Class

TOraDataSetOptionsDS

Syntax

property FieldsAsString: boolean stored False default False;

Remarks

If True, all non-BLOB fields are treated as being of string datatype.


TOraDataSetOptionsDS.KeepPrepared Property

TOraDataSetOptionsDS.KeepPrepared Property

Used to keep TOraDataSet prepared after closing.

Class

TOraDataSetOptionsDS

Syntax

property KeepPrepared: boolean stored False;

Remarks

If True, TOraDataSet remains prepared after closing. It allows to avoid needless reopening cursor on the server.


TOraDataSetOptionsDS.RawAsString Property

TOraDataSetOptionsDS.RawAsString Property

Used to treat all RAW fields as being of string datatype.

Class

TOraDataSetOptionsDS

Syntax

property RawAsString: boolean stored False default False;

Remarks

If True, all RAW fields are treated as being of string datatype, i.e. represented as hexadecimal string.


TOraDataSetOptionsDS.ScrollableCursor Property

TOraDataSetOptionsDS.ScrollableCursor Property

Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.

Class

TOraDataSetOptionsDS

Syntax

property ScrollableCursor: boolean stored False default False;

Remarks

If True, TOraDataSet does not cache data on the client side but uses scrollable server cursor (available since Oracle 9 only). This option can be used to reduce memory usage, because dataset stores only current fetched block. Unlike the TCustomDADataSet.UniDirectional option ScrollableCursor allows bidirectional dataset navigation. Note that scrollable cursor is read-only by its nature.


TOraDataSource Class

TOraDataSource Class

TOraDataSource provides an interface between an ODAC dataset components and data-aware controls on a form.

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

Unit

Ora

Syntax

TOraDataSource = class(TCRDataSource);

Remarks

TOraDataSource provides an interface between an ODAC dataset components and data-aware controls on a form.

TOraDataSource inherits its functionality directly from the TDataSource component.

At design-time assign individual data-aware components' DataSource properties from their drop-down listboxes.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSource
TCRDataSource
TOraDataSource


TOraDataSource Members

TOraDataSource Members

TOraDataSource class overview.


TOraIntervalField Class

TOraIntervalField Class

A class providing access to the Oracle interval fields.

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

Unit

Ora

Syntax

TOraIntervalField = class(TField);

Remarks

TOraIntervalField provides access to the Oracle interval fields. Unlike other TField descendants the TOraIntervalField.DataType property has two valid values ftIntervalYM and ftIntervalDS depending on the type of the interval.

You can access actual interval value using properties AsString and AsOraInterval properties.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TOraIntervalField

See Also

  • TOraInterval


TOraIntervalField Members

TOraIntervalField Members

TOraIntervalField class overview.

Properties

Name | Description
AsInterval | Used to provide access to a TOraInterval object.
FracPrecision | Used to get or set the number of digits used to represent fractional seconds when getting interval value as string.
LeadPrecision | Used to get or set the number of digits that are used to represent the leading interval part when getting the interval value as string.


TOraIntervalField Properties

TOraIntervalField Properties

Properties of the TOraIntervalField class.

For a complete list of the TOraIntervalField class members, see the TOraIntervalField Members topic.

Public

Name | Description
AsInterval | Used to provide access to a TOraInterval object.

Published

Name | Description
FracPrecision | Used to get or set the number of digits used to represent fractional seconds when getting interval value as string.
LeadPrecision | Used to get or set the number of digits that are used to represent the leading interval part when getting the interval value as string.

See Also

  • TOraIntervalField Class
  • TOraIntervalField Class Members


TOraIntervalField.AsInterval Property

TOraIntervalField.AsInterval Property

Used to provide access to a TOraInterval object.

Class

TOraIntervalField

Syntax

property AsInterval: TOraInterval;

Remarks

Use the AsInterval property to provide access to a TOraInterval object you can use for manipulations with the interval value.

See Also

  • TOraInterval


TOraIntervalField.FracPrecision Property

TOraIntervalField.FracPrecision Property

Used to get or set the number of digits used to represent fractional seconds when getting interval value as string.

Class

TOraIntervalField

Syntax

property FracPrecision: integer default 6;

Remarks

Use the FracPrecision property to get or set the number of digits used to represent fractional seconds when getting interval value as string. This property affects only INTERVAL DAY TO SECOND (ftIntervalDS). The default value of the property is 6.

See Also

  • TOraInterval.FracPrecision
  • TOraInterval.AsString


TOraIntervalField.LeadPrecision Property

TOraIntervalField.LeadPrecision Property

Used to get or set the number of digits that are used to represent the leading interval part when getting the interval value as string.

Class

TOraIntervalField

Syntax

property LeadPrecision: integer default 2;

Remarks

Use the LeadPrecision property to get or set the number of digits that are used to represent the leading interval part when getting the interval value as string. The default value of the property is 2.

See Also

  • TOraInterval.LeadPrecision
  • TOraInterval.AsString


TOraMetaData Class

TOraMetaData Class

A component for obtaining metainformation about database objects from the server.

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

Unit

Ora

Syntax

TOraMetaData = class(TDAMetaData);

Remarks

The TOraMetaData component is used to obtain metainformation from the server about objects in the database, such as tables, table columns, stored procedures, etc.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TDAMetaData
TOraMetaData

See Also

  • TCustomDADataSet.Debug
  • TCustomDASQL.Debug
  • Using DBMonitor


TOraMetaData Members

TOraMetaData Members

TOraMetaData class overview.

Properties

Name | Description
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
Connection (inherited from TDAMetaData) | Used to specify a connection object to use to connect to a data store.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
MetaDataKind (inherited from TDAMetaData) | Used to specify which kind of metainformation to show.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
Restrictions (inherited from TDAMetaData) | Used to provide one or more conditions restricting the list of objects to be described.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetMetaDataKinds (inherited from TDAMetaData) | Used to get values acceptable in the MetaDataKind property.
GetRestrictions (inherited from TDAMetaData) | Used to find out which restrictions are applicable to a certain MetaDataKind.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TOraNestedTable Class

TOraNestedTable Class

A component for controlling nested table data.

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

Unit

Ora

Syntax

TOraNestedTable = class(TMemDataSet);

Remarks

Nested table is a dataset component that encapsulates a database table that is nested as a field within another table. Use TOraNestedTable to access data contained in a nested dataset. A nested table provides much of the functionality of a table component, with the difference that the data it accesses is stored in a nested table.

TOraNestedTable is derived from the TMemDataSet component.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TOraNestedTable

See Also

  • TOraNestTable
  • TOraRef


TOraNestedTable Members

TOraNestedTable Members

TOraNestedTable class overview.

Properties

Name | Description
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
Ref | Used to assign reference data to TOraNestedTable.
Table | Used to assign nested table data to TOraNestedTable.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TOraNestedTable Properties

TOraNestedTable Properties

Properties of the TOraNestedTable class.

For a complete list of the TOraNestedTable class members, see the TOraNestedTable Members topic.

Public

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
Ref | Used to assign reference data to TOraNestedTable.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
Table | Used to assign nested table data to TOraNestedTable.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TOraNestedTable Class
  • TOraNestedTable Class Members


TOraNestedTable.Ref Property

TOraNestedTable.Ref Property

Used to assign reference data to TOraNestedTable.

Class

TOraNestedTable

Syntax

property Ref: TOraRef;

Remarks

Use the Ref property to assign reference data to TOraNestedTable. After assigning you can call the Open method to browse the reference data.

See Also

  • TOraRef
  • TOraParam.AsRef
  • TOraDataSet.GetRef


TOraNestedTable.Table Property

TOraNestedTable.Table Property

Used to assign nested table data to TOraNestedTable.

Class

TOraNestedTable

Syntax

property Table: TOraNestTable;

Remarks

Use the Table property to assign nested table data to TOraNestedTable. After assigning you can call the Open method to browse the nested table data.

Example

OraNestedTable1.Table := OraSQL1.ParamByName('Content').AsTable;
OraNestedTable1.Open;

See Also

  • TOraNestTable
  • TOraParam.AsTable
  • TOraDataSet.GetTable


TOraNumberField Class

TOraNumberField Class

A class providing access to the Oracle number fields.

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

Unit

Ora

Syntax

TOraNumberField = class(TNumericField);

Remarks

TOraNumberField provides access to Oracle number fields. The TOraNumberField.DataType property values equals to ftNumber.

You can access actual number value using AsString, AsInteger and AsFloat properties.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TNumericField
TOraNumberField

See Also

  • TOraNumber


TOraNumberField Members

TOraNumberField Members

TOraNumberField class overview.

Properties

Name | Description
AsNumber | Used to provide access to a TOraNumber object.


TOraNumberField Properties

TOraNumberField Properties

Properties of the TOraNumberField class.

For a complete list of the TOraNumberField class members, see the TOraNumberField Members topic.

Public

Name | Description
AsNumber | Used to provide access to a TOraNumber object.

See Also

  • TOraNumberField Class
  • TOraNumberField Class Members


TOraNumberField.AsNumber Property

TOraNumberField.AsNumber Property

Used to provide access to a TOraNumber object.

Class

TOraNumberField

Syntax

property AsNumber: TOraNumber;

Remarks

Use the AsNumber property to provide access to a TOraNumber object that you can use for manipulations with the number value.

See Also

  • TOraNumber


TOraParam Class

TOraParam Class

A class that is used to set the values of individual parameters passed with queries or stored procedures.

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

Unit

Ora

Syntax

TOraParam = class(TDAParam);

Remarks

Use the properties of TOraParam to set the value of a parameter. Objects that use parameters create TOraParam objects to represent these parameters. For example, TOraParam objects are used by TOraSQL, TCustomOraDataSet.

TOraParam shares many properties with TField, as both describe the value of a field in a dataset. However, a TField object has several properties to describe the field binding, and how the field is displayed, edited, or calculated that are not needed in a TOraParam object. Conversely, TOraParam includes properties that indicate how the field value is passed as a parameter.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TParam
TDAParam
TOraParam

See Also

  • TOraDataSet
  • TOraSQL
  • TOraParams


TOraParam Members

TOraParam Members

TOraParam class overview.

Properties

Name | Description
AsArray | Used to specify the value of the parameter when it represents the value of the Oracle array type.
AsBFile | Used to specify the value of the parameter when it represents the value of the Oracle BFile type.
AsBlob (inherited from TDAParam) | Used to set and read the value of the BLOB parameter as string.
AsBLOBLocator | Used to specify the value of a parameter when it represents the value of the BLOB type.
AsBlobRef (inherited from TDAParam) | Used to set and read the value of the BLOB parameter as a TBlob object.
AsCLOBLocator | Used to specify the value of the parameter when it represents the value of CLOB type.
AsCursor | Used to specify the value of the parameter when it represents the value of the PL/SQL REF CURSOR type.
AsFloat (inherited from TDAParam) | Used to assign the value for a float field to a parameter.
AsInteger (inherited from TDAParam) | Used to assign the value for an integer field to the parameter.
AsInterval | Used to specify the parameter value when it represents Oracle 9 interval type.
AsLargeInt (inherited from TDAParam) | Used to assign the value for a LargeInteger field to the parameter.
AsMemo (inherited from TDAParam) | Used to assign the value for a memo field to the parameter.
AsMemoRef (inherited from TDAParam) | Used to set and read the value of the memo parameter as a TBlob object.
AsNumber | Used to specify the value of the parameter when it represents the value of the Oracle internal number type.
AsObject | Used to specify the value of the parameter when it represents the value of the Oracle object type.
AsOraBlob | Used to specify the value of a parameter when it represents the value of the BLOB type.
AsOraClob | Used to specify the value of the parameter when it represents the value of CLOB type.
AsRef | UIsed to specify the value of the parameter when it represents the value of the Oracle reference type.
AsSQLTimeStamp (inherited from TDAParam) | Used to specify the value of the parameter when it represents a SQL timestamp field.
AsString (inherited from TDAParam) | Used to assign the string value to the parameter.
AsTable | Used to specify the value of the parameter when it represents the value of the Oracle nested table type.
AsTimeStamp | Used to sspecify parameter value when it represents Oracle 9 timestamp type.
AsWideString (inherited from TDAParam) | Used to assign the Unicode string value to the parameter.
AsXML | Used to specify the value of the parameter when it represents the value of Oracle SYS.XMLTYPE.
DataType (inherited from TDAParam) | Indicates the data type of the parameter.
IsNull (inherited from TDAParam) | Used to indicate whether the value assigned to a parameter is NULL.
ItemAsDateTime | Used to access a PL/SQL table item as TDateTime by Index.
ItemAsFloat | Used to access a PL/SQL table item as Double by Index.
ItemAsInteger | Used to access a PL/SQL table item as Integer by Index.
ItemAsInterval | Used to access a PL/SQL table item as TOraInterval by Index.
ItemAsString | Used to access a PL/SQL table item as String by Index.
ItemAsTimeStamp | Used to access a PL/SQL table item as TOraTimeStamp by Index.
ItemIsNull | Used to indicate if an item value is Null.
ItemText | Allows to modify data without changing its type.
ItemValue | Used to access the item value as variant.
Length | Used to determine the maximum length of a PL/SQL table parameter.
National | Used to determine whether the parameter is in National charset.
ParamType (inherited from TDAParam) | Used to indicate the type of use for a parameter.
Size (inherited from TDAParam) | Specifies the size of a string type parameter.
Table | Used to determine if the parameter is a PL/SQL table.
Value (inherited from TDAParam) | Used to represent the value of the parameter as Variant.

Methods

Name | Description
AssignField (inherited from TDAParam) | Assigns field name and field value to a param.
AssignFieldValue (inherited from TDAParam) | Assigns the specified field properties and value to a parameter.
ItemClear | Assigns a NULL value to a table parameter item.
LoadFromFile (inherited from TDAParam) | Places the content of a specified file into a TDAParam object.
LoadFromStream (inherited from TDAParam) | Places the content from a stream into a TDAParam object.
SetBlobData | Sets the parameter value from the memory buffer.


TOraParam Properties

TOraParam Properties

Properties of the TOraParam class.

For a complete list of the TOraParam class members, see the TOraParam Members topic.

Public

Name | Description
AsArray | Used to specify the value of the parameter when it represents the value of the Oracle array type.
AsBFile | Used to specify the value of the parameter when it represents the value of the Oracle BFile type.
AsBlob (inherited from TDAParam) | Used to set and read the value of the BLOB parameter as string.
AsBLOBLocator | Used to specify the value of a parameter when it represents the value of the BLOB type.
AsBlobRef (inherited from TDAParam) | Used to set and read the value of the BLOB parameter as a TBlob object.
AsCLOBLocator | Used to specify the value of the parameter when it represents the value of CLOB type.
AsCursor | Used to specify the value of the parameter when it represents the value of the PL/SQL REF CURSOR type.
AsFloat (inherited from TDAParam) | Used to assign the value for a float field to a parameter.
AsInteger (inherited from TDAParam) | Used to assign the value for an integer field to the parameter.
AsInterval | Used to specify the parameter value when it represents Oracle 9 interval type.
AsLargeInt (inherited from TDAParam) | Used to assign the value for a LargeInteger field to the parameter.
AsMemo (inherited from TDAParam) | Used to assign the value for a memo field to the parameter.
AsMemoRef (inherited from TDAParam) | Used to set and read the value of the memo parameter as a TBlob object.
AsNumber | Used to specify the value of the parameter when it represents the value of the Oracle internal number type.
AsObject | Used to specify the value of the parameter when it represents the value of the Oracle object type.
AsOraBlob | Used to specify the value of a parameter when it represents the value of the BLOB type.
AsOraClob | Used to specify the value of the parameter when it represents the value of CLOB type.
AsRef | UIsed to specify the value of the parameter when it represents the value of the Oracle reference type.
AssignField (inherited from TDAParam) | Assigns field name and field value to a param.
AssignFieldValue (inherited from TDAParam) | Assigns the specified field properties and value to a parameter.
AsSQLTimeStamp (inherited from TDAParam) | Used to specify the value of the parameter when it represents a SQL timestamp field.
AsString (inherited from TDAParam) | Used to assign the string value to the parameter.
AsTable | Used to specify the value of the parameter when it represents the value of the Oracle nested table type.
AsTimeStamp | Used to sspecify parameter value when it represents Oracle 9 timestamp type.
AsWideString (inherited from TDAParam) | Used to assign the Unicode string value to the parameter.
AsXML | Used to specify the value of the parameter when it represents the value of Oracle SYS.XMLTYPE.
IsNull (inherited from TDAParam) | Used to indicate whether the value assigned to a parameter is NULL.
ItemAsDateTime | Used to access a PL/SQL table item as TDateTime by Index.
ItemAsFloat | Used to access a PL/SQL table item as Double by Index.
ItemAsInteger | Used to access a PL/SQL table item as Integer by Index.
ItemAsInterval | Used to access a PL/SQL table item as TOraInterval by Index.
ItemAsString | Used to access a PL/SQL table item as String by Index.
ItemAsTimeStamp | Used to access a PL/SQL table item as TOraTimeStamp by Index.
ItemIsNull | Used to indicate if an item value is Null.
ItemText | Allows to modify data without changing its type.
ItemValue | Used to access the item value as variant.
LoadFromFile (inherited from TDAParam) | Places the content of a specified file into a TDAParam object.
LoadFromStream (inherited from TDAParam) | Places the content from a stream into a TDAParam object.
SetBlobData (inherited from TDAParam) | Overloaded. Writes the data from a specified buffer to BLOB.

Published

Name | Description
DataType (inherited from TDAParam) | Indicates the data type of the parameter.
Length | Used to determine the maximum length of a PL/SQL table parameter.
National | Used to determine whether the parameter is in National charset.
ParamType (inherited from TDAParam) | Used to indicate the type of use for a parameter.
Size (inherited from TDAParam) | Specifies the size of a string type parameter.
Table | Used to determine if the parameter is a PL/SQL table.
Value (inherited from TDAParam) | Used to represent the value of the parameter as Variant.

See Also

  • TOraParam Class
  • TOraParam Class Members


TOraParam.AsArray Property

TOraParam.AsArray Property

Used to specify the value of the parameter when it represents the value of the Oracle array type.

Class

TOraParam

Syntax

property AsArray: TOraArray;

Remarks

Use the AsArray property to specify the value of the parameter when it represents the value of the Oracle array type.

Setting AsArray will set the DataType property to ftArray.


TOraParam.AsBFile Property

TOraParam.AsBFile Property

Used to specify the value of the parameter when it represents the value of the Oracle BFile type.

Class

TOraParam

Syntax

property AsBFile: TOraFile;

Remarks

Use the AsBFile propery to specify the value of the parameter when it represents the value of the Oracle BFile type.

Setting AsBFile will set the DataType property to ftBFile.


TOraParam.AsBLOBLocator Property

TOraParam.AsBLOBLocator Property

Used to specify the value of a parameter when it represents the value of the BLOB type.

Class

TOraParam

Syntax

property AsBLOBLocator: TOraLob;

Remarks

Use the AsBLOBLocator property to specify the value of a parameter when it represents the value of the BLOB type.

Setting AsBlobLocator will set the DataType property to ftOraBlob.

Note: This property is obsolete, use AsOraBlob instead.

See Also

  • AsOraBlob


TOraParam.AsCLOBLocator Property

TOraParam.AsCLOBLocator Property

Used to specify the value of the parameter when it represents the value of CLOB type.

Class

TOraParam

Syntax

property AsCLOBLocator: TOraLob;

Remarks

Use the AsCLOBLocator property to specify the value of the parameter when it represents the value of CLOB type.

Setting AsClobLocator will set the DataType property to ftOraClob.

Note: This property is obsolete, use AsOraClob instead.

See Also

  • AsOraClob


TOraParam.AsCursor Property

TOraParam.AsCursor Property

Used to specify the value of the parameter when it represents the value of the PL/SQL REF CURSOR type.

Class

TOraParam

Syntax

property AsCursor: TOraCursor;

Remarks

Use the AsCursor property to specify the value of the parameter when it represents the value of the PL/SQL REF CURSOR type.

Setting AsCursor will set the DataType property to ftCursor.


TOraParam.AsInterval Property

TOraParam.AsInterval Property

Used to specify the parameter value when it represents Oracle 9 interval type.

Class

TOraParam

Syntax

property AsInterval: TOraInterval;

Remarks

Use the AsInterval property to specify the parameter value when it represents Oracle 9 interval type.

Setting AsInterval will set the DataType property to ftIntervalYM or ftIntervalDS depending on the TOraInterval.DescriptorType property value.

See Also

  • TOraInterval.DescriptorType


TOraParam.AsNumber Property

TOraParam.AsNumber Property

Used to specify the value of the parameter when it represents the value of the Oracle internal number type.

Class

TOraParam

Syntax

property AsNumber: TOraNumber;

Remarks

Use the AsNumber property to specify the value of the parameter when it represents the value of the Oracle internal number type.

Setting AsNumber will set the DataType property to ftNumber.


TOraParam.AsObject Property

TOraParam.AsObject Property

Used to specify the value of the parameter when it represents the value of the Oracle object type.

Class

TOraParam

Syntax

property AsObject: TOraObject;

Remarks

Use the AsObject propery to specify the value of the parameter when it represents the value of the Oracle object type.

Setting AsObject will set the DataType property to ftObject.


TOraParam.AsOraBlob Property

TOraParam.AsOraBlob Property

Used to specify the value of a parameter when it represents the value of the BLOB type.

Class

TOraParam

Syntax

property AsOraBlob: TOraLob;

Remarks

Use the AsOraBlob property to specify the value of the parameter when it represents the value of BLOB type.

Setting AsOraBlob will set the DataType property to ftOraBlob.


TOraParam.AsOraClob Property

TOraParam.AsOraClob Property

Used to specify the value of the parameter when it represents the value of CLOB type.

Class

TOraParam

Syntax

property AsOraClob: TOraLob;

Remarks

Use the AsOraClob property to specify the value of the parameter when it represents the value of the CLOB type.

Setting AsOraClob will set the DataType property to ftOraClob.


TOraParam.AsRef Property

TOraParam.AsRef Property

UIsed to specify the value of the parameter when it represents the value of the Oracle reference type.

Class

TOraParam

Syntax

property AsRef: TOraRef;

Remarks

Use the AsRef property to specify the value of the parameter when it represents the value of the Oracle reference type.

Setting AsRef will set the DataType property to ftReference.


TOraParam.AsTable Property

TOraParam.AsTable Property

Used to specify the value of the parameter when it represents the value of the Oracle nested table type.

Class

TOraParam

Syntax

property AsTable: TOraNestTable;

Remarks

Use the AsTable property to specify the value of the parameter when it represents the value of the Oracle nested table type.

Setting AsTable will set the DataType property to ftTable.


TOraParam.AsTimeStamp Property

TOraParam.AsTimeStamp Property

Used to sspecify parameter value when it represents Oracle 9 timestamp type.

Class

TOraParam

Syntax

property AsTimeStamp: TOraTimeStamp;

Remarks

Specifies parameter value when it represents Oracle 9 timestamp type.

Setting AsTimeStamp will set DataType property to ftTimestamp, ftTimestampTZ or ftTimestampLTZ depending on the TOraTimeStamp.DescriptorType property value.

See Also

  • TOraTimeStamp.DescriptorType


TOraParam.AsXML Property

TOraParam.AsXML Property

Used to specify the value of the parameter when it represents the value of Oracle SYS.XMLTYPE.

Class

TOraParam

Syntax

property AsXML: TOraXML;

Remarks

Use the AsXML property to specify the value of the parameter when it represents the value of Oracle SYS.XMLTYPE.

Setting AsXML will set the DataType property to ftXML.


TOraParam.ItemAsDateTime Property(Indexer)

TOraParam.ItemAsDateTime Property(Indexer)

Used to access a PL/SQL table item as TDateTime by Index.

Class

TOraParam

Syntax

property ItemAsDateTime[Index: integer]: TDateTime;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemAsDateTime property to access a PL/SQL table item by Index. Returns the table item as a TDateTime value.

Index starts with 1. The index value cannot be greater than the Length value.

See Also

  • Table


TOraParam.ItemAsFloat Property(Indexer)

TOraParam.ItemAsFloat Property(Indexer)

Used to access a PL/SQL table item as Double by Index.

Class

TOraParam

Syntax

property ItemAsFloat[Index: integer]: double;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemAsFloat property to access a PL/SQL table item by Index. Returns the table item as a Double value.

Index starts with 1. The index value cannot be greater than the Length value.

See Also

  • Table


TOraParam.ItemAsInteger Property(Indexer)

TOraParam.ItemAsInteger Property(Indexer)

Used to access a PL/SQL table item as Integer by Index.

Class

TOraParam

Syntax

property ItemAsInteger[Index: integer]: integer;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemAsInteger property to access a PL/SQL table item by Index. Returns the table item as a Integer value.

Index starts with 1. The index value cannot be greater than the Length value.

See Also

  • Table


TOraParam.ItemAsInterval Property(Indexer)

TOraParam.ItemAsInterval Property(Indexer)

Used to access a PL/SQL table item as TOraInterval by Index.

Class

TOraParam

Syntax

property ItemAsInterval[Index: integer]: TOraInterval;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemAsInterval property to access a PL/SQL table item by Index. Returns the table item as a TOraInterval value.

Index starts with 1. The index value cannot be greater than the Length value.

See Also

  • Table


TOraParam.ItemAsString Property(Indexer)

TOraParam.ItemAsString Property(Indexer)

Used to access a PL/SQL table item as String by Index.

Class

TOraParam

Syntax

property ItemAsString[Index: integer]: string;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemAsString property to access a PL/SQL table item by Index. Returns the table item as a String value.

Index starts with 1. The index value cannot be greater than the Length value.

See Also

  • Table


TOraParam.ItemAsTimeStamp Property(Indexer)

TOraParam.ItemAsTimeStamp Property(Indexer)

Used to access a PL/SQL table item as TOraTimeStamp by Index.

Class

TOraParam

Syntax

property ItemAsTimeStamp[Index: integer]: TOraTimeStamp;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemAsTimeStamp property to access a PL/SQL table item by Index. Returns the table item as a TOraTimeStamp value.

Index starts with 1. The index value cannot be greater than the Length value.

See Also

  • Table


TOraParam.ItemIsNull Property(Indexer)

TOraParam.ItemIsNull Property(Indexer)

Used to indicate if an item value is Null.

Class

TOraParam

Syntax

property ItemIsNull[Index: integer]: boolean;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemIsNull property to access PL/SQL table item by Index. Returns True, if the item value is Null.

Index starts with 1. The index value cannot be greater than Length value.

See Also

  • Table


TOraParam.ItemText Property(Indexer)

TOraParam.ItemText Property(Indexer)

Allows to modify data without changing its type.

Class

TOraParam

Syntax

property ItemText[Index: integer]: string;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemText property to access PL/SQL table item by Index.

Index starts with 1 and lasts till Length.

Modifying Items using ItemText doesn't affect DataType property.


TOraParam.ItemValue Property(Indexer)

TOraParam.ItemValue Property(Indexer)

Used to access the item value as variant.

Class

TOraParam

Syntax

property ItemValue[Index: integer]: variant;

Parameters
Index
Holds the index of a PL/SQL table item.

Remarks

Use the ItemValue property to access PL/SQL table item by Index. Returns the item value.

Index starts with 1. The index value cannot be greater than Length value.

See Also

  • Table


TOraParam.Length Property

TOraParam.Length Property

Used to determine the maximum length of a PL/SQL table parameter.

Class

TOraParam

Syntax

property Length: integer default 1;

Remarks

Use the Length property to determine the maximum length of a PL/SQL table parameter. For a scalar parameter Length is always 1.

Remember that you can use ItemAsInteger, ItemAsString and other similar properties for PL/SQL tables only.

See Also

  • Table


TOraParam.National Property

TOraParam.National Property

Used to determine whether the parameter is in National charset.

Class

TOraParam

Syntax

property National: Boolean default False;

Remarks

Use the National property to determine or set whether a parameter is in National character set. When National is True, the parameter is in National character set, otherwise the parameter is in default characterset.

The parameter datatype must be one of the following: ftString, ftFixedChar, ftWideString, ftMemo or ftFixedWideChar.

Supported with Oracle 8 and higher, not supported in Direct mode.


TOraParam.Table Property

TOraParam.Table Property

Used to determine if the parameter is a PL/SQL table.

Class

TOraParam

Syntax

property Table: boolean default False;

Remarks

Set the Table property to True when parameter is a PL/SQL table. The maximum length of the table can be set by the Length property. Table may be ftString, ftInteger, ftFloat or ftDate type only. To access an item of a table use the ItemAsString, ItemAsInteger, ItemAsFloat, ItemAsDateTime and ItemIsNull properties.

See Also

  • Length


TOraParam Methods

TOraParam Methods

Methods of the TOraParam class.

For a complete list of the TOraParam class members, see the TOraParam Members topic.

Public

Name | Description
AsBlob (inherited from TDAParam) | Used to set and read the value of the BLOB parameter as string.
AsBlobRef (inherited from TDAParam) | Used to set and read the value of the BLOB parameter as a TBlob object.
AsFloat (inherited from TDAParam) | Used to assign the value for a float field to a parameter.
AsInteger (inherited from TDAParam) | Used to assign the value for an integer field to the parameter.
AsLargeInt (inherited from TDAParam) | Used to assign the value for a LargeInteger field to the parameter.
AsMemo (inherited from TDAParam) | Used to assign the value for a memo field to the parameter.
AsMemoRef (inherited from TDAParam) | Used to set and read the value of the memo parameter as a TBlob object.
AssignField (inherited from TDAParam) | Assigns field name and field value to a param.
AssignFieldValue (inherited from TDAParam) | Assigns the specified field properties and value to a parameter.
AsSQLTimeStamp (inherited from TDAParam) | Used to specify the value of the parameter when it represents a SQL timestamp field.
AsString (inherited from TDAParam) | Used to assign the string value to the parameter.
AsWideString (inherited from TDAParam) | Used to assign the Unicode string value to the parameter.
IsNull (inherited from TDAParam) | Used to indicate whether the value assigned to a parameter is NULL.
ItemClear | Assigns a NULL value to a table parameter item.
LoadFromFile (inherited from TDAParam) | Places the content of a specified file into a TDAParam object.
LoadFromStream (inherited from TDAParam) | Places the content from a stream into a TDAParam object.
SetBlobData | Sets the parameter value from the memory buffer.

Published

Name | Description
DataType (inherited from TDAParam) | Indicates the data type of the parameter.
ParamType (inherited from TDAParam) | Used to indicate the type of use for a parameter.
Size (inherited from TDAParam) | Specifies the size of a string type parameter.
Value (inherited from TDAParam) | Used to represent the value of the parameter as Variant.

See Also

  • TOraParam Class
  • TOraParam Class Members


TOraParam.ItemClear Method

TOraParam.ItemClear Method

Assigns a NULL value to a table parameter item.

Class

TOraParam

Syntax

procedure ItemClear(Index: integer);

Parameters
Index
Holds the item index.

Remarks

Call the ItemClear method to assign a NULL value to a table parameter item.

Index starts with 1 and lasts till Length.


TOraParam.SetBlobData Method

TOraParam.SetBlobData Method

Sets the parameter value from the memory buffer.

Class

TOraParam

Syntax

procedure SetBlobData(Buffer: IntPtr; Size: integer);

Parameters
Buffer
Holds the pointer to the data.
Size
Holds the buffer size.

Remarks

Use the SetBlobData method to set the parameter value from the memory buffer. After this procedure call DataType property is assigned to ftBlob.


TOraParams Class

TOraParams Class

Used to control TOraParam objects.

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

Unit

Ora

Syntax

TOraParams = class(TDAParams);

Remarks

Use TOraParams to manage a list of TOraParam objects for an object that uses field parameters. For example, TOraStoredProc objects and TOraQuery objects use TOraParams objects to create and access their parameters.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TParams
TDAParams
TOraParams

See Also

  • TOraParam
  • TCustomDASQL.Params
  • TCustomDADataSet.Params
  • TOraDataSet.Params
  • TOraSQL.Params


TOraParams Members

TOraParams Members

TOraParams class overview.

Properties

Name | Description
Items | Used to iterate through all field parameters.

Methods

Name | Description
FindParam (inherited from TDAParams) | Searches for a parameter with the specified name.
ParamByName (inherited from TDAParams) | Searches for a parameter with the specified name.


TOraParams Properties

TOraParams Properties

Properties of the TOraParams class.

For a complete list of the TOraParams class members, see the TOraParams Members topic.

Public

Name | Description
FindParam (inherited from TDAParams) | Searches for a parameter with the specified name.
Items | Used to iterate through all field parameters.
ParamByName (inherited from TDAParams) | Searches for a parameter with the specified name.

See Also

  • TOraParams Class
  • TOraParams Class Members


TOraParams.Items Property(Indexer)

TOraParams.Items Property(Indexer)

Used to iterate through all field parameters.

Class

TOraParams

Syntax

property Items[Index: integer]: TOraParam; default;

Parameters
Index
Holds the index in the range 0..Count - 1.

Remarks

Use the Items property to iterate through all field parameters. Index identifies the index in the range 0..Count - 1. Items can refer to a particular parameter by its index, but the TDAParams.ParamByName method is preferred to avoid depending on the order of the parameters.


TOraPoolingOptions Class

TOraPoolingOptions Class

This class allows setting up the behaviour of the connecton pool.

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

Unit

Ora

Syntax

TOraPoolingOptions = class(TPoolingOptions);

Inheritance Hierarchy

TObject
TPersistent
TPoolingOptions
TOraPoolingOptions


TOraPoolingOptions Members

TOraPoolingOptions Members

TOraPoolingOptions class overview.

Properties

Name | Description
ConnectionLifetime (inherited from TPoolingOptions) | Used to specify the maximum time during which an opened connection can be used by connection pool.
MaxPoolSize (inherited from TPoolingOptions) | Used to specify the maximum number of connections that can be opened in connection pool.
MinPoolSize (inherited from TPoolingOptions) | Used to specify the minimum number of connections that can be opened in the connection pool.
PoolType | Used to specify the pool type.
ProxyPassword | Used to specify a password for proxy pooling.
ProxyUsername | Ussed to specify a user name for proxy pooling.
Validate (inherited from TPoolingOptions) | Used for a connection to be validated when it is returned from the pool.


TOraPoolingOptions Properties

TOraPoolingOptions Properties

Properties of the TOraPoolingOptions class.

For a complete list of the TOraPoolingOptions class members, see the TOraPoolingOptions Members topic.

Published

Name | Description
ConnectionLifetime (inherited from TPoolingOptions) | Used to specify the maximum time during which an opened connection can be used by connection pool.
MaxPoolSize (inherited from TPoolingOptions) | Used to specify the maximum number of connections that can be opened in connection pool.
MinPoolSize (inherited from TPoolingOptions) | Used to specify the minimum number of connections that can be opened in the connection pool.
PoolType | Used to specify the pool type.
ProxyPassword | Used to specify a password for proxy pooling.
ProxyUsername | Ussed to specify a user name for proxy pooling.
Validate (inherited from TPoolingOptions) | Used for a connection to be validated when it is returned from the pool.

See Also

  • TOraPoolingOptions Class
  • TOraPoolingOptions Class Members


TOraPoolingOptions.PoolType Property

TOraPoolingOptions.PoolType Property

Used to specify the pool type.

Class

TOraPoolingOptions

Syntax

property PoolType: TOraPoolingType default optLocal;

Remarks

Use the PoolType property to specify the pool type. Note that you should explicitly include OraConnectionPool unit to "uses" list to use the PoolType option at run-time.


TOraPoolingOptions.ProxyPassword Property

TOraPoolingOptions.ProxyPassword Property

Used to specify a password for proxy pooling.

Class

TOraPoolingOptions

Syntax

property ProxyPassword: string;

Remarks

Use the Proxypassword property to specify a password for proxy pooling.


TOraPoolingOptions.ProxyUsername Property

TOraPoolingOptions.ProxyUsername Property

Ussed to specify a user name for proxy pooling.

Class

TOraPoolingOptions

Syntax

property ProxyUsername: string;

Remarks

Use the ProxyUsername to specify a user name for the proxy pooling. Pool connections are stored with the same Username/Password properties. When giving connection from the pool, a connection under another user is created, based on one of these connections. Thus, connections under various users can be get from the pool.


TOraQuery Class

TOraQuery Class

A component for executing queries and operating record sets. It also provides flexible way to update data.

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

Unit

Ora

Syntax

TOraQuery = class(TCustomOraQuery);

Remarks

TOraQuery is a direct descendant of the TOraDataSet component. It publishes most of its inherited properties and events so that they can be manipulated at design-time.

Use TOraQuery to perform fetching, insertion, deletion and update of record by dynamically generated SQL statements. TOraQuery provides automatic blocking of records, their checking before edit and refreshing after post. Set SQL, SQLInsert, SQLDelete, SQLRefresh, and SQLUpdate properties to define SQL statements for subsequent accesses to the database server. There is no restriction to their syntax, so any SQL statement is allowed. Usually you need to use INSERT, DELETE, and UPDATE statements but you also may use stored procedures in more diverse cases.

To modify records of TOraQuery SELECT statement in SQL, property should retrieve ROWID of updating table. To modify records, you can specify KeyFields. If they are not specified, TOraQuery will retrieve primary keys for UpdatingTable from metadata. TOraQuery can automatically update only one table. Updating table is defined by the UpdatingTable property if this property is set. Otherwise, the table a field of which is the first field in the field list in the SELECT clause is used as an updating table.

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

TOraQuery performs read-only access if none of SQLInsert, SQLDelete, SQLUpdate properties is defined.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TOraQuery

See Also

  • Query demo project
  • Updating Data with ODAC Dataset Components
  • Working with Master/Detail Relationships
  • TOraStoredProc
  • TOraTable


TOraQuery Members

TOraQuery Members

TOraQuery class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode | Used to specify what kind of lock will be performed when editing a record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdatingTable | Used to specify which table in a query is assumed to be the target for subsequent data-modification queries as a result of user incentive to insert, update or delete records.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TOraQuery Properties

TOraQuery Properties

Properties of the TOraQuery class.

For a complete list of the TOraQuery class members, see the TOraQuery Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Published

Name | Description
LockMode | Used to specify what kind of lock will be performed when editing a record.
UpdatingTable | Used to specify which table in a query is assumed to be the target for subsequent data-modification queries as a result of user incentive to insert, update or delete records.

See Also

  • TOraQuery Class
  • TOraQuery Class Members


TOraQuery.LockMode Property

TOraQuery.LockMode Property

Used to specify what kind of lock will be performed when editing a record.

Class

TOraQuery

Syntax

property LockMode: TLockMode default lmNone;

Remarks

Use the LockMode property to define what kind of lock will be performed when editing a record. Locking a record is useful in creating multi-user applications. It prevents modification of a record by several users at the same time.

Locking is performed by the RefreshRecord method.

The default value is lmNone.

To set pessimistic locking use LockMode = lmLockImmediate, TOraDataSet.CheckMode = cmException. To set optimistic locking use LockMode = lmLockDelayed, CheckMode = cmException.

See Also

  • TOraStoredProc.LockMode
  • TOraTable.LockMode


TOraQuery.UpdatingTable Property

TOraQuery.UpdatingTable Property

Used to specify which table in a query is assumed to be the target for subsequent data-modification queries as a result of user incentive to insert, update or delete records.

Class

TOraQuery

Syntax

property UpdatingTable: string;

Remarks

Use the UpdatingTable property to specify which table in a query is assumed to be the target for the subsequent data-modification queries as a result of user incentive to insert, update or delete records.

This property is used on Insert, Update, Delete or RefreshRecord (see also TOraDataSet.Options) if appropriate SQL (SQLInsert, SQLUpdate or SQLDelete) is not provided.

If UpdatingTable is not set then the first table used in a query is assumed to be the target.


TOraReferenceField Class

TOraReferenceField Class

A class representing an Oracle REF field in a dataset.

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

Unit

Ora

Syntax

TOraReferenceField = class(TReferenceField);

Remarks

TOraReferenceField represents an Oracle REF field in a dataset.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TObjectField
TDataSetField
TReferenceField
TOraReferenceField


TOraReferenceField Members

TOraReferenceField Members

TOraReferenceField class overview.

Properties

Name | Description
Modified | Used to indicate whether a field was modified.


TOraReferenceField Properties

TOraReferenceField Properties

Properties of the TOraReferenceField class.

For a complete list of the TOraReferenceField class members, see the TOraReferenceField Members topic.

Public

Name | Description
Modified | Used to indicate whether a field was modified.

See Also

  • TOraReferenceField Class
  • TOraReferenceField Class Members


TOraReferenceField.Modified Property

TOraReferenceField.Modified Property

Used to indicate whether a field was modified.

Class

TOraReferenceField

Syntax

property Modified: boolean;

Remarks

Use the Modify property to indicate whether a field was modified. The property is writable.


TOraSession Class

TOraSession Class

A component for maintaining connection to an Oracle database.

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

Unit

Ora

Syntax

TOraSession = class(TCustomDAConnection);

Remarks

The TOraSession component is used to maintain connection to an Oracle database. After setting the Username, Password and Server properties, you can establish a connection to the database by calling the Connect method or setting the Connected property to True. There are also many properties at the session level that affect the default behavior of the queries executed within this session. Furthermore, you can control transactions using methods from this class.

All components that are dedicated to perform data access, such as TOraQuery, TOraSQL, TOraScript, must have their Session property assigned with one of the TOraSession instances.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomConnection
TCustomDAConnection
TOraSession

See Also

  • TOraDataSet.Session
  • TOraSQL.Session
  • TBDESession


TOraSession Members

TOraSession Members

TOraSession class overview.

Properties

Name | Description
AutoCommit | Used to permit or prevent permanent updates, insertions, and deletions of data associated with the current transaction against the database server.
ConnectDialog (inherited from TCustomDAConnection) | Allows to link a TCustomConnectDialog component.
Connected | Used to indicate if the database connection is active.
ConnectMode | Used to specify the system privileges to use when a user connects to the server.
ConnectPrompt | Used to supply a prompt for a name and password.
ConnectString | Used to assign the TOraSession.Username, TOraSession.Password and TOraSession.Server properties at once.
ConvertEOL (inherited from TCustomDAConnection) | Allows customizing line breaks in string fields and parameters.
Debug | Used to display SQL statements being executed with their parameter values and data types.
Home | Not supported.
HomeName | Used to select the Oracle client to use with the application.
InternalName | Used to get or set the client database name that will be recorded when performing global transactions.
InTransaction (inherited from TCustomDAConnection) | Indicates whether the transaction is active.
LastError | Used to get an error code which resulted from previous call to the OCI interface function.
LDA | Provides a pointer to Oracle 7 login data area of the current connection.
LoginPrompt (inherited from TCustomDAConnection) | Specifies whether a login dialog appears immediately before opening a new connection.
OCICallStyle | Indicates the set of OCI routines used.
OCISvcCtx | Used to return Oracle 8 service context handle of the current connection.
Options | Used to specify the behaviour of a TOraSession object.
OracleVersion | Used to get Oracle server version number as string.
Password | Used to specify a password for a connection.
Pooling (inherited from TCustomDAConnection) | Enables or disables using connection pool.
PoolingOptions | Used to specify the behaviour of connection pool.
ProxySession | Used to enable multiple user sessions within a single database session.
Schema | Used to change the current schema of the session to the specified schema.
Server | Contains the server name.
SQL | Uses embedded TOraSQL object to execute any SQL statement.
ThreadSafety | Used to allow the usage of the OCI in multi-threaded environment.
Username | Contains username.

Methods

Name | Description
ApplyUpdates (inherited from TCustomDAConnection) | Overloaded. Applies changes in datasets.
AssignConnect | Shares database connection between the TOraSession components.
ChangePassword | Cahnges the current user password for the session by a new one.
Commit (inherited from TCustomDAConnection) | Commits current transaction.
Connect (inherited from TCustomDAConnection) | Establishes a connection to the server.
CreateDataSet (inherited from TCustomDAConnection) | Creates a dataset component.
CreateSQL (inherited from TCustomDAConnection) | Creates a component for queries execution.
Disconnect (inherited from TCustomDAConnection) | Performs disconnect.
ExecProc (inherited from TCustomDAConnection) | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx (inherited from TCustomDAConnection) | Allows to execute a stored procedure or function.
ExecSQL (inherited from TCustomDAConnection) | Executes a SQL statement with parameters.
ExecSQLEx (inherited from TCustomDAConnection) | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames (inherited from TCustomDAConnection) | Returns a database list from the server.
GetSequenceNames | Provides the names of available sequences.
GetStoredProcNames (inherited from TCustomDAConnection) | Returns a list of stored procedures from the server.
GetTableNames (inherited from TCustomDAConnection) | Provides a list of available tables names.
MonitorMessage (inherited from TCustomDAConnection) | Sends a specified message through the TCustomDASQLMonitor component.
ParamByName | Provides access to OUT parameters and their values after processing SQL statement with ExecSQL or stored procedure with ExecProc.
Ping | Checks whether the connection to the server can be established.
RemoveFromPool (inherited from TCustomDAConnection) | Marks the connection that should not be returned to the pool after disconnect.
Rollback (inherited from TCustomDAConnection) | Discards all current data changes and ends transaction.
RollbackToSavepoint | Cancels all updates for the current transaction.
Savepoint | Defines a point in the transaction to which you can roll back later.
StartTransaction | Overloaded. Begins a new user transaction against the database server.

Events

Name | Description
OnConnectChange | Occurs after Connected property was changed.
OnConnectionLost (inherited from TCustomDAConnection) | This event occurs when connection was lost.
OnError (inherited from TCustomDAConnection) | This event occurs when an error has arisen in the connection.
OnFailover | Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover to another Oracle instance.


TOraSession Properties

TOraSession Properties

Properties of the TOraSession class.

For a complete list of the TOraSession class members, see the TOraSession Members topic.

Public

Name | Description
ApplyUpdates (inherited from TCustomDAConnection) | Overloaded. Applies changes in datasets.
Commit (inherited from TCustomDAConnection) | Commits current transaction.
Connect (inherited from TCustomDAConnection) | Establishes a connection to the server.
ConnectDialog (inherited from TCustomDAConnection) | Allows to link a TCustomConnectDialog component.
ConvertEOL (inherited from TCustomDAConnection) | Allows customizing line breaks in string fields and parameters.
CreateDataSet (inherited from TCustomDAConnection) | Creates a dataset component.
CreateSQL (inherited from TCustomDAConnection) | Creates a component for queries execution.
Disconnect (inherited from TCustomDAConnection) | Performs disconnect.
ExecProc (inherited from TCustomDAConnection) | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx (inherited from TCustomDAConnection) | Allows to execute a stored procedure or function.
ExecSQL (inherited from TCustomDAConnection) | Executes a SQL statement with parameters.
ExecSQLEx (inherited from TCustomDAConnection) | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames (inherited from TCustomDAConnection) | Returns a database list from the server.
GetStoredProcNames (inherited from TCustomDAConnection) | Returns a list of stored procedures from the server.
GetTableNames (inherited from TCustomDAConnection) | Provides a list of available tables names.
InternalName | Used to get or set the client database name that will be recorded when performing global transactions.
InTransaction (inherited from TCustomDAConnection) | Indicates whether the transaction is active.
LastError | Used to get an error code which resulted from previous call to the OCI interface function.
LDA | Provides a pointer to Oracle 7 login data area of the current connection.
LoginPrompt (inherited from TCustomDAConnection) | Specifies whether a login dialog appears immediately before opening a new connection.
MonitorMessage (inherited from TCustomDAConnection) | Sends a specified message through the TCustomDASQLMonitor component.
OCICallStyle | Indicates the set of OCI routines used.
OCISvcCtx | Used to return Oracle 8 service context handle of the current connection.
OnConnectionLost (inherited from TCustomDAConnection) | This event occurs when connection was lost.
OnError (inherited from TCustomDAConnection) | This event occurs when an error has arisen in the connection.
OracleVersion | Used to get Oracle server version number as string.
Pooling (inherited from TCustomDAConnection) | Enables or disables using connection pool.
ProxySession | Used to enable multiple user sessions within a single database session.
RemoveFromPool (inherited from TCustomDAConnection) | Marks the connection that should not be returned to the pool after disconnect.
Rollback (inherited from TCustomDAConnection) | Discards all current data changes and ends transaction.
SQL | Uses embedded TOraSQL object to execute any SQL statement.
StartTransaction (inherited from TCustomDAConnection) | Begins a new user transaction.

Published

Name | Description
AutoCommit | Used to permit or prevent permanent updates, insertions, and deletions of data associated with the current transaction against the database server.
Connected | Used to indicate if the database connection is active.
ConnectMode | Used to specify the system privileges to use when a user connects to the server.
ConnectPrompt | Used to supply a prompt for a name and password.
ConnectString | Used to assign the TOraSession.Username, TOraSession.Password and TOraSession.Server properties at once.
Debug | Used to display SQL statements being executed with their parameter values and data types.
Home | Not supported.
HomeName | Used to select the Oracle client to use with the application.
Options | Used to specify the behaviour of a TOraSession object.
Password | Used to specify a password for a connection.
PoolingOptions | Used to specify the behaviour of connection pool.
Schema | Used to change the current schema of the session to the specified schema.
Server | Contains the server name.
ThreadSafety | Used to allow the usage of the OCI in multi-threaded environment.
Username | Contains username.

See Also

  • TOraSession Class
  • TOraSession Class Members


TOraSession.AutoCommit Property

TOraSession.AutoCommit Property

Used to permit or prevent permanent updates, insertions, and deletions of data associated with the current transaction against the database server.

Class

TOraSession

Syntax

property AutoCommit: boolean;

Remarks

Use the AutoCommit property to permit or prevent permanent updates, insertions, and deletions of data associated with the current transaction against the database server without explicit calls to the Commit or Rollback methods.

Set AutoCommit to True to permit implicit call to Commit method after every database access.

AutoCommit property in TOraSession has higher precedence over the same properties in dataset components. Its default value is True.

Note: The AutoCommit property in TOraSesion globally specifies whether all queries to modify a database are implicitly committed or not. Components which descend from the TCustomDADataSet and TCustomDASQL classes inherit their AutoCommit properties. This allows them to specify their implicit transaction selectively committing the behavior after each data modifying access.

This is an example of procedure that removes all records from Dept table and makes this change permanent.

Example

procedure TForm1.DeleteClick(Sender: TObject);
begin
   OraSQL.Session := OraSession;
   OraSession.AutoCommit := True;
   OraSQL.AutoCommit := False;
   OraSQL.SQL := 'DELETE FROM Dept';
   OraSQL.Execute;         // delete all records, commit is not performed
   OraSession.Rollback;// restore deleted records
   OraSession.AutoCommit := False;
   OraSQL.AutoCommit := True;
   OraSQL.SQL := 'DELETE FROM Dept';
   OraSQL.Execute;         // delete all records, commit is not performed
   OraSession.Rollback; // restore deleted records
   OraSession.AutoCommit := True;
   OraSQL.AutoCommit := True;
   OraSQL.SQL := 'DELETE FROM Dept';
   OraSQL.Execute;         // delete all records, commit is performed
   OraSession.Rollback; // couldn't restore deleted records
end;

See Also

  • TCustomDAConnection.Commit


TOraSession.Connected Property

TOraSession.Connected Property

Used to indicate if the database connection is active.

Class

TOraSession

Syntax

property Connected: Boolean stored IsConnectedStored;

Remarks

Use the Connected property to indicate whether the database connection is active. Setting this property is equivalent to calling the TCustomDAConnection.Connect or TCustomDAConnection.Disconnect methods at runtime.

OnConnectChange event occurs after the Connected property has been changed.

See Also

  • TCustomDAConnection.Connect
  • TCustomDAConnection.Disconnect
  • OnConnectChange


TOraSession.ConnectMode Property

TOraSession.ConnectMode Property

Used to specify the system privileges to use when a user connects to the server.

Class

TOraSession

Syntax

property ConnectMode: TConnectMode default cmNORMAL;

Remarks

Use the ConnectMode property to specify which system privileges to use when a user connects to the server.

Note: User must have SYSOPER, SYSDBA or both these roles granted before he connects to the server and wishes to use either of these roles. ConnectMode is not supported for OCI 7.

See Also

  • Password
  • Server
  • Username


TOraSession.ConnectPrompt Property

TOraSession.ConnectPrompt Property

Used to supply a prompt for a name and password.

Class

TOraSession

Syntax

property ConnectPrompt: boolean stored False default True;

Remarks

Set the ConnectPrompt property to True to provide login support when establishing a connection. When ConnectPrompt is True, a dialog appears to prompt a user for a name and a password.

When ConnectPrompt is False, an application must supply user name and password values programmatically.

Warning: Storing a hard-coded user name and password entries as property values or in code for an OnLogin event handler can compromise server security.

See Also

  • Password
  • Server
  • Username
  • ConnectString


TOraSession.ConnectString Property

TOraSession.ConnectString Property

Used to assign the Username, Password and Server properties at once.

Class

TOraSession

Syntax

property ConnectString: string;

Remarks

Use the ConnectString property to assign such properties as Username, Password and Server at once.

Valid format is Username/Password@Server.

Warning: Storing hard-coded user name and password entries as property values or in code for an OnLogin event handler can compromise server security.

See Also

  • TCustomDAConnection.Password
  • TCustomDAConnection.Username
  • TCustomDAConnection.Server
  • TCustomDAConnection.Connect


TOraSession.Debug Property

TOraSession.Debug Property

Used to display SQL statements being executed with their parameter values and data types.

Class

TOraSession

Syntax

property Debug: boolean;

Remarks

Set the Debug property to True to display SQL statements being executed with their parameter values and data types.

Note: To use this property you should explicitly include OdacVcl (OdacClx under Linux) unit to your project.


TOraSession.Home Property

TOraSession.Home Property

Not supported.

Class

TOraSession

Syntax

property Home: TOracleHome stored False default ohDefault;

Remarks

This property is out of date and is not supported any more. Set the Home property to select which Oracle client will be used in your application. Use this property in cases when there is a number of Oracle clients on the machine. ODAC searches all available homes in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES registry folder.

The default value is ohDefault.

See Also

  • TCustomDAConnection.Connect
  • OraCall


TOraSession.HomeName Property

TOraSession.HomeName Property

Used to select the Oracle client to use with the application.

Class

TOraSession

Syntax

property HomeName: string;

Remarks

Use the HomeName property to select which Oracle client will be used in your application. Use this property in cases when there is a number of Oracle clients on the machine. ODAC searches all available homes in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE registry folder. If HomeName property is set to '', ODAC uses first directory from the list of homes encountered in environment PATH variable as default Oracle home.

See Also

  • TCustomDAConnection.Connect
  • OraCall


TOraSession.InternalName Property

TOraSession.InternalName Property

Used to get or set the client database name that will be recorded when performing global transactions.

Class

TOraSession

Syntax

property InternalName: string;

Remarks

Use the InternalName property to get or set the client database name that will be recorded when performing global transactions. While there is no actual global transaction support, setting this property to a non-empty string can give performance gains on SQL statement execution. But there is one undesirable effect: you cannot commit or rollback transaction from PL/SQL block. You should call TCustomDAConnection.Commit or TCustomDAConnection.Rollback explicitly.

See Also

  • TCustomDAConnection.Commit
  • TCustomDAConnection.Rollback


TOraSession.LastError Property

TOraSession.LastError Property

Used to get an error code which resulted from previous call to the OCI interface function.

Class

TOraSession

Syntax

property LastError: integer;

Remarks

Use the LastError property to get an error code which resulted from previous call to the OCI interface function.


TOraSession.LDA Property

TOraSession.LDA Property

Provides a pointer to Oracle 7 login data area of the current connection.

Class

TOraSession

Syntax

property LDA: PLDA;

Remarks

Call the LDA method to get a pointer to Oracle 7 login data area of the current connection.

LDA structure is relevant mainly to OCI 7 call interface.

See Also

  • OCISvcCtx
  • AssignConnect


TOraSession.OCICallStyle Property

TOraSession.OCICallStyle Property

Indicates the set of OCI routines used.

Class

TOraSession

Syntax

property OCICallStyle: TOCICallStyle;

Remarks

Use the OCICallStyle property to check what set of OCI routines is used. Write OCICallStyle before connection to specify that either OCI 7.3 or OCI 8.0 routines will be used. TOraSession initializes this property on behalf of the default OCI client found in the system at the time when OCI library is being loaded.

See Also

  • Options


TOraSession.OCISvcCtx Property

TOraSession.OCISvcCtx Property

Used to return Oracle 8 service context handle of the current connection.

Class

TOraSession

Syntax

property OCISvcCtx: pOCISvcCtx;

Remarks

Use the OCISvcCtx property to return Oracle 8 service context handle of the current connection.

See Also

  • LDA
  • AssignConnect


TOraSession.Options Property

TOraSession.Options Property

Used to specify the behaviour of a TOraSession object.

Class

TOraSession

Syntax

property Options: TOraSessionOptions;

Remarks

Set the properties of Options to specify the behaviour of a TOraSession object.

Descriptions of all options are in the table below.

Option Name | Description
CharLength | Used to specify the size of a single character in bytes.
Charset | Used to set the character set that ODAC uses to read and write character data.
ClientIdentifier | Used to determine the client identifier in the session.
ConnectionTimeout | Used to specify the time to wait for a connection to open before raising an exception.
ConvertEOL | Affects the line break behavior in string fields and parameters.
DateFormat | Used to specify the default date format used when Oracle makes conversions from internal date format into string values and vice versa.
DateLanguage | Used to specify the default language used when Oracle parses internal date format into string values and vice versa.
Direct | Used for ODAC to connect directly over TCP/IP (in Direct mode) and without requiring Oracle software on the client side.
EnableIntegers | Used for ODAC to map Oracle numbers with precision less than 10 to TIntegerField.
EnableNumbers | Used for ODAC to map Oracle numbers with precision larger than 15 to TOraNumberField.
EnableOraTimestamp | Used to create TOraTimeStampField for columns of TIMESTAMP data type.
NeverConnect | Used to prevent an application from establishing a connection at the time of startup.
OptimizerMode | Used to get or set the default optimizer mode for connection.
StatementCache | Used for ODAC to cache statement handles.
StatementCacheSize | Used to specify the statement handle cache size.
UseOCI7 | Used to force TOraSession use OCI 7 call style only.
UseUnicode | Used to enable or disable Unicode support.

See Also

  • Connecting in Direct Mode
  • Working with Unicode Character Data
  • TOraNumberField
  • TOraDataSet.Options
  • TOraSQL.StatementCache


TOraSession.OracleVersion Property

TOraSession.OracleVersion Property

Used to get Oracle server version number as string.

Class

TOraSession

Syntax

property OracleVersion: string;

Remarks

Use the OracleVersion property to get Oracle server version number as string, for a example '7.3.2.3'

Works only when TOraSession instance is connected.


TOraSession.Password Property

TOraSession.Password Property

Used to specify a password for a connection.

Class

TOraSession

Syntax

property Password: string;

Remarks

Use the Password property to specify a password for a connection. TOraSession uses Password to build connect string in the form Username/Password@Server .

When property is being changed TOraSession calls Disconnect method

See Also

  • Username
  • Server
  • TCustomDAConnection.Connect


TOraSession.PoolingOptions Property

TOraSession.PoolingOptions Property

Used to specify the behaviour of connection pool.

Class

TOraSession

Syntax

property PoolingOptions: TOraPoolingOptions;

Remarks

Set the properties of PoolingOptions to specify the behaviour of the connection pool.

Descriptions of all options are in the table below.

Option Name | Description
PoolType | Used to specify the pool type.
ProxyPassword | Used to specify a password for proxy pooling.
ProxyUsername | Ussed to specify a user name for proxy pooling.

See Also

  • TCustomDAConnection.Pooling


TOraSession.ProxySession Property

TOraSession.ProxySession Property

Used to enable multiple user sessions within a single database session.

Class

TOraSession

Syntax

property ProxySession: TOraSession;

Remarks

Applications can have multiple user sessions within a single database session. These "lightweight sessions" allow each user to be authenticated, preserving the identity of the real user through the middle tier.

The application server creates a proxy session for itself once it connects to a server. It authenticates itself to the database in a normal way creating the application server trust zone. The application server identity is now well known and trusted to the data server. Application server verifies the identity of a client. After that it can create TOraSession component and establish session for each client without authentication on Oracle server. That will reduce time for connection.

For each client session you must refer the TOraSession.ProxySession property to proxy TOraSession object. TOraSession.Password may by empty for client session. To use this feature Oracle users must have CONNECT THROUGH privilege.

Note: ProxySession property in TOraSesion is supported with OCI connection only when Options=False.


TOraSession.Schema Property

TOraSession.Schema Property

Used to change the current schema of the session to the specified schema.

Class

TOraSession

Syntax

property Schema: string stored IsSchemaStored;

Remarks

Use the Schema property to change the current schema of the session to the specified schema. This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name. This setting changes the current schema, but it neither changes the session user or the current user, nor gives you any additional system or object privileges for the session.

If Connected = True read this property to receive the name of the current schema.


TOraSession.Server Property

TOraSession.Server Property

Contains the server name.

Class

TOraSession

Syntax

property Server: string;

Remarks

Use the Server property to supply server name to handle server's request for a login.

Formatting this property is different and depends on the value of Options.Direct property. If Direct is set to False, Server assumes TNS alias name for the requested database. If Options.Direct is True, Server accepts a string holding three fields separated by a colon, like " Host:Port:SID" . Here Host is an IP address of the server that hosts the database, Port is a port number that server listens, and SID is a system identifier that specifies an instance name.

When property is being changed TOraSession calls Disconnect method.

See Also

  • Username
  • Password
  • TCustomDAConnection.Connect
  • HomeName
  • Connecting in Direct Mode


TOraSession.SQL Property

TOraSession.SQL Property

Uses embedded TOraSQL object to execute any SQL statement.

Class

TOraSession

Syntax

property SQL: TOraSQL;

Remarks

You can use embedded TOraSQL object to execute any SQL statement.

See Also

  • TOraSQL
  • TCustomDAConnection.ExecSQLEx
  • ParamByName


TOraSession.ThreadSafety Property

TOraSession.ThreadSafety Property

Used to allow the usage of the OCI in multi-threaded environment.

Class

TOraSession

Syntax

property ThreadSafety: boolean default True;

Remarks

Use the ThreadSafety property to enable the usage of the OCI in multi-threaded environment. The ThreadSafety property must be True before any non-blocking fetch of rows or SQL statement execution takes place.

See Also

  • TOraDataSet.NonBlocking
  • TOraSQL.NonBlocking


TOraSession.Username Property

TOraSession.Username Property

Contains username.

Class

TOraSession

Syntax

property Username: string;

Remarks

Use the Username property to supply user name to handle server's request for a login.

TOraSession uses the Username, Password and Server properties to build connect string in the format Username/Password@Server .

When property is being changed TOraSession calls Disconnect method

See Also

  • Password
  • Server
  • TCustomDAConnection.Connect


TOraSession Methods

TOraSession Methods

Methods of the TOraSession class.

For a complete list of the TOraSession class members, see the TOraSession Members topic.

Public

Name | Description
ApplyUpdates (inherited from TCustomDAConnection) | Overloaded. Applies changes in datasets.
AssignConnect | Shares database connection between the TOraSession components.
ChangePassword | Cahnges the current user password for the session by a new one.
Commit (inherited from TCustomDAConnection) | Commits current transaction.
Connect (inherited from TCustomDAConnection) | Establishes a connection to the server.
ConnectDialog (inherited from TCustomDAConnection) | Allows to link a TCustomConnectDialog component.
ConvertEOL (inherited from TCustomDAConnection) | Allows customizing line breaks in string fields and parameters.
CreateDataSet (inherited from TCustomDAConnection) | Creates a dataset component.
CreateSQL (inherited from TCustomDAConnection) | Creates a component for queries execution.
Disconnect (inherited from TCustomDAConnection) | Performs disconnect.
ExecProc (inherited from TCustomDAConnection) | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx (inherited from TCustomDAConnection) | Allows to execute a stored procedure or function.
ExecSQL (inherited from TCustomDAConnection) | Executes a SQL statement with parameters.
ExecSQLEx (inherited from TCustomDAConnection) | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames (inherited from TCustomDAConnection) | Returns a database list from the server.
GetSequenceNames | Provides the names of available sequences.
GetStoredProcNames (inherited from TCustomDAConnection) | Returns a list of stored procedures from the server.
GetTableNames (inherited from TCustomDAConnection) | Provides a list of available tables names.
InTransaction (inherited from TCustomDAConnection) | Indicates whether the transaction is active.
LoginPrompt (inherited from TCustomDAConnection) | Specifies whether a login dialog appears immediately before opening a new connection.
MonitorMessage (inherited from TCustomDAConnection) | Sends a specified message through the TCustomDASQLMonitor component.
OnConnectionLost (inherited from TCustomDAConnection) | This event occurs when connection was lost.
OnError (inherited from TCustomDAConnection) | This event occurs when an error has arisen in the connection.
Options (inherited from TCustomDAConnection) | Specifies the connection behavior.
ParamByName | Provides access to OUT parameters and their values after processing SQL statement with ExecSQL or stored procedure with ExecProc.
Password (inherited from TCustomDAConnection) | Serves to supply a password for login.
Ping | Checks whether the connection to the server can be established.
Pooling (inherited from TCustomDAConnection) | Enables or disables using connection pool.
PoolingOptions (inherited from TCustomDAConnection) | Specifies the behaviour of connection pool.
RemoveFromPool (inherited from TCustomDAConnection) | Marks the connection that should not be returned to the pool after disconnect.
Rollback (inherited from TCustomDAConnection) | Discards all current data changes and ends transaction.
RollbackToSavepoint | Cancels all updates for the current transaction.
Savepoint | Defines a point in the transaction to which you can roll back later.
Server (inherited from TCustomDAConnection) | Serves to supply the server name for login.
StartTransaction | Overloaded. Begins a new user transaction against the database server.
Username (inherited from TCustomDAConnection) | Used to supply a user name for login.

See Also

  • TOraSession Class
  • TOraSession Class Members


TOraSession.AssignConnect Method

TOraSession.AssignConnect Method

Shares database connection between the TOraSession components.

Class

TOraSession

Syntax

procedure AssignConnect(Source: TOraSession);

Parameters
Source
Points to a preconnected session and sets Connected property to True for this instance of TOraSession.

Remarks

Use the AssignConnect method to share database connection between the TOraSession components.

AssignConnect assumes that the Source parameter points to a preconnected session and sets Connected property to True for this instance of TOraSession. Note that AssignConnect doesn't make any references to the Source session. So before disconnecting parent session call AssignConnect(Nil) or Disconnect method for all assigned sessions.

Example

OraSession1.Connect;
OraSession2.AssignConnect(OraSession1);
                                    // OraSession2.Connected is True
OraSQL.Session := OraSession2;
OraSQL.Execute;
OraSession2.AssignConnect(nil);
                                    // OraSession2.Connected is False
OraSession1.Disconnect;

See Also

  • LDA
  • OCISvcCtx
  • TCustomDAConnection.Connect


TOraSession.ChangePassword Method

TOraSession.ChangePassword Method

Cahnges the current user password for the session by a new one.

Class

TOraSession

Syntax

procedure ChangePassword(NewPassword: string);

Parameters
NewPassword
Holds the new password.

Remarks

Call the ChangePassword method to replace current user password for this session by a new one.

The previous value for Password and UserName properties must be provided before calling ChangePassword.

ChangePassword method is used mainly when loging to the user account fails due to the password expiration or any other relevant reason accompanied by an exception with ORA-2800 Oracle error code family (see Oracle Error Messages).

See Also

  • Username
  • Password


TOraSession.GetSequenceNames Method

TOraSession.GetSequenceNames Method

Provides the names of available sequences.

Class

TOraSession

Syntax

procedure GetSequenceNames(List: _TStrings; AllSequences: boolean = False);

Parameters
List
Holds the list of available sequences names.
AllSequences
If True, method returns sequences from all schemas.

Remarks

Call the GetSequenceNames method to get the names of available sequences.

See Also

  • TCustomDAConnection.GetTableNames
  • TCustomDAConnection.GetStoredProcNames


TOraSession.ParamByName Method

TOraSession.ParamByName Method

Provides access to OUT parameters and their values after processing SQL statement with ExecSQL or stored procedure with ExecProc.

Class

TOraSession

Syntax

function ParamByName(Name: string): TOraParam;

Parameters
Name
Holds the parameter name.
Return Value
a TOraParam object.

Remarks

Use the ParamByName method to get access to OUT parameters and their values after processing SQL statement with ExecSQL or stored procedure with ExecProc. Name should be equal to the parameter name as it occurred in SQL statement.

Implicitely calls ParamByName function of TOraSQL.

See Also

  • SQL
  • TCustomDAConnection.ExecSQL
  • TCustomDAConnection.ExecSQLEx


TOraSession.Ping Method

TOraSession.Ping Method

Checks whether the connection to the server can be established.

Class

TOraSession

Syntax

procedure Ping;

Remarks

Use the Ping method to check whether the connection to the server can be established. If it cannot, an exception is raised.


TOraSession.RollbackToSavepoint Method

TOraSession.RollbackToSavepoint Method

Cancels all updates for the current transaction.

Class

TOraSession

Syntax

procedure RollbackToSavepoint(const Savepoint: string);

Parameters
Savepoint
Holds the name identifying the last defined savepoint.

Remarks

Call the RollbackToSavepoint method to cancel all updates for the current transaction and restore its state up to the moment of the last defined savepoint.

See Also

  • Savepoint
  • TCustomDAConnection.Rollback


TOraSession.Savepoint Method

TOraSession.Savepoint Method

Defines a point in the transaction to which you can roll back later.

Class

TOraSession

Syntax

procedure Savepoint(const Savepoint: string);

Parameters
Savepoint
Holds the name of the savepoint.

Remarks

Call the Savepoint method to define a point in the transaction to which you can roll back later. As the parameter, you can pass any valid name to identify the savepoint.

To roll back to the last savepoint call RollbackToSavepoint.

See Also

  • RollbackToSavepoint


TOraSession.StartTransaction Overload

TOraSession.StartTransaction Overload

Begins a new user transaction against the database server.

Class

TOraSession

Overload List

Name | Description
StartTransaction | Begins a new user transaction against the database server.
StartTransaction(IsolationLevel: TOraIsolationLevel; const RollbackSegment: string; const Name: string) | Begins a new user transaction against the database server.


TOraSession.StartTransaction Method

TOraSession.StartTransaction Method

Begins a new user transaction against the database server.

Class

TOraSession

Syntax

procedure StartTransaction; overload; override

Remarks

StartTransaction is an overload method for TCustomDAConnection.StartTransaction. Call the StartTransaction method to begin a new user transaction against the database server. Before calling StartTransaction, an application should check the status of the InTransaction property. If InTransaction is True, it indicates that a transaction is already in progress, a subsequent call to StartTransaction without first calling TCustomDAConnection.Commit or TCustomDAConnection.Rollback to end the current transaction raises EDatabaseError. Calling StartTransaction when connection is closed also raises EDatabaseError.

Updates, insertions, and deletions that take place after a call to StartTransaction are held by the server until an application calls Commit to save the changes or Rollback to cancel them.

See Also

  • TCustomDAConnection.Commit
  • TCustomDAConnection.Rollback
  • TCustomDAConnection.InTransaction
  • TCustomDAConnection.StartTransaction


TOraSession.StartTransaction Method

TOraSession.StartTransaction Method

Begins a new user transaction against the database server.

Class

TOraSession

Syntax

procedure StartTransaction(IsolationLevel: TOraIsolationLevel; const RollbackSegment: string = ''; const Name: string = ''); reintroduce; overload

Parameters
IsolationLevel
Specifies how the transactions containing database modifications are handled.
RollbackSegment
Holds the rollback segment to assign the current transaction to.
Name
Holds the current transaction name.

Remarks

Specify the RollbackSegment parameter to assign the current transaction to the specified rollback segment. This clause also implicitly establishes the transaction as a read/write transaction.

The Name parameter is useful in distributed database environments when you must identify and resolve in-doubt transactions. The text string is limited to 255 bytes.


TOraSession Events

TOraSession Events

Events of the TOraSession class.

For a complete list of the TOraSession class members, see the TOraSession Members topic.

Public

Name | Description
ApplyUpdates (inherited from TCustomDAConnection) | Overloaded. Applies changes in datasets.
Commit (inherited from TCustomDAConnection) | Commits current transaction.
Connect (inherited from TCustomDAConnection) | Establishes a connection to the server.
ConnectDialog (inherited from TCustomDAConnection) | Allows to link a TCustomConnectDialog component.
ConvertEOL (inherited from TCustomDAConnection) | Allows customizing line breaks in string fields and parameters.
CreateDataSet (inherited from TCustomDAConnection) | Creates a dataset component.
CreateSQL (inherited from TCustomDAConnection) | Creates a component for queries execution.
Disconnect (inherited from TCustomDAConnection) | Performs disconnect.
ExecProc (inherited from TCustomDAConnection) | Allows to execute stored procedure or function providing its name and parameters.
ExecProcEx (inherited from TCustomDAConnection) | Allows to execute a stored procedure or function.
ExecSQL (inherited from TCustomDAConnection) | Executes a SQL statement with parameters.
ExecSQLEx (inherited from TCustomDAConnection) | Executes any SQL statement outside the TQuery or TSQL components.
GetDatabaseNames (inherited from TCustomDAConnection) | Returns a database list from the server.
GetStoredProcNames (inherited from TCustomDAConnection) | Returns a list of stored procedures from the server.
GetTableNames (inherited from TCustomDAConnection) | Provides a list of available tables names.
InTransaction (inherited from TCustomDAConnection) | Indicates whether the transaction is active.
LoginPrompt (inherited from TCustomDAConnection) | Specifies whether a login dialog appears immediately before opening a new connection.
MonitorMessage (inherited from TCustomDAConnection) | Sends a specified message through the TCustomDASQLMonitor component.
OnConnectionLost (inherited from TCustomDAConnection) | This event occurs when connection was lost.
OnError (inherited from TCustomDAConnection) | This event occurs when an error has arisen in the connection.
Options (inherited from TCustomDAConnection) | Specifies the connection behavior.
Password (inherited from TCustomDAConnection) | Serves to supply a password for login.
Pooling (inherited from TCustomDAConnection) | Enables or disables using connection pool.
PoolingOptions (inherited from TCustomDAConnection) | Specifies the behaviour of connection pool.
RemoveFromPool (inherited from TCustomDAConnection) | Marks the connection that should not be returned to the pool after disconnect.
Rollback (inherited from TCustomDAConnection) | Discards all current data changes and ends transaction.
Server (inherited from TCustomDAConnection) | Serves to supply the server name for login.
StartTransaction (inherited from TCustomDAConnection) | Begins a new user transaction.
Username (inherited from TCustomDAConnection) | Used to supply a user name for login.

Published

Name | Description
OnConnectChange | Occurs after Connected property was changed.
OnFailover | Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover to another Oracle instance.

See Also

  • TOraSession Class
  • TOraSession Class Members


TOraSession.OnConnectChange Event

TOraSession.OnConnectChange Event

Occurs after Connected property was changed.

Class

TOraSession

Syntax

property OnConnectChange: TConnectChangeEvent;

Remarks

Occurs after the Connected property was changed. Connected parameter indicates whether the connection is active or not.

Note: This event is obsolete. Use AfterConnect and AfterDisconnect event handlers instead.

See Also

  • TCustomDAConnection.Connect
  • TCustomDAConnection.Disconnect


TOraSession.OnFailover Event

TOraSession.OnFailover Event

Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover to another Oracle instance.

Class

TOraSession

Syntax

property OnFailover: TFailoverEvent;

Remarks

Occurs when Transparent Application Failover (TAF) seamlessly attempts to failover to another Oracle instance.

FailoverType parameter specifies the type of failover. This allows the event to know what type of failover the client has requested.

See Also

  • Transparent Application Failover Support


TOraSessionOptions Class

TOraSessionOptions Class

This class allows setting up the behaviour of the TOraSession class.

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

Unit

Ora

Syntax

TOraSessionOptions = class(TDAConnectionOptions);

Inheritance Hierarchy

TObject
TPersistent
TDAConnectionOptions
TOraSessionOptions


TOraSessionOptions Members

TOraSessionOptions Members

TOraSessionOptions class overview.

Properties

Name | Description
CharLength | Used to specify the size of a single character in bytes.
Charset | Used to set the character set that ODAC uses to read and write character data.
ClientIdentifier | Used to determine the client identifier in the session.
ConnectionTimeout | Used to specify the time to wait for a connection to open before raising an exception.
ConvertEOL | Affects the line break behavior in string fields and parameters.
DateFormat | Used to specify the default date format used when Oracle makes conversions from internal date format into string values and vice versa.
DateLanguage | Used to specify the default language used when Oracle parses internal date format into string values and vice versa.
DefaultSortType (inherited from TDAConnectionOptions) | Used to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.
Direct | Used for ODAC to connect directly over TCP/IP (in Direct mode) and without requiring Oracle software on the client side.
DisconnectedMode (inherited from TDAConnectionOptions) | Used to open a connection only when needed for performing a server call and closes after performing the operation.
EnableIntegers | Used for ODAC to map Oracle numbers with precision less than 10 to TIntegerField.
EnableNumbers | Used for ODAC to map Oracle numbers with precision larger than 15 to TOraNumberField.
EnableOraTimestamp | Used to create TOraTimeStampField for columns of TIMESTAMP data type.
KeepDesignConnected (inherited from TDAConnectionOptions) | Used to prevent an application from establishing a connection at the time of startup.
LocalFailover (inherited from TDAConnectionOptions) | If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation can be performed after connection breaks.
NeverConnect | Used to prevent an application from establishing a connection at the time of startup.
OptimizerMode | Used to get or set the default optimizer mode for connection.
StatementCache | Used for ODAC to cache statement handles.
StatementCacheSize | Used to specify the statement handle cache size.
UseOCI7 | Used to force TOraSession use OCI 7 call style only.
UseUnicode | Used to enable or disable Unicode support.


TOraSessionOptions Properties

TOraSessionOptions Properties

Properties of the TOraSessionOptions class.

For a complete list of the TOraSessionOptions class members, see the TOraSessionOptions Members topic.

Public

Name | Description
DefaultSortType (inherited from TDAConnectionOptions) | Used to determine the default type of local sorting for string fields. It is used when a sort type is not specified explicitly after the field name in the TMemDataSet.IndexFieldNames property of a dataset.
DisconnectedMode (inherited from TDAConnectionOptions) | Used to open a connection only when needed for performing a server call and closes after performing the operation.
KeepDesignConnected (inherited from TDAConnectionOptions) | Used to prevent an application from establishing a connection at the time of startup.
LocalFailover (inherited from TDAConnectionOptions) | If True, the TCustomDAConnection.OnConnectionLost event occurs and a failover operation can be performed after connection breaks.

Published

Name | Description
CharLength | Used to specify the size of a single character in bytes.
Charset | Used to set the character set that ODAC uses to read and write character data.
ClientIdentifier | Used to determine the client identifier in the session.
ConnectionTimeout | Used to specify the time to wait for a connection to open before raising an exception.
ConvertEOL | Affects the line break behavior in string fields and parameters.
DateFormat | Used to specify the default date format used when Oracle makes conversions from internal date format into string values and vice versa.
DateLanguage | Used to specify the default language used when Oracle parses internal date format into string values and vice versa.
Direct | Used for ODAC to connect directly over TCP/IP (in Direct mode) and without requiring Oracle software on the client side.
EnableIntegers | Used for ODAC to map Oracle numbers with precision less than 10 to TIntegerField.
EnableNumbers | Used for ODAC to map Oracle numbers with precision larger than 15 to TOraNumberField.
EnableOraTimestamp | Used to create TOraTimeStampField for columns of TIMESTAMP data type.
NeverConnect | Used to prevent an application from establishing a connection at the time of startup.
OptimizerMode | Used to get or set the default optimizer mode for connection.
StatementCache | Used for ODAC to cache statement handles.
StatementCacheSize | Used to specify the statement handle cache size.
UseOCI7 | Used to force TOraSession use OCI 7 call style only.
UseUnicode | Used to enable or disable Unicode support.

See Also

  • TOraSessionOptions Class
  • TOraSessionOptions Class Members


TOraSessionOptions.CharLength Property

TOraSessionOptions.CharLength Property

Used to specify the size of a single character in bytes.

Class

TOraSessionOptions

Syntax

property CharLength: TCharLength default 1;

Remarks

Use the CharLength property to specify the size of a single character in bytes. Set this option with the number in range [0..6] to reflect Oracle support for the national languages. Setting CharLength to zero will instruct TOraSession to interrogate Oracle server for the actual character length. The default value is 1.


TOraSessionOptions.Charset Property

TOraSessionOptions.Charset Property

Used to set the character set that ODAC uses to read and write character data.

Class

TOraSessionOptions

Syntax

property Charset: string;

Remarks

Use the Charset property to set the character set that ODAC uses to read and write character data. Supported with Oracle 8 client only.


TOraSessionOptions.ClientIdentifier Property

TOraSessionOptions.ClientIdentifier Property

Used to determine the client identifier in the session.

Class

TOraSessionOptions

Syntax

property ClientIdentifier: string;

Remarks

Use the ClientIdentifier property to determine the client identifier in the session. The client identifier can be set in the session handle at any time during the session. Then, on the next request to the server, the information is propagated and stored in the server session. The first character of the ClientIdentifier should not be ':', because an exception will be raised. This property has no effect if you use the version server lower than Oracle 9.


TOraSessionOptions.ConnectionTimeout Property

TOraSessionOptions.ConnectionTimeout Property

Used to specify the time to wait for a connection to open before raising an exception.

Class

TOraSessionOptions

Syntax

property ConnectionTimeout: integer default 0;

Remarks

Use the ConnectionTimeout property to specify the time to wait for a connection to open before raising an exception. Works only when Direct mode is set to True.


TOraSessionOptions.ConvertEOL Property

TOraSessionOptions.ConvertEOL Property

Affects the line break behavior in string fields and parameters.

Class

TOraSessionOptions

Syntax

property ConvertEOL: boolean default False;

Remarks

Affects the line break behavior in string fields and parameters. When fetching strings (including CLOBs and LONGs) with ConvertEOL = True dataset converts their line breaks from LF to CRLF form. And when posting strings to server with ConvertEOL turned on their line breaks converted from CRLF to LF form. By default, strings are not converted.


TOraSessionOptions.DateFormat Property

TOraSessionOptions.DateFormat Property

Used to specify the default date format used when Oracle makes conversions from internal date format into string values and vice versa.

Class

TOraSessionOptions

Syntax

property DateFormat: string stored FIsDateFormatStored;

Remarks

Use the DateFormat property to specify the default date format used when Oracle makes conversions from internal date format into string values and vice versa. An example of valid expression for this property could be "MM/DD/YYYY".


TOraSessionOptions.DateLanguage Property

TOraSessionOptions.DateLanguage Property

Used to specify the default language used when Oracle parses internal date format into string values and vice versa.

Class

TOraSessionOptions

Syntax

property DateLanguage: string stored FIsDateLanguageStored;

Remarks

Use the DateLanguage property to specify the default language used when Oracle parses internal date format into string values and vice versa. Examples of valid expressions for this property could be "French", "German" etc.


TOraSessionOptions.Direct Property

TOraSessionOptions.Direct Property

Used for ODAC to connect directly over TCP/IP (in Direct mode) and without requiring Oracle software on the client side.

Class

TOraSessionOptions

Syntax

property Direct: boolean default False;

Remarks

If the Direct property is set to True, ODAC connects directly over TCP/IP (in Direct mode) and does not require Oracle software on the client side. Otherwise, ODAC connects in Client mode. Supported by ODAC Professional and Developer Editions.


TOraSessionOptions.EnableIntegers Property

TOraSessionOptions.EnableIntegers Property

Used for ODAC to map Oracle numbers with precision less than 10 to TIntegerField.

Class

TOraSessionOptions

Syntax

property EnableIntegers: boolean default True;

Remarks

When the EnableIntegers property is set to True ODAC maps Oracle numbers with precision less than 10 to TIntegerField. If EnableIntegers is set to False numbers are mapped to TFloatField or TOraNumberField.


TOraSessionOptions.EnableNumbers Property

TOraSessionOptions.EnableNumbers Property

Used for ODAC to map Oracle numbers with precision larger than 15 to TOraNumberField.

Class

TOraSessionOptions

Syntax

property EnableNumbers: boolean default False;

Remarks

When the EnableNumbers property is set to True ODAC maps Oracle numbers with precision larger than 15 to TOraNumberField. Otherwise they are mapped to TFloatFiled.


TOraSessionOptions.EnableOraTimestamp Property

TOraSessionOptions.EnableOraTimestamp Property

Used to create TOraTimeStampField for columns of TIMESTAMP data type.

Class

TOraSessionOptions

Syntax

property EnableOraTimestamp: boolean default True;

Remarks

When the EnableOraTimestamp property is set to True, TOraTimeStampField is created for columns of TIMESTAMP data type.

When False, standard TSQLTimeStampField is created for columns of TIMESTAMP data type.


TOraSessionOptions.NeverConnect Property

TOraSessionOptions.NeverConnect Property

Used to prevent an application from establishing a connection at the time of startup.

Class

TOraSessionOptions

Syntax

property NeverConnect: boolean stored False default False;

Remarks

Use the NeverConnect property to prevent an application from establishing a connection at the time of startup even if the Connected property was set to True at design-time.


TOraSessionOptions.OptimizerMode Property

TOraSessionOptions.OptimizerMode Property

Used to get or set the default optimizer mode for connection.

Class

TOraSessionOptions

Syntax

property OptimizerMode: TOptimizerMode default omDefault;

Remarks

Use the OptimizerMode property to get or set the default optimizer mode for connection.


TOraSessionOptions.StatementCache Property

TOraSessionOptions.StatementCache Property

Used for ODAC to cache statement handles.

Class

TOraSessionOptions

Syntax

property StatementCache: boolean default False;

Remarks

When the StatementCache property is set to True, ODAC caches statement handles.


TOraSessionOptions.StatementCacheSize Property

TOraSessionOptions.StatementCacheSize Property

Used to specify the statement handle cache size.

Class

TOraSessionOptions

Syntax

property StatementCacheSize: integer default 20;

Remarks

Use the StatementCacheSize property to specify the statement handle cache size.

Note: If StatementCache property is set, you can use TOraDataSet.Options and TOraSQL.StatementCache to adjust performance of dataset and SQL components using this session.


TOraSessionOptions.UseOCI7 Property

TOraSessionOptions.UseOCI7 Property

Used to force TOraSession use OCI 7 call style only.

Class

TOraSessionOptions

Syntax

property UseOCI7: boolean default False;

Remarks

Use the UseOCI7 property to force TOraSession use OCI 7 call style only.


TOraSessionOptions.UseUnicode Property

TOraSessionOptions.UseUnicode Property

Used to enable or disable Unicode support.

Class

TOraSessionOptions

Syntax

property UseUnicode: boolean default False;

Remarks

Use the UseUnicode property to enable or disable Unicode support. Affects character data fetched from the server. When set to True all character data stored as WideStrings and TStringField is replaced with TWideStringFiled. Supported starting with Oracle 8.


TOraSQL Class

TOraSQL Class

A component for executing SQL statements and calling stored procedures on the database server.

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

Unit

Ora

Syntax

TOraSQL = class(TCustomDASQL);

Remarks

The TOraSQL component is a direct descendant of the TCustomDASQL class.

Use The TOraSQL component when a client application must execute SQL statement or the PL/SQL block, and call stored procedure on the database server. The SQL statement should not retrieve rows from the database.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomDASQL
TOraSQL

See Also

  • SQL demo project
  • TOraQuery
  • TOraScript


TOraSQL Members

TOraSQL Members

TOraSQL class overview.

Properties

Name | Description
ArrayLength | Used to set the Length propery to all parameters.
ChangeCursor (inherited from TCustomDASQL) | Enables or disables changing screen cursor when executing commands in the NonBlocking mode.
Connection (inherited from TCustomDASQL) | Used to specify a connection object to use to connect to a data store.
Debug (inherited from TCustomDASQL) | Used to display executing statement, all its parameters' values, and the type of parameters.
FinalSQL (inherited from TCustomDASQL) | Used to return a SQL statement with expanded macros.
MacroCount (inherited from TCustomDASQL) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDASQL) | Makes it possible to change SQL queries easily.
NonBlocking | Description is not available at the moment.
ParamCheck (inherited from TCustomDASQL) | Used to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.
ParamCount (inherited from TCustomDASQL) | Indicates the number of parameters in the Params property.
Params | Contains the parameters for a SQL statement.
ParamValues (inherited from TCustomDASQL) | Used to get or set the values of individual field parameters that are identified by name.
Prepared (inherited from TCustomDASQL) | Used to indicate whether a query is prepared for execution.
RowsAffected (inherited from TCustomDASQL) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed | Used to return the number of rows processed by a SQL statement.
Session | Used to define the session to execute SQL in.
SQL (inherited from TCustomDASQL) | Used to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called.
SQLType | Used to get the typecode of the SQL statement being processed by an Oracle database server.
StatementCache | Used to get a value indicating whether Oracle resources assosiated with the current statement will be cached inside a session.
TemporaryLobUpdate | Specifies whether to use temporary LOBs for writing input and input/output LOB parameters into database when executing SQL statements.

Methods

Name | Description
BreakExec | Breaks execution of a SQL satatement on the server.
CreateProcCall | Assigns a PL/SQL block that calls stored procedure
ErrorOffset | Obtains zero-based starting byte position of a parse error detected by an Oracle server while processing SQL statement.
Execute (inherited from TCustomDASQL) | Overloaded. Executes SQL commands.
Executing (inherited from TCustomDASQL) | Checks whether TCustomDASQL still executes a SQL statement.
FindMacro (inherited from TCustomDASQL) | Searches for a macro with the specified name.
FindParam | Searches for and returns a parameter with the specified name.
MacroByName (inherited from TCustomDASQL) | Finds a Macro with the name passed in Name.
ParamByName | Searches for and returns a parameter with the specified name.
Prepare (inherited from TCustomDASQL) | Allocates, opens, and parses cursor for a query.
UnPrepare (inherited from TCustomDASQL) | Frees the resources allocated for a previously prepared query on the server and client sides.
WaitExecuting (inherited from TCustomDASQL) | Waits until TCustomDASQL executes a SQL statement.

Events

Name | Description
AfterExecute (inherited from TCustomDASQL) | Occurs after a SQL statement has been executed.


TOraSQL Properties

TOraSQL Properties

Properties of the TOraSQL class.

For a complete list of the TOraSQL class members, see the TOraSQL Members topic.

Public

Name | Description
AfterExecute (inherited from TCustomDASQL) | Occurs after a SQL statement has been executed.
ArrayLength | Used to set the Length propery to all parameters.
ChangeCursor (inherited from TCustomDASQL) | Enables or disables changing screen cursor when executing commands in the NonBlocking mode.
Connection (inherited from TCustomDASQL) | Used to specify a connection object to use to connect to a data store.
Debug (inherited from TCustomDASQL) | Used to display executing statement, all its parameters' values, and the type of parameters.
Execute (inherited from TCustomDASQL) | Overloaded. Executes SQL commands.
Executing (inherited from TCustomDASQL) | Checks whether TCustomDASQL still executes a SQL statement.
FinalSQL (inherited from TCustomDASQL) | Used to return a SQL statement with expanded macros.
FindMacro (inherited from TCustomDASQL) | Searches for a macro with the specified name.
FindParam (inherited from TCustomDASQL) | Finds a parameter with the specified name.
MacroByName (inherited from TCustomDASQL) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDASQL) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDASQL) | Makes it possible to change SQL queries easily.
ParamByName (inherited from TCustomDASQL) | Finds a parameter with the specified name.
ParamCheck (inherited from TCustomDASQL) | Used to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.
ParamCount (inherited from TCustomDASQL) | Indicates the number of parameters in the Params property.
ParamValues (inherited from TCustomDASQL) | Used to get or set the values of individual field parameters that are identified by name.
Prepare (inherited from TCustomDASQL) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TCustomDASQL) | Used to indicate whether a query is prepared for execution.
RowsAffected (inherited from TCustomDASQL) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed | Used to return the number of rows processed by a SQL statement.
SQL (inherited from TCustomDASQL) | Used to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called.
SQLType | Used to get the typecode of the SQL statement being processed by an Oracle database server.
UnPrepare (inherited from TCustomDASQL) | Frees the resources allocated for a previously prepared query on the server and client sides.
WaitExecuting (inherited from TCustomDASQL) | Waits until TCustomDASQL executes a SQL statement.

Published

Name | Description
NonBlocking | Description is not available at the moment.
Params | Contains the parameters for a SQL statement.
Session | Used to define the session to execute SQL in.
StatementCache | Used to get a value indicating whether Oracle resources assosiated with the current statement will be cached inside a session.
TemporaryLobUpdate | Specifies whether to use temporary LOBs for writing input and input/output LOB parameters into database when executing SQL statements.

See Also

  • TOraSQL Class
  • TOraSQL Class Members


TOraSQL.ArrayLength Property

TOraSQL.ArrayLength Property

Used to set the Length propery to all parameters.

Class

TOraSQL

Syntax

property ArrayLength: integer;

Remarks

Use the ArrayLength property to set the Length propery to all parameters. It is useful for DML array operations.

See Also

  • TOraParam.Length


TOraSQL.NonBlocking Property

TOraSQL.NonBlocking Property

Class

TOraSQL

Syntax

property NonBlocking: boolean default False;

Remarks

Set the NonBlocking property to True to execute a SQL statement by a separate thread.


TOraSQL.Params Property

TOraSQL.Params Property

Contains the parameters for a SQL statement.

Class

TOraSQL

Syntax

property Params: TOraParams stored False;

Remarks

Contains the parameters for a SQL statement.

Access Params at runtime to view and set parameter names, values, and data types dynamically (at design time use the Parameters editor to set parameter information). Params is a zero-based array of parameter records. Index specifies the array element to access.

An easier way to set and retrieve parameter values when the name of each parameter is known is to call ParamByName.

Example

Setting parameters in runtime.

procedure TForm1.Button1Click(Sender: TObject);
begin
with OraSQL do
begin
  SQL.Clear;
  SQL.Add('INSERT INTO Temp_Table(Id, Name)');
  SQL.Add('VALUES (:id, :Name)');
  ParamByName('Id').AsInteger := 55;
  Params[1].AsString := ' Green';
  Execute;
end;
end;

See Also

  • TOraParam
  • FindParam


TOraSQL.RowsProcessed Property

TOraSQL.RowsProcessed Property

Used to return the number of rows processed by a SQL statement.

Class

TOraSQL

Syntax

property RowsProcessed: integer;

Remarks

Use the RowsProcessed property to return the number of rows processed by a SQL statement. Useful for inserting, updating and deleting statements.


TOraSQL.Session Property

TOraSQL.Session Property

Used to define the session to execute SQL in.

Class

TOraSQL

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session in which SQL will be executed. If Session is not connected, the Execute method calls Session.Connect.

See Also

  • TOraSession


TOraSQL.SQLType Property

TOraSQL.SQLType Property

Used to get the typecode of the SQL statement being processed by an Oracle database server.

Class

TOraSQL

Syntax

property SQLType: integer;

Remarks

Use the SQLType property to get the typecode of the SQL statement being processed by an Oracle database server.


TOraSQL.StatementCache Property

TOraSQL.StatementCache Property

Used to get a value indicating whether Oracle resources assosiated with the current statement will be cached inside a session.

Class

TOraSQL

Syntax

property StatementCache: boolean default False;

Remarks

Use the StatementCache property to get a value indicating whether Oracle resources assosiated with the current statement will be cached inside a session. If you execute many different SELECT statements this option may significantly increase the performance of your application. But using this property you may easily step over maximum open cursors on Oracle server. And thus you must be attentive when using the Cached option. This option is only available with Oracle 9.2i and higher. It will work only if TOraSession.Options is set to True.


TOraSQL.TemporaryLobUpdate Property

TOraSQL.TemporaryLobUpdate Property

Specifies whether to use temporary LOBs for writing input and input/output LOB parameters into database when executing SQL statements.

Class

TOraSQL

Syntax

property TemporaryLobUpdate: boolean default False;

Remarks

If the TemporaryLobUpdate property is True, temporary LOBs are used to write input and input/output LOB parameters into database when executing SQL statements.


TOraSQL Methods

TOraSQL Methods

Methods of the TOraSQL class.

For a complete list of the TOraSQL class members, see the TOraSQL Members topic.

Public

Name | Description
AfterExecute (inherited from TCustomDASQL) | Occurs after a SQL statement has been executed.
BreakExec | Breaks execution of a SQL satatement on the server.
ChangeCursor (inherited from TCustomDASQL) | Enables or disables changing screen cursor when executing commands in the NonBlocking mode.
Connection (inherited from TCustomDASQL) | Used to specify a connection object to use to connect to a data store.
CreateProcCall | Assigns a PL/SQL block that calls stored procedure
Debug (inherited from TCustomDASQL) | Used to display executing statement, all its parameters' values, and the type of parameters.
ErrorOffset | Obtains zero-based starting byte position of a parse error detected by an Oracle server while processing SQL statement.
Execute (inherited from TCustomDASQL) | Overloaded. Executes SQL commands.
Executing (inherited from TCustomDASQL) | Checks whether TCustomDASQL still executes a SQL statement.
FinalSQL (inherited from TCustomDASQL) | Used to return a SQL statement with expanded macros.
FindMacro (inherited from TCustomDASQL) | Searches for a macro with the specified name.
FindParam | Searches for and returns a parameter with the specified name.
MacroByName (inherited from TCustomDASQL) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDASQL) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDASQL) | Makes it possible to change SQL queries easily.
ParamByName | Searches for and returns a parameter with the specified name.
ParamCheck (inherited from TCustomDASQL) | Used to specify whether parameters for the Params property are implicitly generated when the SQL property is being changed.
ParamCount (inherited from TCustomDASQL) | Indicates the number of parameters in the Params property.
Params (inherited from TCustomDASQL) | Used to contain parameters for a SQL statement.
ParamValues (inherited from TCustomDASQL) | Used to get or set the values of individual field parameters that are identified by name.
Prepare (inherited from TCustomDASQL) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TCustomDASQL) | Used to indicate whether a query is prepared for execution.
RowsAffected (inherited from TCustomDASQL) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
SQL (inherited from TCustomDASQL) | Used to provide a SQL statement that a TCustomDASQL component executes when the Execute method is called.
UnPrepare (inherited from TCustomDASQL) | Frees the resources allocated for a previously prepared query on the server and client sides.
WaitExecuting (inherited from TCustomDASQL) | Waits until TCustomDASQL executes a SQL statement.

See Also

  • TOraSQL Class
  • TOraSQL Class Members


TOraSQL.BreakExec Method

TOraSQL.BreakExec Method

Breaks execution of a SQL satatement on the server.

Class

TOraSQL

Syntax

procedure BreakExec;

Remarks

Call the BreakExec method to break execution of the SQL statement on the server.

It makes sense to call BreakExec only from another thread. Useful when NonBlocking is True.

See Also

  • TCustomDASQL.Execute
  • NonBlocking


TOraSQL.CreateProcCall Method

TOraSQL.CreateProcCall Method

Assigns a PL/SQL block that calls stored procedure

Class

TOraSQL

Syntax

procedure CreateProcCall(Name: string; Overload: integer = 0);

Parameters
Name
Holds the stored procedure name.
Overload
Holds the number of overloaded procedure.

Remarks

Call the CreateProcCall method to assign a PL/SQL block that calls stored procedure specified by Name to the SQL property. The Overload parameter must contain the number of overloaded procedure. Retrieves the information about parameters of the procedure from Oracle. After calling CreateProcCall you can execute a stored procedure by Execute method.

See Also

  • TCustomDASQL.Execute
  • TCustomDAConnection.ExecProc
  • TOraStoredProc


TOraSQL.ErrorOffset Method

TOraSQL.ErrorOffset Method

Obtains zero-based starting byte position of a parse error detected by an Oracle server while processing SQL statement.

Class

TOraSQL

Syntax

function ErrorOffset: integer;

Return Value
Holds the position of a parse error detected by an Oracle server while processing SQL statement.

Remarks

Call the ErrorOffset method to obtain zero-based starting byte position of a parse error detected by an Oracle server while processing SQL statement.

Note that statements which are longer than 64KB will have unpredictable effect on the ErrorOffset value. Refer to Programmer's Guide to the Oracle Call Interface for further information.


TOraSQL.FindParam Method

TOraSQL.FindParam Method

Searches for and returns a parameter with the specified name.

Class

TOraSQL

Syntax

function FindParam(const Value: string): TOraParam;

Parameters
Value
Holds the stored procedure name.
Return Value
the parameter, if a match was found. Nil otherwise.

Remarks

Call the FindParam method to find a parameter with the name passed in the Name argument. If a match was found, FindParam returns the parameter. Otherwise, it returns nil.

See Also

  • TOraParam
  • ParamByName


TOraSQL.ParamByName Method

TOraSQL.ParamByName Method

Searches for and returns a parameter with the specified name.

Class

TOraSQL

Syntax

function ParamByName(const Value: string): TOraParam;

Parameters
Value
Holds the parameter name.
Return Value
the parameter, if a match was found. Otherwise an exception is raised.

Remarks

Call the ParamByName method to find a parameter with the name passed in the Name argument.

If a match is found, ParamByName returns the parameter. Otherwise, an exception is raised.

Example

OraSQL1.Execute;
Edit1.Text := OraSQL1.ParamsByName('Contact').AsString;

See Also

  • TOraParam
  • FindParam


TOraStoredProc Class

TOraStoredProc Class

A component for accessing and executing stored procedures and functions.

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

Unit

Ora

Syntax

TOraStoredProc = class(TCustomOraQuery);

Remarks

Use TOraStoredProc to access stored procedures on the database server.

You need only to define the StoredProcName property, and the SQL statement to call the stored procedure will be generated automatically.

Use the Execute method at runtime to generate request that instructs server to execute procedure and PrepareSQL to describe parameters at run time

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TOraStoredProc

See Also

  • Stored proc demo
  • TOraQuery
  • TOraSQL
  • Updating Data with ODAC Dataset Components
  • TCustomDAConnection.ExecProc


TOraStoredProc Members

TOraStoredProc Members

TOraStoredProc class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode | Used to specify what kind of lock will be performed when editing a record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
Overload | Used to specify the overloading number.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StoredProcName | Used to specify the name of the stored procedure to call on the server.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecProc | Executes a SQL statement on the server.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
PrepareSQL | Describes the parameters of a stored procedure.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TOraStoredProc Properties

TOraStoredProc Properties

Properties of the TOraStoredProc class.

For a complete list of the TOraStoredProc class members, see the TOraStoredProc Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Published

Name | Description
LockMode | Used to specify what kind of lock will be performed when editing a record.
Overload | Used to specify the overloading number.
StoredProcName | Used to specify the name of the stored procedure to call on the server.

See Also

  • TOraStoredProc Class
  • TOraStoredProc Class Members


TOraStoredProc.LockMode Property

TOraStoredProc.LockMode Property

Used to specify what kind of lock will be performed when editing a record.

Class

TOraStoredProc

Syntax

property LockMode: TLockMode default lmNone;

Remarks

Use the LockMode property to define what kind of lock will be performed when editing a record. Locking a record is useful in creating multi-user applications. It prevents modification of a record by several users at the same time.

Locking is performed by the RefreshRecord method.

The default value is lmNone.

See Also

  • TOraQuery.LockMode
  • TOraTable.LockMode


TOraStoredProc.Overload Property

TOraStoredProc.Overload Property

Used to specify the overloading number.

Class

TOraStoredProc

Syntax

property Overload: integer default 0;

Remarks

Use the Overload property to specify the overloading number in case the procedure or function is a part of a package and is overloaded.


TOraStoredProc.StoredProcName Property

TOraStoredProc.StoredProcName Property

Used to specify the name of the stored procedure to call on the server.

Class

TOraStoredProc

Syntax

property StoredProcName: string;

Remarks

Use the StoredProcName property to specify the name of the stored procedure to call on the server. If StoredProcName does not match the name of an existing stored procedure on the server, then when the application attempts to prepare the procedure prior to execution, an exception is raised.


TOraStoredProc Methods

TOraStoredProc Methods

Methods of the TOraStoredProc class.

For a complete list of the TOraStoredProc class members, see the TOraStoredProc Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecProc | Executes a SQL statement on the server.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
PrepareSQL | Describes the parameters of a stored procedure.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TOraStoredProc Class
  • TOraStoredProc Class Members


TOraStoredProc.ExecProc Method

TOraStoredProc.ExecProc Method

Executes a SQL statement on the server.

Class

TOraStoredProc

Syntax

procedure ExecProc;

Remarks

The ExecProc method is the same as TCustomDADataSet.Execute method. It is included for compatibility with TStoredProc.

See Also

  • TCustomDADataSet.Execute


TOraStoredProc.PrepareSQL Method

TOraStoredProc.PrepareSQL Method

Describes the parameters of a stored procedure.

Class

TOraStoredProc

Syntax

procedure PrepareSQL;

Remarks

Use the PrepareSQL method to describe parameters of a stored procedure. If it is necessary, Execute method calls it automatically. You can define parameters at design time if ParametersEditor is opened.


TOraTimeStampField Class

TOraTimeStampField Class

A class providing access to the Oracle timestamp fields.

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

Unit

Ora

Syntax

TOraTimeStampField = class(TField);

Remarks

TOraTimeStampField provides access to Oracle timestamp fields. The TOraTimeStampField class supports three data types: TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE. According to this, the TOraTimeStampField.DataType property has three valid values ftTimeStamp, ftTimeStampTZ and ftTimeStampLTZ.

You can access actual timestamp value using the AsDateTime, AsString and AsOraTimeStamp properties.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TOraTimeStampField

See Also

  • TOraTimeStamp


TOraTimeStampField Members

TOraTimeStampField Members

TOraTimeStampField class overview.

Properties

Name | Description
AsTimeStamp | Used to provide access to a TOraTimeStamp object.
Format | Used to get or set the date-time format model for operations with the AsString property.


TOraTimeStampField Properties

TOraTimeStampField Properties

Properties of the TOraTimeStampField class.

For a complete list of the TOraTimeStampField class members, see the TOraTimeStampField Members topic.

Public

Name | Description
AsTimeStamp | Used to provide access to a TOraTimeStamp object.

Published

Name | Description
Format | Used to get or set the date-time format model for operations with the AsString property.

See Also

  • TOraTimeStampField Class
  • TOraTimeStampField Class Members


TOraTimeStampField.AsTimeStamp Property

TOraTimeStampField.AsTimeStamp Property

Used to provide access to a TOraTimeStamp object.

Class

TOraTimeStampField

Syntax

property AsTimeStamp: TOraTimeStamp;

Remarks

Use the AsTimeStamp property to get access to a TOraTimeStamp object which you can use for manipulations with timestamp value.

See Also

  • TOraTimeStamp


TOraTimeStampField.Format Property

TOraTimeStampField.Format Property

Used to get or set the date-time format model for operations with the AsString property.

Class

TOraTimeStampField

Syntax

property Format: string;

Remarks

Use the Format property to get or set the date-time format model for operations with the AsString property. Format string should be an Oracle date-time string.

See Also

  • TOraTimeStamp.Format


TOraTrace Class

TOraTrace Class

A component allowing starting and stopping a SQL trace for a specified session. This component provides access to the DBMS_TRACE package.

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

Unit

Ora

Syntax

TOraTrace = class(TComponent);

Remarks

Use the TOraTrace component to start and stop a SQL trace for a session. The component also provides access to functionality of DBMS_TRACE package to control the PL/SQL trace.

SQL trace can be useful in performance diagnostics. It can help to determine in detail how applications/users access the database.

The TOraTrace component automatically starts the trace when its TOraSession component connects to a database or when you assign already connected session to the TOraTrace.Session property. The SQL trace is started if TOraTrace.SqlTraceMode <> []. The PL/SQL trace is started if TOraTrace.PlSqlTraceMode <> [].

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraTrace


TOraTrace Members

TOraTrace Members

TOraTrace class overview.

Properties

Name | Description
Enabled | Used to enable the trace.
MaxTraceFileSize | Used to limit the size of the SQL trace dump file.
PlSqlTraceMode | Defines the level of PL/SQL trace.
Session | used to specify the session on which a trace will be enabled.
SqlTraceMode | Used to determine the level of SQL trace.
State | Used to define wheter SQL trace and PL/SQL trace are active.
TraceFileIdentifier | Used to add a string to the SQL trace dump file name.

Methods

Name | Description
GetSessionPID | Returns the operating system process identifier for a process that owns the current session.
GetTraceFileName | Returns the name of a dump file on the database server to which SQL trace data is written.
PlSqlTraceComment | Provides a comment on the PL/SQL trace.
PlSqlTraceLimit | Limits the amount of storage used in the database for the PL/SQL trace data.
PlSqlTracePause | makes a pause in PL/SQL tracing.
PlSqlTraceResume | Resumes PL/SQL trace.
PlSqlTraceRunNumber | Returns a run number for the current PL/SQL trace.
PlSqlTraceStart | Starts PL/SQL trace data collection.
PlSqlTraceStop | Stops the PL/SQL trace.
SqlTraceStart | Starts the SQL trace.
SqlTraceStop | Stops the SQL trace.


TOraTrace Properties

TOraTrace Properties

Properties of the TOraTrace class.

For a complete list of the TOraTrace class members, see the TOraTrace Members topic.

Public

Name | Description
State | Used to define wheter SQL trace and PL/SQL trace are active.

Published

Name | Description
Enabled | Used to enable the trace.
MaxTraceFileSize | Used to limit the size of the SQL trace dump file.
PlSqlTraceMode | Defines the level of PL/SQL trace.
Session | used to specify the session on which a trace will be enabled.
SqlTraceMode | Used to determine the level of SQL trace.
TraceFileIdentifier | Used to add a string to the SQL trace dump file name.

See Also

  • TOraTrace Class
  • TOraTrace Class Members


TOraTrace.Enabled Property

TOraTrace.Enabled Property

Used to enable the trace.

Class

TOraTrace

Syntax

property Enabled: boolean default True;

Remarks

Use the Enabled property to enable or disable the trace. Set Enabled to False to disable the trace.

See Also

  • SqlTraceStart
  • SqlTraceStop


TOraTrace.MaxTraceFileSize Property

TOraTrace.MaxTraceFileSize Property

Used to limit the size of the SQL trace dump file.

Class

TOraTrace

Syntax

property MaxTraceFileSize: integer default DEFAULT_TRACE_FILE_SIZE;

Remarks

Use the MaxTraceFileSize property to limit the size of the SQL trace dump file.


TOraTrace.PlSqlTraceMode Property

TOraTrace.PlSqlTraceMode Property

Defines the level of PL/SQL trace.

Class

TOraTrace

Syntax

property PlSqlTraceMode: TPlSqlTraceMode default [];

Remarks

Use the PlSqlTraceMode property to define the level of PL/SQL trace.

Note: PL/SQL program unit is enabled when it is compiled with debug information.


TOraTrace.Session Property

TOraTrace.Session Property

used to specify the session on which a trace will be enabled.

Class

TOraTrace

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session on which a trace will be enabled.


TOraTrace.SqlTraceMode Property

TOraTrace.SqlTraceMode Property

Used to determine the level of SQL trace.

Class

TOraTrace

Syntax

property SqlTraceMode: TSqlTraceMode default [smTypicalStatistics, smTimedStatistics];

Remarks

Use the SqlTraceMode property to define the level of SQL trace.


TOraTrace.State Property

TOraTrace.State Property

Used to define wheter SQL trace and PL/SQL trace are active.

Class

TOraTrace

Syntax

property State: TTraceState;

Remarks

Use the State property to detect whether SQL trace and PL/SQL trace are active.


TOraTrace.TraceFileIdentifier Property

TOraTrace.TraceFileIdentifier Property

Used to add a string to the SQL trace dump file name.

Class

TOraTrace

Syntax

property TraceFileIdentifier: string;

Remarks

Use the TraceFileIdentifier property to add a string to the name of the SQL trace dump file. If you set TraceFileIdentifier property to some non-empty string then this string will be added to the name of SQL trace dump file. It makes finding of the SQL trace dump file easier.

See Also

  • GetTraceFileName
  • GetSessionPID


TOraTrace Methods

TOraTrace Methods

Methods of the TOraTrace class.

For a complete list of the TOraTrace class members, see the TOraTrace Members topic.

Public

Name | Description
GetSessionPID | Returns the operating system process identifier for a process that owns the current session.
GetTraceFileName | Returns the name of a dump file on the database server to which SQL trace data is written.
PlSqlTraceComment | Provides a comment on the PL/SQL trace.
PlSqlTraceLimit | Limits the amount of storage used in the database for the PL/SQL trace data.
PlSqlTracePause | makes a pause in PL/SQL tracing.
PlSqlTraceResume | Resumes PL/SQL trace.
PlSqlTraceRunNumber | Returns a run number for the current PL/SQL trace.
PlSqlTraceStart | Starts PL/SQL trace data collection.
PlSqlTraceStop | Stops the PL/SQL trace.
SqlTraceStart | Starts the SQL trace.
SqlTraceStop | Stops the SQL trace.

See Also

  • TOraTrace Class
  • TOraTrace Class Members


TOraTrace.GetSessionPID Method

TOraTrace.GetSessionPID Method

Returns the operating system process identifier for a process that owns the current session.

Class

TOraTrace

Syntax

function GetSessionPID: integer;

Return Value
the operating system process identifier for a process that owns the current session.

Remarks

Call the GetSessionPID method to return the operating system process identifier for a process that owns the current session. This identifier can be usefull to find the dump file in which SQL trace data is written. The name of the dump file contains this identifier.

See Also

  • GetTraceFileName
  • TraceFileIdentifier


TOraTrace.GetTraceFileName Method

TOraTrace.GetTraceFileName Method

Returns the name of a dump file on the database server to which SQL trace data is written.

Class

TOraTrace

Syntax

function GetTraceFileName: string;

Return Value
the name of a dump file on the database server to which SQL trace data is written.

Remarks

Call the GetTraceFileName method to return the name of a dump file on the database server to which SQL trace data is written. The file name is returned with the path to the file.

Note: In some versions of Oracle database the dump file name format can be different from the one returned by the GetTraceFileName method.

See Also

  • GetSessionPID
  • TraceFileIdentifier


TOraTrace.PlSqlTraceComment Method

TOraTrace.PlSqlTraceComment Method

Provides a comment on the PL/SQL trace.

Class

TOraTrace

Syntax

procedure PlSqlTraceComment(const Comment: string);

Parameters
Comment
Holds the comment for the PL/SQL trace.

Remarks

Call the PlSqlTraceComment method to set a comment on the PL/SQL trace.


TOraTrace.PlSqlTraceLimit Method

TOraTrace.PlSqlTraceLimit Method

Limits the amount of storage used in the database for the PL/SQL trace data.

Class

TOraTrace

Syntax

procedure PlSqlTraceLimit(Limit: integer = 8192);

Parameters
Limit
Holds the limit size for the storage used for the PL/SQL trace data.

Remarks

Call the PlSqlTraceLimit method to limit the amount of storage used in the database for the PL/SQL trace data.


TOraTrace.PlSqlTracePause Method

TOraTrace.PlSqlTracePause Method

makes a pause in PL/SQL tracing.

Class

TOraTrace

Syntax

procedure PlSqlTracePause;

Remarks

Call the PlSqlTracePause method to pause PL/SQL trace.

See Also

  • PlSqlTraceResume


TOraTrace.PlSqlTraceResume Method

TOraTrace.PlSqlTraceResume Method

Resumes PL/SQL trace.

Class

TOraTrace

Syntax

procedure PlSqlTraceResume;

Remarks

Call the PlSqlTraceResume method to resume PL/SQL trace.

See Also

  • PlSqlTracePause


TOraTrace.PlSqlTraceRunNumber Method

TOraTrace.PlSqlTraceRunNumber Method

Returns a run number for the current PL/SQL trace.

Class

TOraTrace

Syntax

function PlSqlTraceRunNumber: integer;

Return Value
a run number for the current PL/SQL trace.

Remarks

Call the PlSqlTraceRunNumber method to return a run number for the current PL/SQL trace. This number can be used to retrieve information from the trace tables.


TOraTrace.PlSqlTraceStart Method

TOraTrace.PlSqlTraceStart Method

Starts PL/SQL trace data collection.

Class

TOraTrace

Syntax

procedure PlSqlTraceStart;

Remarks

When Enabled property is False, call the PlSqlTraceStart method to start PL/SQL trace data collection. Setting Enabled property to True is another way to start the PL/SQL trace.

See Also

  • Enabled
  • PlSqlTraceStop
  • PlSqlTracePause
  • PlSqlTraceResume


TOraTrace.PlSqlTraceStop Method

TOraTrace.PlSqlTraceStop Method

Stops the PL/SQL trace.

Class

TOraTrace

Syntax

procedure PlSqlTraceStop;

Remarks

Call the PlSqlTraceStop method to stop the PL/SQL trace. Setting the Enabled property to False is another way to stop the PL/SQL trace.

See Also

  • Enabled
  • PlSqlTraceStart
  • PlSqlTracePause
  • PlSqlTraceResume


TOraTrace.SqlTraceStart Method

TOraTrace.SqlTraceStart Method

Starts the SQL trace.

Class

TOraTrace

Syntax

procedure SqlTraceStart;

Remarks

When the Enabled property is False, call the SqlTraceStart method to start the SQL trace. Setting the Enabled property to True is another way to start the SQL trace.

See Also

  • Enabled
  • SqlTraceStop


TOraTrace.SqlTraceStop Method

TOraTrace.SqlTraceStop Method

Stops the SQL trace.

Class

TOraTrace

Syntax

procedure SqlTraceStop;

Remarks

Call the SqlTraceStop method to stop the SQL trace. Setting the Enabled property to False is another way to stop the SQL trace.

See Also

  • Enabled
  • SqlTraceStart


TOraUpdateSQL Class

TOraUpdateSQL Class

A component for tuning update operations for the DataSet component.

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

Unit

Ora

Syntax

TOraUpdateSQL = class(TCustomDAUpdateSQL);

Remarks

Use the TOraUpdateSQL component to provide DML statements for the dataset components that return read-only result set. This component also allows setting objects that can be used for executing update operations. You may prefer to use directly SQLInsert, SQLUpdate, and SQLDelete properties of the TCustomDADataSet descendants.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomDAUpdateSQL
TOraUpdateSQL

See Also

  • TOraDataSet.UpdateObject


TOraUpdateSQL Members

TOraUpdateSQL Members

TOraUpdateSQL class overview.

Properties

Name | Description
DataSet (inherited from TCustomDAUpdateSQL) | Used to hold a reference to the TCustomDADataSet object that is being updated.
DeleteObject (inherited from TCustomDAUpdateSQL) | Provides ability to perform advanced adjustment of the delete operations.
DeleteSQL (inherited from TCustomDAUpdateSQL) | Used when deleting a record.
InsertObject (inherited from TCustomDAUpdateSQL) | Provides ability to perform advanced adjustment of insert operations.
InsertSQL (inherited from TCustomDAUpdateSQL) | Used when inserting a record.
LockObject (inherited from TCustomDAUpdateSQL) | Provides ability to perform advanced adjustment of lock operations.
LockSQL (inherited from TCustomDAUpdateSQL) | Used to lock the current record.
ModifyObject (inherited from TCustomDAUpdateSQL) | Provides ability to perform advanced adjustment of modify operations.
ModifySQL (inherited from TCustomDAUpdateSQL) | Used when updating a record.
RefreshObject (inherited from TCustomDAUpdateSQL) | Provides ability to perform advanced adjustment of refresh operations.
RefreshSQL (inherited from TCustomDAUpdateSQL) | Used to specify an SQL statement that will be used for refreshing the current record by TCustomDADataSet.RefreshRecord procedure.
SQL (inherited from TCustomDAUpdateSQL) | Used to return a SQL statement for one of the ModifySQL, InsertSQL, or DeleteSQL properties.

Methods

Name | Description
Apply (inherited from TCustomDAUpdateSQL) | Sets parameters for a SQL statement and executes it to update a record.
ExecSQL (inherited from TCustomDAUpdateSQL) | Executes a SQL statement.


TOraXMLField Class

TOraXMLField Class

A class providing access to the Oracle SYS.XMLTYPE objects.

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

Unit

Ora

Syntax

TOraXMLField = class(TField);

Remarks

TOraXMLField provides access to the Oracle SYS.XMLTYPE objects.

The TMSXMLField.DataType property values equal to ftXML. You can access actual XML document using the AsString and TOraXMLField.AsXML properties.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TField
TOraXMLField

See Also

  • TOraXML


TOraXMLField Members

TOraXMLField Members

TOraXMLField class overview.

Properties

Name | Description
AsXML | Used to provide access to a TOraXML object.


TOraXMLField Properties

TOraXMLField Properties

Properties of the TOraXMLField class.

For a complete list of the TOraXMLField class members, see the TOraXMLField Members topic.

Public

Name | Description
AsXML | Used to provide access to a TOraXML object.

See Also

  • TOraXMLField Class
  • TOraXMLField Class Members


TOraXMLField.AsXML Property

TOraXMLField.AsXML Property

Used to provide access to a TOraXML object.

Class

TOraXMLField

Syntax

property AsXML: TOraXML;

Remarks

Use the AsXML property to get access to TOraXML object that can be used for manipulations with an XML document.

See Also

  • TOraXML


Types in Ora

Types in Ora

Types in the Ora unit.

Types

Name | Description
TFailoverEvent | This Type is used for the TOraSession.OnFailover event.
TOraChangeNotificationEvent | This type is used for the TOraChangeNotification.OnChange event.
TPlSqlTraceMode | Specifies the level of PL/SQL trace.
TSqlTraceMode | Specifies the level of SQL trace statistics level.


TFailoverEvent Procedure Reference

TFailoverEvent Procedure Reference

This Type is used for the TOraSession.OnFailover event.

Unit

Ora

Syntax

TFailoverEvent = procedure (Sender: TObject; FailoverState: TFailoverState; FailoverType: TFailoverType; var Retry: boolean) of object;

Parameters
Sender
An object that raised the event.
FailoverState
The failover state.
FailoverType
The type of failover.
Retry
True, if performing of the failover should be retried.


TOraChangeNotificationEvent Procedure Reference

TOraChangeNotificationEvent Procedure Reference

This type is used for the TOraChangeNotification.OnChange event.

Unit

Ora

Syntax

TOraChangeNotificationEvent = procedure (Sender: TObject; NotifyType: TChangeNotifyEventType; TableChanges: TNotifyTableChanges) of object;

Parameters
Sender
An object that raised the event.
NotifyType
The type of the event that occurred.
TableChanges
Holds the information on all table changes.


TPlSqlTraceMode Set

TPlSqlTraceMode Set

Specifies the level of PL/SQL trace.

Unit

Ora

Syntax

TPlSqlTraceMode = set of ( pmAllCalls, pmEnabledCalls, pmAllExceptions, pmEnabledExceptions, pmAllSql, pmEnabledSql, pmAllLines, pmEnabledLines);


TSqlTraceMode Set

TSqlTraceMode Set

Specifies the level of SQL trace statistics level.

Unit

Ora

Syntax

TSqlTraceMode = set of ( smBasicStatistics, smTypicalStatistics, smAllStatistics, smBindVariables, smWaitEvents, smTimedStatistics);


Enumerations in Ora

Enumerations in Ora

Enumerations in the Ora unit.

Enumerations

Name | Description
TCheckMode | Specifies the action to take when another user makes modifications to a record.
TFailoverState | Indicates the failover state.
TFailoverType | Specifies the failover type.
TOraIsolationLevel | Specifies the way the transactions containing database modifications are handled.
TRefreshMode | Defines when to refresh an editing record.
TSequenceMode | Specifies the method used internally to generate sequenced field.


TCheckMode Enumeration

TCheckMode Enumeration

Specifies the action to take when another user makes modifications to a record.

Unit

Ora

Syntax

TCheckMode = (cmNone, cmException, cmRefresh);

Values

Value | Meaning
cmException | If a record was changed, TOraDataSet raises an exception.
cmNone | No check is performed. The default value.
cmRefresh | If a record was changed, TOraDataSet refreshes it.


TFailoverState Enumeration

TFailoverState Enumeration

Indicates the failover state.

Unit

Ora

Syntax

TFailoverState = (fsEnd, fsAbort, fsReauth, fsBegin, fsError);

Values

Value | Meaning
fsAbort | Indicates that failover was unsuccessful and there is no option of retrying.
fsBegin | Indicates that failover has detected a lost connection and failover is starting.
fsEnd | Indicates successful completion of failover.
fsError | Indicates that an error occurred while trying to re-establish the connection.
fsReauth | Indicates that a user handle has been re-authenticated.


TFailoverType Enumeration

TFailoverType Enumeration

Specifies the failover type.

Unit

Ora

Syntax

TFailoverType = (ftSession, ftSelect);

Values

Value | Meaning
ftSelect | Indicates that the user has requested select failover as well.
ftSession | Indicates that the user has requested only session failover.


TOraIsolationLevel Enumeration

TOraIsolationLevel Enumeration

Specifies the way the transactions containing database modifications are handled.

Unit

Ora

Syntax

TOraIsolationLevel = (ilReadCommitted, ilSerializable, ilReadOnly);

Values

Value | Meaning
ilReadCommitted | If the transaction contains DML that requires row locks held by another transaction, then the DML statement waits until the row locks are released. The default Oracle behavior.
ilReadOnly | All subsequent queries in that transaction only see changes committed before the transaction began. Read-only transactions are useful for reports that run multiple queries against one or more tables while other users update these same tables.
ilSerializable | Specifies serializable transaction isolation mode as defined in the SQL92 standard. If a serializable transaction contains data manipulation language (DML) that attempts to update any resource that may have been updated in a transaction uncommitted at the start of the serializable transaction, then the DML statement fails.


TRefreshMode Enumeration

TRefreshMode Enumeration

Defines when to refresh an editing record.

Unit

Ora

Syntax

TRefreshMode = (rmNone, rmAfterInsert, rmAfterUpdate, rmAlways);

Values

Value | Meaning
rmAfterInsert | Refresh is performed after inserting a record.
rmAfterUpdate | Refresh is performed after updating a record.
rmAlways | Refresh is performed after inserting and updating a record.
rmNone | No refresh is performed. The default value.


TSequenceMode Enumeration

TSequenceMode Enumeration

Specifies the method used internally to generate sequenced field.

Unit

Ora

Syntax

TSequenceMode = (smInsert, smPost);

Values

Value | Meaning
smInsert | New record is inserted into the dataset where the first key field is populated with a sequenced value. An application may modify this field before posting the record to the database.
smPost | Database server populates the key field with a sequenced value when application posts the record to the database. Any value put into the key field before post will be overwritten.


Routines in Ora

Routines in Ora

Routines in the Ora unit.

Routines

Name | Description
AddWhere | Appends condition to WHERE clause.
DefaultSession | Call this function to get pointer to default session object.
DeleteWhere | Removes WHERE clause from a SELECT statement.
GetOrderBy | Returns fields from ORDER BY.
SessionByName | Returns pointer to session object by its name.
SetFieldList | Sets list of selecting fields.
SetGroupBy | Sets grouping fields.
SetOrderBy | Sets ordering fields.
SetSubscriptionPort | Sets change notification subscription port. Before setting the subscription port all opened sessions close and oci.dll unloads.
SetTableList | Sets list of tables.
SetWhere | Call this function to replace WHERE clause of a SELECT statement to Condition. You should pass SELECT statement by SQL.If condition is blank SetWhere removes WHERE clause.


Ora.AddWhere Routine

Ora.AddWhere Routine

Appends condition to WHERE clause.

Unit

Ora

Syntax

function AddWhere(SQL: string; Condition: string): string;

Parameters
SQL
Holds a SQL to be modified.
Condition
Holds the condition that will be added to the WHERE clause.
Return Value
modified SQL.


Ora.DefaultSession Routine

Ora.DefaultSession Routine

Call this function to get pointer to default session object.

Unit

Ora

Syntax

function DefaultSession: TOraSession;


Ora.DeleteWhere Routine

Ora.DeleteWhere Routine

Removes WHERE clause from a SELECT statement.

Unit

Ora

Syntax

function DeleteWhere(SQL: string): string;

Parameters
SQL
Holds a SQL to be modified.
Return Value
modified SQL.


Ora.GetOrderBy Routine

Ora.GetOrderBy Routine

Returns fields from ORDER BY.

Unit

Ora

Syntax

function GetOrderBy(SQL: string): string;

Parameters
SQL
Holds a SQL to be modified.
Return Value
modified SQL.


Ora.SessionByName Routine

Ora.SessionByName Routine

Returns pointer to session object by its name.

Unit

Ora

Syntax

function SessionByName(Name: string): TOraSession;

Parameters
Name
Holds the pointer name.
Return Value
pointer to session object.


Ora.SetFieldList Routine

Ora.SetFieldList Routine

Sets list of selecting fields.

Unit

Ora

Syntax

function SetFieldList(SQL: string; Fields: string): string;

Parameters
SQL
Holds a SQL to be modified.
Fields
Holds the list of fields.
Return Value
modified SQL.


Ora.SetGroupBy Routine

Ora.SetGroupBy Routine

Sets grouping fields.

Unit

Ora

Syntax

function SetGroupBy(SQL: string; Fields: string): string;

Parameters
SQL
Holds a SQL to be modified.
Fields
Holds the fields.
Return Value
modified SQL.


Ora.SetOrderBy Routine

Ora.SetOrderBy Routine

Sets ordering fields.

Unit

Ora

Syntax

function SetOrderBy(SQL: string; Fields: string): string;

Parameters
SQL
Holds a SQL to be modified.
Fields
Holds the fields.
Return Value
modified SQL.


Ora.SetSubscriptionPort Routine

Ora.SetSubscriptionPort Routine

Sets change notification subscription port. Before setting the subscription port all opened sessions close and oci.dll unloads.

Unit

Ora

Syntax

procedure SetSubscriptionPort(Value: integer);

Parameters
Value
Holds the of change notification subscription port.


Ora.SetTableList Routine

Ora.SetTableList Routine

Sets list of tables.

Unit

Ora

Syntax

function SetTableList(SQL: string; Tables: string): string;

Parameters
SQL
Holds a SQL to be modified.
Tables
Holds the tables.
Return Value
modified SQL.


Ora.SetWhere Routine

Ora.SetWhere Routine

Call this function to replace WHERE clause of a SELECT statement to Condition. You should pass SELECT statement by SQL.

If condition is blank SetWhere removes WHERE clause.

Unit

Ora

Syntax

function SetWhere(SQL: string; Condition: string): string;

Parameters
SQL
Holds a SQL to be modified.
Condition
Holds the condition that will be added to the WHERE clause.
Return Value
modified SQL.


Variables in Ora

Variables in Ora

Variables in the Ora unit.

Variables

Name | Description
DefSession | Read this variable to get pointer to default session object. Same as DefaultSession function.
Sessions | Holds pointers to all TOraSession objects of an application.
UseDefSession | When set to True enables TOraDataSet and TOraSQL components to use default session if they are not attached to any session.


Ora.DefSession Variable

Ora.DefSession Variable

Read this variable to get pointer to default session object. Same as DefaultSession function.

Unit

Ora

Syntax

DefSession: TOraSession;


Ora.Sessions Variable

Ora.Sessions Variable

Holds pointers to all TOraSession objects of an application.

Unit

Ora

Syntax

Sessions: TSessionList;


Ora.UseDefSession Variable

Ora.UseDefSession Variable

When set to True enables TOraDataSet and TOraSQL components to use default session if they are not attached to any session.

Unit

Ora

Syntax

UseDefSession: boolean;


Constants in Ora

Constants in Ora

Constants in the Ora unit.

Constants

Name | Description
OdacVersion | Read this constant to get current version number for ODAC.
OraQueryCompatibilityMode | All TOraQuery components in project become editable, and can be modified by the end users.


Ora.OdacVersion Constant

Ora.OdacVersion Constant

Read this constant to get current version number for ODAC.

Unit

Ora

Syntax

OdacVersion = '6.90.0.51';


Ora.OraQueryCompatibilityMode Constant

Ora.OraQueryCompatibilityMode Constant

All TOraQuery components in project become editable, and can be modified by the end users.

Unit

Ora

Syntax

OraQueryCompatibilityMode: boolean = False;

Remarks

Before ODAC 6, TOraQuery could be editable only when InsertSQL, UpdateSQL, and DeleteSQL properties are assigned. The ability to generate update SQL statements with TOraQuery automatically was added in ODAC 6.00.0.4. Therefore, after upgrading your ODAC to the sixth version, all TOraQuery components in you project become editable, and can be modified by the end users. To restore the old behavior, set the OraQueryCompatibilityMode variable to True.


OraAlerter Unit Members

OraAlerter Unit Members

This unit contains implementation of the TOraAlerter component.

Classes

Name | Description
TOraAlerter | A component allowing transferring messages between sessions or client applications.

Types

Name | Description
TOnEventEvent | This type is used for the TOraAlerter.OnEvent event.
TOnTimeOutEvent | This type is used for the TOraAlerter.OnTimeOut event.

Enumerations

Name | Description
TMessageType | Defines the type of the next message found in the received named pipe local buffer.


Classes in OraAlerter

Classes in OraAlerter

Classes in the OraAlerter unit.

Classes

Name | Description
TOraAlerter | A component allowing transferring messages between sessions or client applications.


TOraAlerter Class

TOraAlerter Class

A component allowing transferring messages between sessions or client applications.

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

Unit

OraAlerter

Syntax

TOraAlerter = class(TComponent);

Remarks

The TOraAlerter component allows to transfer messages between sessions or client applications. Use the EventType property to specify what kind of messages will be used. The TOraAlerter component supports Oracle alerts by DBMS_ALERT and pipes by DBMS_PIPE. You can send and get messages with the help of this component. When TOraAlerter is started by Start method it waits messages in a background thread. If a message is received, the OnEvent event occurs. If no messages were received during the TimeOut time, the OnTimeOut event occurs.

Note: Alerts are transaction-based. This means that the waiting session does not get alert until the transaction signaling the alert commits.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraAlerter


TOraAlerter Members

TOraAlerter Members

TOraAlerter class overview.

Properties

Name | Description
Active | Defines whether TOraAlerter is waiting for messages.
AlerterSession | Description is not available at the moment.
AutoCommit | Used to specify whether the TOraAlerter object should commit transaction in its Session property after calling the SendEvent method to send a named message to an Oracle server.
Events | Used to set the names of waiting alerts or pipes.
EventType | Used to define the kind of messages used by the TOraAleter component.
Interval | Specifies the time after which TOraAlerter starts waiting process.
Session | Specifies the session for TOraAlerter to create an internal TOraSession object based on this session settings.
TimeOut | Used to set the time for the TOraAlerter component to wait for a message.

Methods

Name | Description
GetMessage | Overloaded.
NextItemType | Returns the datatype of the next message found in the received named pipe local buffer.
NextMessageType | Returns the datatype of the next message found in the received named pipe local buffer.
PackMessage | Places messages into the named pipe local buffer.
PurgePipe | Removes all incoming messages from the pipe's input buffer.
PutMessage | Places messages into the named pipe local buffer.
SendEvent | Sends an event with Name and content Message.
SendMessage | Sends a named pipe event to other listening sessions.
SendPipeMessage | Sends a named pipe event to other listening sessions.
Start | Starts waiting process.
Stop | Stops waiting process.
UnpackMessage | Overloaded. Retrieves messages from a named pipe local buffer.

Events

Name | Description
OnEvent | Occurs if a message is received by waiting process.
OnTimeOut | Occurs if there were no messages during the TimeOut time.


TOraAlerter Properties

TOraAlerter Properties

Properties of the TOraAlerter class.

For a complete list of the TOraAlerter class members, see the TOraAlerter Members topic.

Public

Name | Description
AlerterSession | Description is not available at the moment.

Published

Name | Description
Active | Defines whether TOraAlerter is waiting for messages.
AutoCommit | Used to specify whether the TOraAlerter object should commit transaction in its Session property after calling the SendEvent method to send a named message to an Oracle server.
Events | Used to set the names of waiting alerts or pipes.
EventType | Used to define the kind of messages used by the TOraAleter component.
Interval | Specifies the time after which TOraAlerter starts waiting process.
Session | Specifies the session for TOraAlerter to create an internal TOraSession object based on this session settings.
TimeOut | Used to set the time for the TOraAlerter component to wait for a message.

See Also

  • TOraAlerter Class
  • TOraAlerter Class Members


TOraAlerter.Active Property

TOraAlerter.Active Property

Defines whether TOraAlerter is waiting for messages.

Class

TOraAlerter

Syntax

property Active: boolean default False;

Remarks

Check Active property to learn whether TOraAlerter is waiting for messages.

See Also

  • Start
  • Stop


TOraAlerter.AlerterSession Property

TOraAlerter.AlerterSession Property

Class

TOraAlerter

Syntax

property AlerterSession: TOraSession;

Remarks

Represents the internal TOraAlerter session and provides access to its properties and events at run-time.

See Also

  • Session
  • TOraSession


TOraAlerter.AutoCommit Property

TOraAlerter.AutoCommit Property

Used to specify whether the TOraAlerter object should commit transaction in its Session property after calling the SendEvent method to send a named message to an Oracle server.

Class

TOraAlerter

Syntax

property AutoCommit: boolean default True;

Remarks

Set the AutoCommit property to specify whether the TOraAlerter object should commit transaction in its Session property after calling the SendEvent method to send a named message to an Oracle server.

Setting AutoCommit to True instructs TOraAlerter to commit its session each time an event is sent. Otherwise listening session will have to wait till current transaction terminates and only then it will be notified by the server.

See Also

  • SendEvent


TOraAlerter.Events Property

TOraAlerter.Events Property

Used to set the names of waiting alerts or pipes.

Class

TOraAlerter

Syntax

property Events: string;

Remarks

Use the Events property to set the names of alerts or pipes which are waiting.


TOraAlerter.EventType Property

TOraAlerter.EventType Property

Used to define the kind of messages used by the TOraAleter component.

Class

TOraAlerter

Syntax

property EventType: TEventType;

Remarks

Use EventType to specify what kind of messages is used by the TOraAleter component.


TOraAlerter.Interval Property

TOraAlerter.Interval Property

Specifies the time after which TOraAlerter starts waiting process.

Class

TOraAlerter

Syntax

property Interval: integer default 0;

Remarks

If Interval property is greater than 0, TOraAlerter starts waiting process in Interval seconds after time out occurred.


TOraAlerter.Session Property

TOraAlerter.Session Property

Specifies the session for TOraAlerter to create an internal TOraSession object based on this session settings.

Class

TOraAlerter

Syntax

property Session: TOraSession;

Remarks

Specifies the session for TOraAlerter to create an internal TOraSession object based on this session settings.

Internal TOraSession object is represented by AlerterSession property.

See Also

  • TOraSession
  • AlerterSession


TOraAlerter.TimeOut Property

TOraAlerter.TimeOut Property

Used to set the time for the TOraAlerter component to wait for a message.

Class

TOraAlerter

Syntax

property TimeOut: integer default 0;

Remarks

Use TimeOut property to set the time of waiting message by the TOraAlerter component.


TOraAlerter Methods

TOraAlerter Methods

Methods of the TOraAlerter class.

For a complete list of the TOraAlerter class members, see the TOraAlerter Members topic.

Public

Name | Description
GetMessage | Overloaded.
NextItemType | Returns the datatype of the next message found in the received named pipe local buffer.
NextMessageType | Returns the datatype of the next message found in the received named pipe local buffer.
PackMessage | Places messages into the named pipe local buffer.
PurgePipe | Removes all incoming messages from the pipe's input buffer.
PutMessage | Places messages into the named pipe local buffer.
SendEvent | Sends an event with Name and content Message.
SendMessage | Sends a named pipe event to other listening sessions.
SendPipeMessage | Sends a named pipe event to other listening sessions.
Start | Starts waiting process.
Stop | Stops waiting process.
UnpackMessage | Overloaded. Retrieves messages from a named pipe local buffer.

See Also

  • TOraAlerter Class
  • TOraAlerter Class Members


TOraAlerter.GetMessage Overload

TOraAlerter.GetMessage Overload

Class

TOraAlerter

Overload List

Name | Description
GetMessage | Retrieves messages from a named pipe local buffer.
GetMessage(var Item: variant) | Retrieves messages from a named pipe local buffer.


TOraAlerter.GetMessage Method

TOraAlerter.GetMessage Method

Retrieves messages from a named pipe local buffer.

Class

TOraAlerter

Syntax

function GetMessage: variant; overload

Return Value
True, if the Item parameter holds not Null variant value or False otherwise.

Remarks

Call the GetMessage method to retrieve messages from a named pipe local buffer.

GetMessage is desined to work only with Oracle DBMS_PIPE communication package which is the case only if TOraAlerter.EventType property has been set to etPipe.

Implemntation with the parameter will return True if the Item parameter holds not Null variant value or False otherwise.

Note: This method is considered obsolete now. In newer projects use functionally equivalent TOraAlerter.UnpackMessage method instead.


TOraAlerter.GetMessage Method

TOraAlerter.GetMessage Method

Retrieves messages from a named pipe local buffer.

Class

TOraAlerter

Syntax

function GetMessage(var Item: variant): variant; overload

Parameters
Item
Holds a value received from the pipe.
Return Value
True, if the Item parameter holds not Null variant value or False otherwise.


TOraAlerter.NextItemType Method

TOraAlerter.NextItemType Method

Returns the datatype of the next message found in the received named pipe local buffer.

Class

TOraAlerter

Syntax

function NextItemType: TMessageType;

Return Value
the datatype of the next message found in the received named pipe local buffer.

Remarks

Use NextItemType to retrieve the datatype of the next message found in the received named pipe local buffer.

NextItemType is desined to work only with Oracle DBMS_PIPE communication package which is the case only if EventType property has been set to etPipe.

The mtNone return value indicates that no more messages are found in the local buffer.


TOraAlerter.NextMessageType Method

TOraAlerter.NextMessageType Method

Returns the datatype of the next message found in the received named pipe local buffer.

Class

TOraAlerter

Syntax

function NextMessageType: TMessageType;

Return Value
the datatype of the next message found in the received named pipe local buffer.

Remarks

Use NextMessageType to retrieve the datatype of the next message found in the received named pipe local buffer.

NextMessageType is desined to work only with Oracle DBMS_PIPE communication package which is the case only if EventType property has been set to etPipe.

The return value of mtNone indicates that no more messages are found in the local buffer.

Note: This method is considered obsolete now. In newer projects use functionally equivalent NextItemType method instead.


TOraAlerter.PackMessage Method

TOraAlerter.PackMessage Method

Places messages into the named pipe local buffer.

Class

TOraAlerter

Syntax

procedure PackMessage(Item: variant);

Parameters
Item
Holds the value to be sent in a message.

Remarks

Call PackMessage to place messages into the named pipe local buffer. Local buffer is limited in size to 8192 bytes and besides the actual message values accommodates other internal data. Item will be dropped out if it doesn't fit into available free buffer space.

PackMessage is desined to work only with the Oracle DBMS_PIPE communication package which is the case only if the EventType property has been set to etPipe.


TOraAlerter.PurgePipe Method

TOraAlerter.PurgePipe Method

Removes all incoming messages from the pipe's input buffer.

Class

TOraAlerter

Syntax

procedure PurgePipe;

Remarks

Call PurgePipe to clear the pipe's input buffer.

PurgePipe is desined to work only with the Oracle DBMS_PIPE communication package. So it can be called only if EventType property has been set to etPipe.


TOraAlerter.PutMessage Method

TOraAlerter.PutMessage Method

Places messages into the named pipe local buffer.

Class

TOraAlerter

Syntax

procedure PutMessage(Item: variant);

Parameters
Item
Holds the value to be sent in a message.

Remarks

Call PutMessage to place messages into the named pipe local buffer. Local buffer is limited in size to 8192 bytes and besides the actual message values accommodates other internal data. Item will be dropped out if it doesn't fit into free buffer space.

PutMessage is desined to work only with the Oracle DBMS_PIPE communication package which is the case only if EventType property has been set to etPipe.

Note: This method is now considered obsolete. In newer projects use functionally equivalent PackMessage method instead.


TOraAlerter.SendEvent Method

TOraAlerter.SendEvent Method

Sends an event with Name and content Message.

Class

TOraAlerter

Syntax

procedure SendEvent(Name: string; Message: string);

Parameters
Name
Holds the event name.
Message
Holds the content Message of the event.

Remarks

Use SendEvent procedure to send an event with Name and content Message.


TOraAlerter.SendMessage Method

TOraAlerter.SendMessage Method

Sends a named pipe event to other listening sessions.

Class

TOraAlerter

Syntax

procedure SendMessage(Name: string = '');

Parameters
Name
Holds the name of the pipe.

Remarks

Use SendMessage procedure to send a named pipe event to other listening sessions. The event internally is a local buffer which has been previously filled in by the PutMessage method.

SendMessage is desined to work only with the Oracle DBMS_PIPE communication package which is the case only if EventType property has been set to etPipe.

Note: This method is considered obsolete now. In newer projects use functionally equivalent SendPipeMessage method instead.


TOraAlerter.SendPipeMessage Method

TOraAlerter.SendPipeMessage Method

Sends a named pipe event to other listening sessions.

Class

TOraAlerter

Syntax

procedure SendPipeMessage(Name: string = '');

Parameters
Name
Holds the name of the pipe.

Remarks

Use SendPipeMessage procedure to send a named pipe event to other listening sessions. The event internally is a local buffer which has been previously filled in by the PackMessage method.

SendPipeMessage is desined to work only with the Oracle DBMS_PIPE communication package which is the case only if EventType property has been set to etPipe.


TOraAlerter.Start Method

TOraAlerter.Start Method

Starts waiting process.

Class

TOraAlerter

Syntax

procedure Start;

Remarks

Call Start method to run waiting process. After starting TOraAlerter waits messages with names defined by the Events property.

See Also

  • Stop
  • Active
  • OnEvent
  • OnTimeOut


TOraAlerter.Stop Method

TOraAlerter.Stop Method

Stops waiting process.

Class

TOraAlerter

Syntax

procedure Stop;

Remarks

Call Stop method to end waiting process.

See Also

  • Start


TOraAlerter.UnpackMessage Overload

TOraAlerter.UnpackMessage Overload

Retrieves messages from a named pipe local buffer.

Class

TOraAlerter

Overload List

Name | Description
UnpackMessage | Retrieves messages from a named pipe local buffer.
UnpackMessage(var Item: variant) | Retrieves messages from a named pipe local buffer.


TOraAlerter.UnpackMessage Method

TOraAlerter.UnpackMessage Method

Retrieves messages from a named pipe local buffer.

Class

TOraAlerter

Syntax

function UnpackMessage: variant; overload

Return Value
True, if the Item parameter holds not Null variant value or False otherwise.

Remarks

UnpackMessage function is used to retrieve messages from a named pipe local buffer.

UnpackMessage is desined to work only with the Oracle DBMS_PIPE communication package which is the case only if TOraAlerter.EventType property has been set to etPipe.

An implementation with the parameter will return True if the Item parameter holds not Null variant value or False otherwise.


TOraAlerter.UnpackMessage Method

TOraAlerter.UnpackMessage Method

Retrieves messages from a named pipe local buffer.

Class

TOraAlerter

Syntax

function UnpackMessage(var Item: variant): variant; overload

Parameters
Item
Holds a value received from the pipe.
Return Value
True, if the Item parameter holds not Null variant value or False otherwise.


TOraAlerter Events

TOraAlerter Events

Events of the TOraAlerter class.

For a complete list of the TOraAlerter class members, see the TOraAlerter Members topic.

Published

Name | Description
OnEvent | Occurs if a message is received by waiting process.
OnTimeOut | Occurs if there were no messages during the TimeOut time.

See Also

  • TOraAlerter Class
  • TOraAlerter Class Members


TOraAlerter.OnEvent Event

TOraAlerter.OnEvent Event

Occurs if a message is received by waiting process.

Class

TOraAlerter

Syntax

property OnEvent: TOnEventEvent;

Remarks

Occurs when waiting process receives some message. The event parameter is the name of an event (alert or pipe) and Message is its content.

See Also

  • OnTimeOut


TOraAlerter.OnTimeOut Event

TOraAlerter.OnTimeOut Event

Occurs if there were no messages during the TimeOut time.

Class

TOraAlerter

Syntax

property OnTimeOut: TOnTimeOutEvent;

Remarks

Occurs when there were no messages during the TimeOut time. Assign True to the Continue parameter to continue waiting messages. If Continue is False (by default) waiting process is stopped.

See Also

  • TimeOut
  • OnEvent


Types in OraAlerter

Types in OraAlerter

Types in the OraAlerter unit.

Types

Name | Description
TOnEventEvent | This type is used for the TOraAlerter.OnEvent event.
TOnTimeOutEvent | This type is used for the TOraAlerter.OnTimeOut event.


TOnEventEvent Procedure Reference

TOnEventEvent Procedure Reference

This type is used for the TOraAlerter.OnEvent event.

Unit

OraAlerter

Syntax

TOnEventEvent = procedure (Sender: TObject; Event: string; Message: string) of object;

Parameters
Sender
An object that raised the event.
Event
A name of event (alert or pipe).
Message
The content of message waiting process receives.


TOnTimeOutEvent Procedure Reference

TOnTimeOutEvent Procedure Reference

This type is used for the TOraAlerter.OnTimeOut event.

Unit

OraAlerter

Syntax

TOnTimeOutEvent = procedure (Sender: TObject; var Continue: boolean) of object;

Parameters
Sender
An object that raised the event.
Continue
True, if waiting messages process should be continued. If False (by default), the waiting process is stopped.


Enumerations in OraAlerter

Enumerations in OraAlerter

Enumerations in the OraAlerter unit.

Enumerations

Name | Description
TMessageType | Defines the type of the next message found in the received named pipe local buffer.


TMessageType Enumeration

TMessageType Enumeration

Defines the type of the next message found in the received named pipe local buffer.

Unit

OraAlerter

Syntax

TMessageType = (mtNone, mtNumber, mtString, mtDate);

Values

Value | Meaning
mtDate | Indicates that the messages found in the local buffer are of the Date type.
mtNone | Indicates that no more messages are found in the local buffer.
mtNumber | Indicates that the messages found in the local buffer are of the Number type.
mtString | Indicates that the messages found in the local buffer are of the String type.


OraAQ Unit Members

OraAQ Unit Members

This unit contains ODAC components for working with Oracle Advanced Queueing.

Classes

Name | Description
TDequeueOptions | A base class for setting default dequeue options for the queue or for using special dequeue options when calling the TOraQueue.Dequeue or TOraQueue.DequeueArray methods.
TEnqueueOptions | A base class for setting default or special enqueue options for a queue.
TOraQueue | A component providing access to Oracle Streams Advanced Queuing.
TOraQueueAdmin | A component for managing queues in a database.
TOraQueueTable | A component managing queue tables in a database.
TQueueAgent | A class reperesenting a producer or a consumer of a queue message.
TQueueAgents | A class holding a collection of the TQueueAgent objects.
TQueueMessage | A class representing a queue message.
TQueueMessageProperties | A class for setting or providing queue message properties.

Types

Name | Description
TQueueMessageEvent | This type is used for the TOraQueue.OnMessage event.

Enumerations

Name | Description
TDequeueMode | Specifies the locking behavior associated with the dequeue.
TQueueDeliveryMode | Specifies the type of the message that will be dequeued.
TQueueMessageGrouping | Specifies the message grouping behavior in the queues based on this table.
TQueueMessageState | Specifies the message state.
TQueueNavigation | Specifies the position of the message that will be retrieved.
TQueueSequenceDeviation | Specifies if a message should be enqueued before other messages.
TQueueSortList | Specifies the columnt that will be used as a sort key.
TQueueType | Specifies whether the queue being created is an exception queue or a normal queue.
TQueueVisibility | Specifies the transaction behaviour of the dequeue or enqueue request.


Classes in OraAQ

Classes in OraAQ

Classes in the OraAQ unit.

Classes

Name | Description
TDequeueOptions | A base class for setting default dequeue options for the queue or for using special dequeue options when calling the TOraQueue.Dequeue or TOraQueue.DequeueArray methods.
TEnqueueOptions | A base class for setting default or special enqueue options for a queue.
TOraQueue | A component providing access to Oracle Streams Advanced Queuing.
TOraQueueAdmin | A component for managing queues in a database.
TOraQueueTable | A component managing queue tables in a database.
TQueueAgent | A class reperesenting a producer or a consumer of a queue message.
TQueueAgents | A class holding a collection of the TQueueAgent objects.
TQueueMessage | A class representing a queue message.
TQueueMessageProperties | A class for setting or providing queue message properties.


TDequeueOptions Class

TDequeueOptions Class

A base class for setting default dequeue options for the queue or for using special dequeue options when calling the TOraQueue.Dequeue or TOraQueue.DequeueArray methods.

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

Unit

OraAQ

Syntax

TDequeueOptions = class(TPersistent);

Remarks

Use the TDequeueOptions class for setting default dequeue options for the queue or for using special dequeue options when calling TOraQueue.Dequeue or TOraQueue.DequeueArray methods.

Inheritance Hierarchy

TObject
TPersistent
TDequeueOptions

See Also

  • TOraQueue.Dequeue
  • TOraQueue.DequeueArray
  • TOraQueue.DequeueOptions


TDequeueOptions Members

TDequeueOptions Members

TDequeueOptions class overview.

Properties

Name | Description
ConsumerName | Used to specify the name of the consumer.
Correlation | Used to specify the correlation identifier of the message to be dequeued.
DeliveryMode | Used to specify the type of the message that will be dequeued.
DequeueCondition | Used to specify the conditional expression based on the message properties, the message data properties, and PL/SQL functions.
DequeueMode | Used to specify the locking behaviour associated with the dequeue.
MessageId | Used to specify the message ID for the message to be dequeued.
Navigation | Used to specify the position of the message that will be retrieved.
Transformation | Used to specify a transformation that will be applied after dequeuing the message.
Visibility | Used to specify the transactional behavior of the dequeue request.
WaitTimeout | Specifies the time to wait if there is no message matching the search criteria.


TDequeueOptions Properties

TDequeueOptions Properties

Properties of the TDequeueOptions class.

For a complete list of the TDequeueOptions class members, see the TDequeueOptions Members topic.

Public

Name | Description
MessageId | Used to specify the message ID for the message to be dequeued.

Published

Name | Description
ConsumerName | Used to specify the name of the consumer.
Correlation | Used to specify the correlation identifier of the message to be dequeued.
DeliveryMode | Used to specify the type of the message that will be dequeued.
DequeueCondition | Used to specify the conditional expression based on the message properties, the message data properties, and PL/SQL functions.
DequeueMode | Used to specify the locking behaviour associated with the dequeue.
Navigation | Used to specify the position of the message that will be retrieved.
Transformation | Used to specify a transformation that will be applied after dequeuing the message.
Visibility | Used to specify the transactional behavior of the dequeue request.
WaitTimeout | Specifies the time to wait if there is no message matching the search criteria.

See Also

  • TDequeueOptions Class
  • TDequeueOptions Class Members


TDequeueOptions.ConsumerName Property

TDequeueOptions.ConsumerName Property

Used to specify the name of the consumer.

Class

TDequeueOptions

Syntax

property ConsumerName: string;

Remarks

Use ConsumerName property to specify the name of the consumer.


TDequeueOptions.Correlation Property

TDequeueOptions.Correlation Property

Used to specify the correlation identifier of the message to be dequeued.

Class

TDequeueOptions

Syntax

property Correlation: string;

Remarks

Use Correlation property to specify the correlation identifier of the message to be dequeued.


TDequeueOptions.DeliveryMode Property

TDequeueOptions.DeliveryMode Property

Used to specify the type of the message that will be dequeued.

Class

TDequeueOptions

Syntax

property DeliveryMode: TQueueDeliveryMode default qdmPersistent;

Remarks

Use the DeliveryMode property to specify the type of the message that will be dequeued. Use it with Oracle 10 and higher.

See Also

  • TEnqueueOptions.DeliveryMode
  • TQueueMessageProperties.DeliveryMode


TDequeueOptions.DequeueCondition Property

TDequeueOptions.DequeueCondition Property

Used to specify the conditional expression based on the message properties, the message data properties, and PL/SQL functions.

Class

TDequeueOptions

Syntax

property DequeueCondition: string;

Remarks

Use DequeueCondition property to specify the conditional expression based on the message properties, the message data properties, and PL/SQL functions. It should be a boolean expression like a SQL WHERE clause. DequeueCondition should not exceed 4000 characters.


TDequeueOptions.DequeueMode Property

TDequeueOptions.DequeueMode Property

Used to specify the locking behaviour associated with the dequeue.

Class

TDequeueOptions

Syntax

property DequeueMode: TDequeueMode default dqmRemove;

Remarks

Use DequeueMode property to specify the locking behavior associated with the dequeue.


TDequeueOptions.MessageId Property

TDequeueOptions.MessageId Property

Used to specify the message ID for the message to be dequeued.

Class

TDequeueOptions

Syntax

property MessageId: string;

Remarks

Use the MessageId property to specify the message ID for the message to be dequeued.


TDequeueOptions.Navigation Property

TDequeueOptions.Navigation Property

Used to specify the position of the message that will be retrieved.

Class

TDequeueOptions

Syntax

property Navigation: TQueueNavigation default qnNextMessage;

Remarks

Use the Navigation property to specify the position of the message that will be retrieved.


TDequeueOptions.Transformation Property

TDequeueOptions.Transformation Property

Used to specify a transformation that will be applied after dequeuing the message.

Class

TDequeueOptions

Syntax

property Transformation: string;

Remarks

Use the Transformation property to specify a transformation that will be applied after dequeuing the message. Use it with Oracle 10 and higher.

See Also

  • TEnqueueOptions.Transformation


TDequeueOptions.Visibility Property

TDequeueOptions.Visibility Property

Used to specify the transactional behavior of the dequeue request.

Class

TDequeueOptions

Syntax

property Visibility: TQueueVisibility default qvOnCommit;

Remarks

Use Visibility property to specify the transactional behavior of the dequeue request.

See Also

  • TEnqueueOptions.Visibility


TDequeueOptions.WaitTimeout Property

TDequeueOptions.WaitTimeout Property

Specifies the time to wait if there is no message matching the search criteria.

Class

TDequeueOptions

Syntax

property WaitTimeout: integer default AQ_FOREVER;

Remarks

Use WaitTimeout property to specify the wait time in seconds if there is currently no message matching the search criteria available. You can use constants AQ_FOREVER (the default value - wait forever) and AQ_NO_WAIT (do not wait).


TEnqueueOptions Class

TEnqueueOptions Class

A base class for setting default or special enqueue options for a queue.

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

Unit

OraAQ

Syntax

TEnqueueOptions = class(TPersistent);

Remarks

Use the TEnqueueOptions class for setting default enqueue options for a queue or for using special enqueue options when calling TOraQueue.Enqueue or the TOraQueue.EnqueueArraymethod.

Inheritance Hierarchy

TObject
TPersistent
TEnqueueOptions

See Also

  • TOraQueue.Enqueue
  • TOraQueue.EnqueueArray
  • TOraQueue.EnqueueOptions


TEnqueueOptions Members

TEnqueueOptions Members

TEnqueueOptions class overview.

Properties

Name | Description
DeliveryMode | Used to specify the type of the message that will be enqueued.
RelativeMessageId | Used to specify the message identifier of the message which is used in the sequence deviation operation.
SequenceDeviation | Description is not available at the moment.
Transformation | Used to specify the transformation that will be applied before enqueuing a message.
Visibility | Used to specify the transactional behavior of the enqueue request.


TEnqueueOptions Properties

TEnqueueOptions Properties

Properties of the TEnqueueOptions class.

For a complete list of the TEnqueueOptions class members, see the TEnqueueOptions Members topic.

Public

Name | Description
RelativeMessageId | Used to specify the message identifier of the message which is used in the sequence deviation operation.

Published

Name | Description
DeliveryMode | Used to specify the type of the message that will be enqueued.
SequenceDeviation | Description is not available at the moment.
Transformation | Used to specify the transformation that will be applied before enqueuing a message.
Visibility | Used to specify the transactional behavior of the enqueue request.

See Also

  • TEnqueueOptions Class
  • TEnqueueOptions Class Members


TEnqueueOptions.DeliveryMode Property

TEnqueueOptions.DeliveryMode Property

Used to specify the type of the message that will be enqueued.

Class

TEnqueueOptions

Syntax

property DeliveryMode: TQueueDeliveryMode default qdmPersistent;

Remarks

Use the DeliveryMode property to specify the type of the message that will be enqueued. Use it with Oracle 10 and higher.

See Also

  • TDequeueOptions.DeliveryMode
  • TQueueMessageProperties.DeliveryMode


TEnqueueOptions.RelativeMessageId Property

TEnqueueOptions.RelativeMessageId Property

Used to specify the message identifier of the message which is used in the sequence deviation operation.

Class

TEnqueueOptions

Syntax

property RelativeMessageId: string;

Remarks

Use the RelativeMsgid property to specify the message identifier of the message which is used in the sequence deviation operation. Ignored if SequenceDeviation is not set to sdBefore.

See Also

  • SequenceDeviation


TEnqueueOptions.SequenceDeviation Property

TEnqueueOptions.SequenceDeviation Property

Class

TEnqueueOptions

Syntax

property SequenceDeviation: TQueueSequenceDeviation default qsdNone;

Remarks

Use SequenceDeviation property to specify whether the enqueued message should be dequeued before other messages that are in the queue already.

See Also

  • RelativeMessageId


TEnqueueOptions.Transformation Property

TEnqueueOptions.Transformation Property

Used to specify the transformation that will be applied before enqueuing a message.

Class

TEnqueueOptions

Syntax

property Transformation: string;

Remarks

Use the Transformation property to specify a transformation that will be applied before enqueuing a message. Use it with Oracle 10 and higher.

See Also

  • TDequeueOptions.Transformation


TEnqueueOptions.Visibility Property

TEnqueueOptions.Visibility Property

Used to specify the transactional behavior of the enqueue request.

Class

TEnqueueOptions

Syntax

property Visibility: TQueueVisibility default qvOnCommit;

Remarks

Use the Visibility property to specify the transactional behavior of the enqueue request.

See Also

  • TDequeueOptions.Visibility


TOraQueue Class

TOraQueue Class

A component providing access to Oracle Streams Advanced Queuing.

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

Unit

OraAQ

Syntax

TOraQueue = class(TComponent);

Remarks

The TOraQueue component provides access to Oracle Streams Advanced Queuing. It allows to enqueue and dequeue messages and to listen to the queue.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraQueue


TOraQueue Members

TOraQueue Members

TOraQueue class overview.

Properties

Name | Description
AsyncNotification | Used to generate the OnMessage event each time when a new message is enqueued.
DequeueOptions | Used to set the default message dequeuing options.
EnqueueMessageProperties | Used to set the default enqueuing message properties.
EnqueueOptions | Used to set the default message enqueuing options.
PayloadArrayTypeName | Contains the type name of associative array, VARRAY, or nested table of queue payload type.
PayloadTypeName | Contains the payload type for the queue.
QueueName | Used to set the name of the Oracle queue to operation.
Session | Used to specify the session through which a queue will be controlled.

Methods

Name | Description
Dequeue | Overloaded. Dequeues messages.
DequeueArray | Dequeues an array of messages.
Enqueue | Overloaded. Enqueues messages.
EnqueueArray | Enqueues an array of messages.
Listen | Overloaded. Listens to one or more queues on behalf of the list of agents.

Events

Name | Description
OnMessage | Occurs when new messages are enqueued.


TOraQueue Properties

TOraQueue Properties

Properties of the TOraQueue class.

For a complete list of the TOraQueue class members, see the TOraQueue Members topic.

Public

Name | Description
PayloadArrayTypeName | Contains the type name of associative array, VARRAY, or nested table of queue payload type.
PayloadTypeName | Contains the payload type for the queue.

Published

Name | Description
AsyncNotification | Used to generate the OnMessage event each time when a new message is enqueued.
DequeueOptions | Used to set the default message dequeuing options.
EnqueueMessageProperties | Used to set the default enqueuing message properties.
EnqueueOptions | Used to set the default message enqueuing options.
QueueName | Used to set the name of the Oracle queue to operation.
Session | Used to specify the session through which a queue will be controlled.

See Also

  • TOraQueue Class
  • TOraQueue Class Members


TOraQueue.AsyncNotification Property

TOraQueue.AsyncNotification Property

Used to generate the OnMessage event each time when a new message is enqueued.

Class

TOraQueue

Syntax

property AsyncNotification: boolean default False;

Remarks

If the AsyncNotification propery is True, the TOraQueue component will generate the OnMessage event each time when a new message is enqueued.

When setting the AsyncNotification value to True, a message subscription is created in the queue. When setting the property value to False, the subscription is unregistered.

Active session is required to change the value of AsyncNotification, but TOraQueue doesn't need a session to get notifications. You can disconnect after setting the AsyncNotification value.

AsyncNotification property works only if OCI is initialized with the OCI_EVENTS flag. By default ODAC sets this flag if the OCI version is 9.0 or higher. If you need to use AsyncNotification with Oracle client 8.1, you should set the OCIEventsVersion variable from OraCall unit to 8100 in the initialization section of one of your program units.

AsyncNotification is not supported in Direct mode.

Note, the Oracle client version 8.1 has a bug when the NAMES.DEFAULT_DOMAIN parameter in the sqlnet.ora file is not working when the OCI_EVENTS flag is set.

See Also

  • OnMessage
  • Ora.GetSubscriptionPort
  • Ora.SetSubscriptionPort


TOraQueue.DequeueOptions Property

TOraQueue.DequeueOptions Property

Used to set the default message dequeuing options.

Class

TOraQueue

Syntax

property DequeueOptions: TDequeueOptions;

Remarks

Use the DequeueOptions property to set the default message dequeuing options.

See Also

  • TDequeueOptions
  • EnqueueOptions


TOraQueue.EnqueueMessageProperties Property

TOraQueue.EnqueueMessageProperties Property

Used to set the default enqueuing message properties.

Class

TOraQueue

Syntax

property EnqueueMessageProperties: TQueueMessageProperties;

Remarks

Use the EnqueueMessageProperties property to set the default enqueuing message properties.

See Also

  • TQueueMessageProperties


TOraQueue.EnqueueOptions Property

TOraQueue.EnqueueOptions Property

Used to set the default message enqueuing options.

Class

TOraQueue

Syntax

property EnqueueOptions: TEnqueueOptions;

Remarks

Use the EnqueueOptions property to set the default message enqueuing options.

See Also

  • TEnqueueOptions
  • DequeueOptions


TOraQueue.PayloadArrayTypeName Property

TOraQueue.PayloadArrayTypeName Property

Contains the type name of associative array, VARRAY, or nested table of queue payload type.

Class

TOraQueue

Syntax

property PayloadArrayTypeName: string;

Remarks

The PayLoadArrayTypeName property contains the type name of associative array, VARRAY, or nested table of queue payload type. It is used by EnqueueArray and DequeueArray functions.

See Also

  • EnqueueArray
  • DequeueArray
  • PayloadTypeName


TOraQueue.PayloadTypeName Property

TOraQueue.PayloadTypeName Property

Contains the payload type for the queue.

Class

TOraQueue

Syntax

property PayloadTypeName: string;

Remarks

The PayloadTypeName property contains the payload type for the queue. PayloadType can be 'RAW' or the name of an object type. PayloadType value is used in Dequeue method. If value of the property is not set then Dequeue method will get payload type from the server before dequeuing message.


TOraQueue.QueueName Property

TOraQueue.QueueName Property

Used to set the name of the Oracle queue to operation.

Class

TOraQueue

Syntax

property QueueName: string;

Remarks

Use the QueueName property to set the name of the Oracle queue to operation.


TOraQueue.Session Property

TOraQueue.Session Property

Used to specify the session through which a queue will be controlled.

Class

TOraQueue

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session through which a queue will be controlled.

See Also

  • TOraSession


TOraQueue Methods

TOraQueue Methods

Methods of the TOraQueue class.

For a complete list of the TOraQueue class members, see the TOraQueue Members topic.

Public

Name | Description
Dequeue | Overloaded. Dequeues messages.
DequeueArray | Dequeues an array of messages.
Enqueue | Overloaded. Enqueues messages.
EnqueueArray | Enqueues an array of messages.
Listen | Overloaded. Listens to one or more queues on behalf of the list of agents.

See Also

  • TOraQueue Class
  • TOraQueue Class Members


TOraQueue.Dequeue Overload

TOraQueue.Dequeue Overload

Dequeues messages.

Class

TOraQueue

Overload List

Name | Description
Dequeue(Payload: TOraObject; MessageProperties: TQueueMessageProperties; DequeueOptions: TDequeueOptions) | Dequeueus a message as a TOraObject.
Dequeue(Message: TQueueMessage; DequeueOptions: TDequeueOptions) | Dequeueus messages.
Dequeue(out Payload: TBytes; MessageProperties: TQueueMessageProperties; DequeueOptions: TDequeueOptions) | Dequeueus a message as array of Byte.
Dequeue(out Payload: string; MessageProperties: TQueueMessageProperties; DequeueOptions: TDequeueOptions) | Dequeues string messages.


TOraQueue.Dequeue Method

TOraQueue.Dequeue Method

Dequeueus a message as a TOraObject.

Class

TOraQueue

Syntax

function Dequeue(Payload: TOraObject; MessageProperties: TQueueMessageProperties = nil; DequeueOptions: TDequeueOptions = nil): TMessageId; overload

Parameters
Payload
Holds a message content as a TOraObject.
MessageProperties
Holds the properties of a message that will be dequeued.
DequeueOptions
Holds the options for dequeueing messages.
Return Value
message ID as string.

Remarks

Use one of Dequeue method overloads to dequeue messages. Use overloads with string or TBytes payload for queues with the RAW payload type. For queues with the object payload type pass TOraObject instance with appropriate object type to Dequeue method. If DequeueOptions parameter was not specified, the TOraQueue.DequeueOptions property of TOraQueue component will be used. MessageProperties parameter will be filled with the properties of the dequeued message.

In Direct mode only queues with RAW payload are supported.


TOraQueue.Dequeue Method

TOraQueue.Dequeue Method

Dequeueus messages.

Class

TOraQueue

Syntax

function Dequeue(Message: TQueueMessage; DequeueOptions: TDequeueOptions = nil): TMessageId; overload

Parameters
Message
Holds the message content.
DequeueOptions
Holds the options for dequeueing messages.
Return Value
message ID as string.


TOraQueue.Dequeue Method

TOraQueue.Dequeue Method

Dequeueus a message as array of Byte.

Class

TOraQueue

Syntax

function Dequeue(out Payload: TBytes; MessageProperties: TQueueMessageProperties = nil; DequeueOptions: TDequeueOptions = nil): TMessageId; overload

Parameters
Payload
Holds the message content as array of Byte.
MessageProperties
Holds the properties of a message that will be dequeued.
DequeueOptions
Holds the options for dequeueing messages.
Return Value
message ID as string.


TOraQueue.Dequeue Method

TOraQueue.Dequeue Method

Dequeues string messages.

Class

TOraQueue

Syntax

function Dequeue(out Payload: string; MessageProperties: TQueueMessageProperties = nil; DequeueOptions: TDequeueOptions = nil): TMessageId; overload

Parameters
Payload
Holds a message as string.
MessageProperties
Holds the properties of a message that will be dequeued.
DequeueOptions
Holds the options for dequeueing messages.
Return Value
message ID as string.

See Also

  • TOraQueue.OnMessage
  • TOraQueue.DequeueOptions
  • TOraQueue.Enqueue
  • TOraQueue.DequeueArray
  • TQueueMessage
  • TDequeueOptions
  • TQueueMessageProperties
  • TOraObject


TOraQueue.DequeueArray Method

TOraQueue.DequeueArray Method

Dequeues an array of messages.

Class

TOraQueue

Syntax

function DequeueArray(const MessageArray: array of TQueueMessage; out DequeuedSize: integer; DequeueOptions: TDequeueOptions = nil): TMessageIds;

Parameters
MessageArray
An array of messages to dequeue.
DequeuedSize
Returns the number of dequeued messages.
DequeueOptions
Holds the options for dequeueing messages.
Return Value
an array of message IDs.

Remarks

Use DequeueArray method to dequeue an array of messages. If DequeueOptions parameter was not specified, DequeueOptions property of TOraQueue component will be used. DequeuedSize returns the number of the dequeued messages.

See Also

  • OnMessage
  • TDequeueOptions
  • Dequeue
  • EnqueueArray
  • TQueueMessage
  • TQueueMessageProperties
  • TOraObject


TOraQueue.Enqueue Overload

TOraQueue.Enqueue Overload

Enqueues messages.

Class

TOraQueue

Overload List

Name | Description
Enqueue(Payload: TOraObject; MessageProperties: TQueueMessageProperties; EnqueueOptions: TEnqueueOptions) | Enqueueus a message as TOraObject.
Enqueue(Message: TQueueMessage; EnqueueOptions: TEnqueueOptions) | Enqueues messages.
Enqueue(const Payload: TBytes; MessageProperties: TQueueMessageProperties; EnqueueOptions: TEnqueueOptions) | Enqueueus a message as array of Byte.
Enqueue(const Payload: string; MessageProperties: TQueueMessageProperties; EnqueueOptions: TEnqueueOptions) | Enqueues string messages.


TOraQueue.Enqueue Method

TOraQueue.Enqueue Method

Enqueueus a message as TOraObject.

Class

TOraQueue

Syntax

function Enqueue(Payload: TOraObject; MessageProperties: TQueueMessageProperties = nil; EnqueueOptions: TEnqueueOptions = nil): TMessageId; overload

Parameters
Payload
a message content as a TOraObject.
MessageProperties
Holds the properties of the message which will be enqueued.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Value
a message ID.

Remarks

Use one of the Enqueue method overloads to enqueue messages. Use overloads with string or TBytes payload for queues with the RAW payload type. For queues with object payload type pass the TOraObject instance with appropriate object type to the Enqueue method. If EnqueueOptions or MessageProperies parameters were not specified, the TOraQueue.EnqueueOptions and TOraQueue.EnqueueMessageProperties properties of TOraQueue component will be used.

In Direct mode only queues with RAW payload are supported.


TOraQueue.Enqueue Method

TOraQueue.Enqueue Method

Enqueues messages.

Class

TOraQueue

Syntax

function Enqueue(Message: TQueueMessage; EnqueueOptions: TEnqueueOptions = nil): TMessageId; overload

Parameters
Message
Holds the message content.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Value
a message ID.


TOraQueue.Enqueue Method

TOraQueue.Enqueue Method

Enqueueus a message as array of Byte.

Class

TOraQueue

Syntax

function Enqueue(const Payload: TBytes; MessageProperties: TQueueMessageProperties = nil; EnqueueOptions: TEnqueueOptions = nil): TMessageId; overload

Parameters
Payload
Holds the message content as array of Byte.
MessageProperties
Holds the properties of the message which will be enqueued.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Value
a message ID.


TOraQueue.Enqueue Method

TOraQueue.Enqueue Method

Enqueues string messages.

Class

TOraQueue

Syntax

function Enqueue(const Payload: string; MessageProperties: TQueueMessageProperties = nil; EnqueueOptions: TEnqueueOptions = nil): TMessageId; overload

Parameters
Payload
Holds a message as a string.
MessageProperties
Holds the properties of the message which will be enqueued.
EnqueueOptions
Holds the options fore enqueueing messages.
Return Value
a message ID.

See Also

  • TOraQueue.OnMessage
  • TOraQueue.EnqueueOptions
  • TOraQueue.EnqueueMessageProperties
  • TOraQueue.Dequeue
  • TQueueMessage
  • TEnqueueOptions
  • TQueueMessageProperties
  • TOraObject


TOraQueue.EnqueueArray Method

TOraQueue.EnqueueArray Method

Enqueues an array of messages.

Class

TOraQueue

Syntax

function EnqueueArray(const MessageArray: array of TQueueMessage; EnqueueOptions: TEnqueueOptions = nil): TMessageIds;

Parameters
MessageArray
Holds an array of messages to enqueue.
EnqueueOptions
Holds the options for enqueueing messages.
Return Value
an array of message IDs.

Remarks

Use the EnqueueArray method to enqueue an array of messages. If the EnqueueOptions parameter was not specified, the EnqueueOptions property of TOraQueue will be used. DequeuedSize returns the number of dequeued messages.


TOraQueue.Listen Overload

TOraQueue.Listen Overload

Listens to one or more queues on behalf of the list of agents.

Class

TOraQueue

Overload List

Name | Description
Listen(Agents: TQueueAgents; Agent: TQueueAgent; WaitTimeout: integer) | Listens to one or more queues on behalf of the list of agents.
Listen(Agents: TQueueAgents; ListDeliveryMode: TQueueDeliveryMode; Agent: TQueueAgent; var MessageDeliveryMode: TQueueDeliveryMode; WaitTimeout: integer) | Listens to one or more queues on behalf of the list of agents.


TOraQueue.Listen Method

TOraQueue.Listen Method

Listens to one or more queues on behalf of the list of agents.

Class

TOraQueue

Syntax

procedure Listen(Agents: TQueueAgents; Agent: TQueueAgent; WaitTimeout: integer = AQ_FOREVER); overload

Parameters
Agents
Holds the list of the agents.
Agent
Holds the agent name when monitoring multiconsumer queues.
WaitTimeout
Holds the amount of time to wait if there are no messages found.

Remarks

Call the Listen method to listen to one or more queues on behalf of the list of agents. You specify the queue to be monitored in the address field of each agent listed. You must also specify the name of the agent when monitoring multiconsumer queues. For single-consumer queues, an agent name must not be specified. Only local queues are supported as addresses.

This is a blocking call that returns when there is a message ready for consumption for an agent in the list. If there are messages for more than one agent, only the first agent listed is returned. If there are no messages found when the wait time expires, an error is raised.

A successful return from the LISTEN call is only an indication that there is a message for one of the listed agents in one of the specified queues. The interested agent must still dequeue the relevant message.

Second overload with DeliveryMode is supported starting with Oracle 10. DeliveryMode possible values are described in TDequeueOptions.DeliveryMode topic.

See Also

  • TDequeueOptions.DeliveryMode
  • TQueueAgent
  • TQueueAgents


TOraQueue.Listen Method

TOraQueue.Listen Method

Listens to one or more queues on behalf of the list of agents.

Class

TOraQueue

Syntax

procedure Listen(Agents: TQueueAgents; ListDeliveryMode: TQueueDeliveryMode; Agent: TQueueAgent; var MessageDeliveryMode: TQueueDeliveryMode; WaitTimeout: integer = AQ_FOREVER); overload

Parameters
Agents
Holds the list of the agents.
ListDeliveryMode
Holds the message type (persistent, buffered messages or both).
Agent
Holds the agent name when monitoring multiconsumer queues.
MessageDeliveryMode
Holds the message type along with the queue and consumer for whom there is a message.
WaitTimeout
Holds the amount of time to wait if there are no messages found.


TOraQueue Events

TOraQueue Events

Events of the TOraQueue class.

For a complete list of the TOraQueue class members, see the TOraQueue Members topic.

Published

Name | Description
OnMessage | Occurs when new messages are enqueued.

See Also

  • TOraQueue Class
  • TOraQueue Class Members


TOraQueue.OnMessage Event

TOraQueue.OnMessage Event

Occurs when new messages are enqueued.

Class

TOraQueue

Syntax

property OnMessage: TQueueMessageEvent;

Remarks

Use OnMessage event handler to get notifications when new messages are enqueued. Set the AsyncNotification property to True to get OnMessage events.

To get the payload for the message assign MessageId value passed to the event handler to the TDequeueOptions.MessageId property in DequeueOptions and then call TOraQueue.Dequeue.

See Also

  • AsyncNotification
  • TQueueMessageProperties
  • DequeueOptions
  • TDequeueOptions.MessageId


TOraQueueAdmin Class

TOraQueueAdmin Class

A component for managing queues in a database.

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

Unit

OraAQ

Syntax

TOraQueueAdmin = class(TComponent);

Remarks

Use the TOraQueueAdmin component to manage queues in a database.

Database user must have AQ_ADMINISTRATOR_ROLE to work with TOraQueueAdmin component.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraQueueAdmin


TOraQueueAdmin Members

TOraQueueAdmin Members

TOraQueueAdmin class overview.

Properties

Name | Description
Comment | Used to get or set the user-specified description of the queue.
MaxRetries | Used to specify the number of attempts to dequeue message.
MultipleConsumers | Enables the possibility of using definite table for queues that can have multiple consumers for each message.
QueueName | Used to set the name of the Oracle queue to operate.
QueueTableName | Used to set or get the queue table for the queue.
QueueType | Indicates whether the queue being created is an exception queue or a normal queue.
RetentionTime | Used to set the time in seconds for which a message remains in the queue after being dequeued.
RetryDelay | Used to get or set delay time in seconds before the message that failed to be dequeued, will be scheduled to processing again.
Session | Used to specify the session through which queues will be managed.

Methods

Name | Description
AddSubscriber | Adds a subscriber to the queue.
AlterComment | Alters the user-defined queue description.
AlterMaxRetries | Alters the number of attempts to dequeue a message.
AlterPropagationSchedule | Alters parameters for a propagation schedule.
AlterQueue | Alters queue properties.
AlterRetentionTime | Alters the time in seconds during which a message remains in the queue after being dequeued.
AlterRetryDelay | Alters the delay time in seconds before the message, which failed to be dequeued, will be scheduled to processing again.
AlterSubscriber | Alters the rule and transformation properties of a queue subscriber.
CreateQueue | Creates a queue with the name, specified by the TOraQueueAdmin.QueueName property.
DisablePropagationSchedule | Disables a propagation schedule.
DropQueue | Drops the queue specified by the TOraQueueAdmin.QueueName property.
EnablePropagationSchedule | Enables a previously disabled propagation schedule.
GetSubscribers | Provides the list of queue subscribers.
GrantQueuePrivilege | Grants queue privilege to the grantee.
ReadQueueProperties | Reads the information about a queue specified by the TOraQueueAdmin.QueueName property from the database to a TOraQueueAdmin component.
RemoveSubscriber | Removes a subscriber from the queue.
RevokeQueuePrivilege | Revokes queue privilege from a grantee.
SchedulePropagation | Schedules the propagation of messages from the queue to a destination identified by a specific database link.
StartDequeue | Enables dequeueing on a queue.
StartEnqueue | Enables enqueueing on a queue.
StartQueue | Enables enqueueing, dequeueing, or both on a queue.
StopDequeue | Disables dequeueing on a queue.
StopEnqueue | Disables enqueueing on a queue.
StopQueue | Stops enqueueing, dequeueing, or both on a queue.
UnschedulePropagation | Unschedules previously scheduled propagation of messages from the queue to the specified destination.
VerifyQueueTypes | Verifies that the current queue and destination queue have the same type.


TOraQueueAdmin Properties

TOraQueueAdmin Properties

Properties of the TOraQueueAdmin class.

For a complete list of the TOraQueueAdmin class members, see the TOraQueueAdmin Members topic.

Published

Name | Description
Comment | Used to get or set the user-specified description of the queue.
MaxRetries | Used to specify the number of attempts to dequeue message.
MultipleConsumers | Enables the possibility of using definite table for queues that can have multiple consumers for each message.
QueueName | Used to set the name of the Oracle queue to operate.
QueueTableName | Used to set or get the queue table for the queue.
QueueType | Indicates whether the queue being created is an exception queue or a normal queue.
RetentionTime | Used to set the time in seconds for which a message remains in the queue after being dequeued.
RetryDelay | Used to get or set delay time in seconds before the message that failed to be dequeued, will be scheduled to processing again.
Session | Used to specify the session through which queues will be managed.

See Also

  • TOraQueueAdmin Class
  • TOraQueueAdmin Class Members


TOraQueueAdmin.Comment Property

TOraQueueAdmin.Comment Property

Used to get or set the user-specified description of the queue.

Class

TOraQueueAdmin

Syntax

property Comment: string;

Remarks

Call the Comment property to get or set the user-specified description of the queue.


TOraQueueAdmin.MaxRetries Property

TOraQueueAdmin.MaxRetries Property

Used to specify the number of attempts to dequeue message.

Class

TOraQueueAdmin

Syntax

property MaxRetries: integer default AQ_NOT_DEFINED;

Remarks

Use the MaxRetries property to specify the number of attempts to dequeue message.

See Also

  • RetryDelay


TOraQueueAdmin.MultipleConsumers Property

TOraQueueAdmin.MultipleConsumers Property

Enables the possibility of using definite table for queues that can have multiple consumers for each message.

Class

TOraQueueAdmin

Syntax

property MultipleConsumers: boolean default False;

Remarks

Should be set to True to use definite table for queues that can have multiple consumers for each message. False is the default value and means that queues, based on this table can have only one consumer for each message.


TOraQueueAdmin.QueueName Property

TOraQueueAdmin.QueueName Property

Used to set the name of the Oracle queue to operate.

Class

TOraQueueAdmin

Syntax

property QueueName: string;

Remarks

Use the QueueName property to set the name of the Oracle queue to operate.


TOraQueueAdmin.QueueTableName Property

TOraQueueAdmin.QueueTableName Property

Used to set or get the queue table for the queue.

Class

TOraQueueAdmin

Syntax

property QueueTableName: string;

Remarks

Use the QueueTableName property to set or get the queue table for the queue.


TOraQueueAdmin.QueueType Property

TOraQueueAdmin.QueueType Property

Indicates whether the queue being created is an exception queue or a normal queue.

Class

TOraQueueAdmin

Syntax

property QueueType: TQueueType default qtNormalQueue;

Remarks

Use the QueueType property to specify whether the queue being created is an exception queue or a normal queue. Only the dequeue operation is allowed in the exception queue. The default value is qtNormalQueue.


TOraQueueAdmin.RetentionTime Property

TOraQueueAdmin.RetentionTime Property

Used to set the time in seconds for which a message remains in the queue after being dequeued.

Class

TOraQueueAdmin

Syntax

property RetentionTime: integer default 0;

Remarks

Use the RetentionTime property to set the time in seconds for which a message remains in the queue after being dequeued. The default value is 0.


TOraQueueAdmin.RetryDelay Property

TOraQueueAdmin.RetryDelay Property

Used to get or set delay time in seconds before the message that failed to be dequeued, will be scheduled to processing again.

Class

TOraQueueAdmin

Syntax

property RetryDelay: integer default 0;

Remarks

Use the RetryDelay property to get or set delay time in seconds before the message that failed to be dequeued, will be scheduled to processing again. The default value is 0. Useless if MaxRetries property is set to 0.


TOraQueueAdmin.Session Property

TOraQueueAdmin.Session Property

Used to specify the session through which queues will be managed.

Class

TOraQueueAdmin

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session through which queues will be managed.

See Also

  • TOraSession


TOraQueueAdmin Methods

TOraQueueAdmin Methods

Methods of the TOraQueueAdmin class.

For a complete list of the TOraQueueAdmin class members, see the TOraQueueAdmin Members topic.

Public

Name | Description
AddSubscriber | Adds a subscriber to the queue.
AlterComment | Alters the user-defined queue description.
AlterMaxRetries | Alters the number of attempts to dequeue a message.
AlterPropagationSchedule | Alters parameters for a propagation schedule.
AlterQueue | Alters queue properties.
AlterRetentionTime | Alters the time in seconds during which a message remains in the queue after being dequeued.
AlterRetryDelay | Alters the delay time in seconds before the message, which failed to be dequeued, will be scheduled to processing again.
AlterSubscriber | Alters the rule and transformation properties of a queue subscriber.
CreateQueue | Creates a queue with the name, specified by the TOraQueueAdmin.QueueName property.
DisablePropagationSchedule | Disables a propagation schedule.
DropQueue | Drops the queue specified by the TOraQueueAdmin.QueueName property.
EnablePropagationSchedule | Enables a previously disabled propagation schedule.
GetSubscribers | Provides the list of queue subscribers.
GrantQueuePrivilege | Grants queue privilege to the grantee.
ReadQueueProperties | Reads the information about a queue specified by the TOraQueueAdmin.QueueName property from the database to a TOraQueueAdmin component.
RemoveSubscriber | Removes a subscriber from the queue.
RevokeQueuePrivilege | Revokes queue privilege from a grantee.
SchedulePropagation | Schedules the propagation of messages from the queue to a destination identified by a specific database link.
StartDequeue | Enables dequeueing on a queue.
StartEnqueue | Enables enqueueing on a queue.
StartQueue | Enables enqueueing, dequeueing, or both on a queue.
StopDequeue | Disables dequeueing on a queue.
StopEnqueue | Disables enqueueing on a queue.
StopQueue | Stops enqueueing, dequeueing, or both on a queue.
UnschedulePropagation | Unschedules previously scheduled propagation of messages from the queue to the specified destination.
VerifyQueueTypes | Verifies that the current queue and destination queue have the same type.

See Also

  • TOraQueueAdmin Class
  • TOraQueueAdmin Class Members


TOraQueueAdmin.AddSubscriber Method

TOraQueueAdmin.AddSubscriber Method

Adds a subscriber to the queue.

Class

TOraQueueAdmin

Syntax

procedure AddSubscriber(Subscriber: TQueueAgent; const Rule: string = ''; const Transformation: string = ''; QueueToQueue: boolean = False; DeliveryMode: TQueueDeliveryMode = qdmPersistent);

Parameters
Subscriber
Holds an agent on whose behalf the subscription is being defined.
Rule
Holds a conditional expression based on the message properties, the message data properties, and PL/SQL functions.
Transformation
Holds the transformation that will be applied when this subscriber dequeues the message.
QueueToQueue
Is True, if propagation is from queue-to-queue.
DeliveryMode
Holds the delivery mode of the messages the subscriber is interested in. See TDequeueOptions.DeliveryMode for more information.

Remarks

Call the AddSubscriber method to add a subscriber to the queue.

See Also

  • AlterSubscriber
  • RemoveSubscriber
  • TDequeueOptions.DeliveryMode
  • TQueueAgent


TOraQueueAdmin.AlterComment Method

TOraQueueAdmin.AlterComment Method

Alters the user-defined queue description.

Class

TOraQueueAdmin

Syntax

procedure AlterComment(const Comment: string);

Parameters
Comment
Holds the user-defined queue description.

Remarks

Call the AlterComment method to alter the user-defined queue description.

See Also

  • AlterQueue
  • Comment


TOraQueueAdmin.AlterMaxRetries Method

TOraQueueAdmin.AlterMaxRetries Method

Alters the number of attempts to dequeue a message.

Class

TOraQueueAdmin

Syntax

procedure AlterMaxRetries(MaxRetries: integer);

Parameters
MaxRetries
Holds the number of attempts that can be taken to dequeue a message.

Remarks

Call the AlterMaxRetries method to alter the number of attempts to dequeue a message.

See Also

  • AlterQueue
  • MaxRetries


TOraQueueAdmin.AlterPropagationSchedule Method

TOraQueueAdmin.AlterPropagationSchedule Method

Alters parameters for a propagation schedule.

Class

TOraQueueAdmin

Syntax

procedure AlterPropagationSchedule(const Destination: string; Duration: integer; const NextTime: string; Latency: integer; const DestinationQueue: string = '');

Parameters
Destination
Holds the destination database link.
Duration
Holds the duration of the propagation window in seconds (NULL value means the propagation window is unscheduled forever or until the propagation).
NextTime
Holds the date function to compute the start of the next propagation window from the end of the current window.
Latency
Holds the maximum wait time in seconds in the propagation window for a message to be propagated after it is enqueued.
DestinationQueue
Holds the name of the destination queue. This parameter is supported starting with Oracle 10.

Remarks

Call the AlterPropagationSchedule method to alter parameters for a propagation schedule.

See Also

  • SchedulePropagation
  • DisablePropagationSchedule
  • UnschedulePropagation


TOraQueueAdmin.AlterQueue Method

TOraQueueAdmin.AlterQueue Method

Alters queue properties.

Class

TOraQueueAdmin

Syntax

procedure AlterQueue(MaxRetries: integer; RetryDelay: integer = AQ_NOT_DEFINED; RetentionTime: integer = AQ_NOT_DEFINED; const Comment: string = '');

Parameters
MaxRetries
Holds the number of attempts to dequeue message.
RetryDelay
Holds the delay time before the message that failed to be dequeued, will be scheduled to processing again.
RetentionTime
Holds the time for which a message remains in the queue after being dequeued.
Comment
Holds the user-specified description of the queue.

Remarks

Call the AlterQueue method to alter queue properties.

See Also

  • MaxRetries
  • RetryDelay
  • RetentionTime
  • Comment
  • AlterMaxRetries
  • AlterRetryDelay
  • AlterRetentionTime
  • AlterComment


TOraQueueAdmin.AlterRetentionTime Method

TOraQueueAdmin.AlterRetentionTime Method

Alters the time in seconds during which a message remains in the queue after being dequeued.

Class

TOraQueueAdmin

Syntax

procedure AlterRetentionTime(RetentionTime: integer);

Parameters
RetentionTime
Holds the time for which a message remains in the queue after being dequeued.

Remarks

Call the AlterRetentionTime method to alter the time in seconds during which a message remains in the queue after being dequeued.

See Also

  • AlterQueue
  • RetentionTime


TOraQueueAdmin.AlterRetryDelay Method

TOraQueueAdmin.AlterRetryDelay Method

Alters the delay time in seconds before the message, which failed to be dequeued, will be scheduled to processing again.

Class

TOraQueueAdmin

Syntax

procedure AlterRetryDelay(RetryDelay: integer);

Parameters
RetryDelay
Holds the delay time before the message that failed to be dequeued, will be scheduled to processing again.

Remarks

Call the AlterRetryDelay method to alter delay time in seconds before the message, which failed to be dequeued, will be scheduled to processing again.

See Also

  • AlterQueue
  • RetryDelay


TOraQueueAdmin.AlterSubscriber Method

TOraQueueAdmin.AlterSubscriber Method

Alters the rule and transformation properties of a queue subscriber.

Class

TOraQueueAdmin

Syntax

procedure AlterSubscriber(Subscriber: TQueueAgent; const Rule: string; const Transformation: string = '');

Parameters
Subscriber
Holds an agent on whose behalf the subscription is being defined.
Rule
Holds a conditional expression based on the message properties, the message data properties, and PL/SQL functions.
Transformation
Holds the transformation that will be applied when this subscriber dequeues the message.

Remarks

Call the AlterSubscriber method to alter the rule and transformation properties of a queue subscriber.

See Also

  • AddSubscriber
  • RemoveSubscriber
  • TQueueAgent


TOraQueueAdmin.CreateQueue Method

TOraQueueAdmin.CreateQueue Method

Creates a queue with the name, specified by the QueueName property.

Class

TOraQueueAdmin

Syntax

procedure CreateQueue(NonPersistent: boolean = False);

Parameters
NonPersistent
Holds True, if the created queue should be persistent. False otherwise.

Remarks

Call the CreateQueue method to create a queue with the name, specified by QueueName property. When creating a persistent queue, properties

  • QueueTableName
  • QueueType,
  • MaxRetries,
  • RetryDelay,
  • RetentionTime,
  • Comment

will be used as parameters for the new queue.

When creating a non-persistent queue, TOraQueueAdmin component uses properties MultipleConsumers and Comment.


TOraQueueAdmin.DisablePropagationSchedule Method

TOraQueueAdmin.DisablePropagationSchedule Method

Disables a propagation schedule.

Class

TOraQueueAdmin

Syntax

procedure DisablePropagationSchedule(const Destination: string; const DestinationQueue: string = '');

Parameters
Destination
Holds the destination database link.
DestinationQueue
Holds the name of the destination queue.

Remarks

Call the DisablePropagationSchedule method to disable a propagation schedule. The DestinationQueue parameter is supported starting with Oracle 10.

See Also

  • EnablePropagationSchedule
  • SchedulePropagation
  • UnschedulePropagation
  • AlterPropagationSchedule


TOraQueueAdmin.DropQueue Method

TOraQueueAdmin.DropQueue Method

Drops the queue specified by the QueueName property.

Class

TOraQueueAdmin

Syntax

procedure DropQueue;

Remarks

Call the DropQueue method to drop the queue specified by the QueueName property.

See Also

  • QueueName


TOraQueueAdmin.EnablePropagationSchedule Method

TOraQueueAdmin.EnablePropagationSchedule Method

Enables a previously disabled propagation schedule.

Class

TOraQueueAdmin

Syntax

procedure EnablePropagationSchedule(const Destination: string; const DestinationQueue: string = '');

Parameters
Destination
Holds the destination database link.
DestinationQueue
Holds the name of the destination queue.

Remarks

Use the EnablePropagationSchedule method to enable a previously disabled propagation schedule. DestinationQueue parameter is supported starting with Oracle 10.

See Also

  • DisablePropagationSchedule
  • SchedulePropagation
  • AlterPropagationSchedule


TOraQueueAdmin.GetSubscribers Method

TOraQueueAdmin.GetSubscribers Method

Provides the list of queue subscribers.

Class

TOraQueueAdmin

Syntax

procedure GetSubscribers(Subscribers: TQueueAgents);

Parameters
Subscribers
Holds a list of TOraAgent objects.

Remarks

Call the GetSubscribers method to get queue subscribers.

See Also

  • AddSubscriber
  • RemoveSubscriber
  • TQueueAgents


TOraQueueAdmin.GrantQueuePrivilege Method

TOraQueueAdmin.GrantQueuePrivilege Method

Grants queue privilege to the grantee.

Class

TOraQueueAdmin

Syntax

procedure GrantQueuePrivilege(Privilege: TQueuePrivilege; const Grantee: string; GrantOption: boolean = False);

Parameters
Privilege
Holds the kind of privilege.
Grantee
Holds the grantee name.
GrantOption
True, if the privilege will be granted with GRANT OPTION. False otherwise.

Remarks

Use the GrantQueuePrivilege method to grant queue privilege to the grantee. Privilege can be qpEnqueue (ENQUEUE privilege), qpDequeue (DEQUEUE privilege) or qpAll (both ENQUEUE and DEQUEUE privileges). If GrantOption parameter is set to True, the privilege will be granted with GRANT OPTION.

See Also

  • RevokeQueuePrivilege


TOraQueueAdmin.ReadQueueProperties Method

TOraQueueAdmin.ReadQueueProperties Method

Reads the information about a queue specified by the QueueName property from the database to a TOraQueueAdmin component.

Class

TOraQueueAdmin

Syntax

procedure ReadQueueProperties;

Remarks

Call the ReadQueueProperties method to read the information about a queue specified by the QueueName property from the database to a TOraQueueAdmin component. After calling this method use properties

  • QueueTableName
  • QueueType,
  • MaxRetries,
  • RetryDelay,
  • RetentionTime,
  • Comment

to get queue parameters.


TOraQueueAdmin.RemoveSubscriber Method

TOraQueueAdmin.RemoveSubscriber Method

Removes a subscriber from the queue.

Class

TOraQueueAdmin

Syntax

procedure RemoveSubscriber(Subscriber: TQueueAgent);

Parameters
Subscriber
Holds an agent on whose behalf the subscription is being defined.

Remarks

Call the RemoveSubscriber method to remove a subscriber from the queue. All references to the subscriber in existing messages will be also removed.

See Also

  • GetSubscribers
  • AddSubscriber
  • TQueueAgent


TOraQueueAdmin.RevokeQueuePrivilege Method

TOraQueueAdmin.RevokeQueuePrivilege Method

Revokes queue privilege from a grantee.

Class

TOraQueueAdmin

Syntax

procedure RevokeQueuePrivilege(Privilege: TQueuePrivilege; const Grantee: string);

Parameters
Privilege
Holds the kind of privilege.
Grantee
Holds the grantee name.

Remarks

Call the RevokeQueuePrivilege method to revoke queue privilege from a grantee. The privilege can be qpEnqueue (ENQUEUE privilege), qpDequeue (DEQUEUE privilege) or qpAll (both ENQUEUE and DEQUEUE privileges).

See Also

  • GrantQueuePrivilege


TOraQueueAdmin.SchedulePropagation Method

TOraQueueAdmin.SchedulePropagation Method

Schedules the propagation of messages from the queue to a destination identified by a specific database link.

Class

TOraQueueAdmin

Syntax

procedure SchedulePropagation(const Destination: string; StartTime: TDateTime; Duration: integer; const NextTime: string; Latency: integer; const DestinationQueue: string = '');

Parameters
Destination
Holds the destination database link.
StartTime
Holds the initial start time for the propagation window for messages from the queue to the destination.
Duration
Holds the duration of the propagation window in seconds.
NextTime
Holds the date function to compute the start of the next propagation window from the end of the current window.
Latency
Holds the maximum wait time in seconds in the propagation window for a message to be propagated after it is enqueued.
DestinationQueue
Holds the name of the destination queue. DestinationQueue parameter is supported starting with Oracle 10.

Remarks

Call the SchedulePropagation metod to schedule the propagation of messages from the queue to a destination identified by a specific database link.

See Also

  • UnschedulePropagation
  • AlterPropagationSchedule
  • EnablePropagationSchedule


TOraQueueAdmin.StartDequeue Method

TOraQueueAdmin.StartDequeue Method

Enables dequeueing on a queue.

Class

TOraQueueAdmin

Syntax

procedure StartDequeue;

Remarks

Call the StartDequeue method to enable dequeueing on a queue.

See Also

  • StartQueue
  • StartEnqueue
  • StopDequeue


TOraQueueAdmin.StartEnqueue Method

TOraQueueAdmin.StartEnqueue Method

Enables enqueueing on a queue.

Class

TOraQueueAdmin

Syntax

procedure StartEnqueue;

Remarks

Call the StartEnqueue method to enable enqueueing on a queue.

See Also

  • StartQueue
  • StartDequeue
  • StopEnqueue


TOraQueueAdmin.StartQueue Method

TOraQueueAdmin.StartQueue Method

Enables enqueueing, dequeueing, or both on a queue.

Class

TOraQueueAdmin

Syntax

procedure StartQueue(Enqueue: boolean = True; Dequeue: boolean = True);

Parameters
Enqueue
True, if enqueueing is enabled. False otherwise.
Dequeue
True, if dequeueing is enabled. False otherwise.

Remarks

Call the StopQueue method to enable enqueueing, dequeueing, or both on a queue.

See Also

  • StartEnqueue
  • StartDequeue
  • StopQueue


TOraQueueAdmin.StopDequeue Method

TOraQueueAdmin.StopDequeue Method

Disables dequeueing on a queue.

Class

TOraQueueAdmin

Syntax

procedure StopDequeue(Wait: boolean = True);

Parameters
Wait
True, if waiting for the completion of the currently active queue transactions is enabled.

Remarks

Call the StopDequeue method to disable dequeueing on a queue. The Wait parameter specifies whether to wait for the completion of the currently active queue transactions.

See Also

  • StopQueue
  • StopEnqueue
  • StartDequeue


TOraQueueAdmin.StopEnqueue Method

TOraQueueAdmin.StopEnqueue Method

Disables enqueueing on a queue.

Class

TOraQueueAdmin

Syntax

procedure StopEnqueue(Wait: boolean = True);

Parameters
Wait
True, if wait for the completion of the currently active queue transactions is enabled.

Remarks

Call the StopEnqueue method to disable enqueueing on a queue. The Wait parameter specifies whether to wait for the completion of the currently active queue transactions.

See Also

  • StopQueue
  • StopDequeue
  • StartEnqueue


TOraQueueAdmin.StopQueue Method

TOraQueueAdmin.StopQueue Method

Stops enqueueing, dequeueing, or both on a queue.

Class

TOraQueueAdmin

Syntax

procedure StopQueue(Enqueue: boolean = True; Dequeue: boolean = True; Wait: boolean = True);

Parameters
Enqueue
True, if enqueueing is stopped. False otherwise.
Dequeue
True, if dequeueing is stopped. False otherwise.
Wait
True, if waiting for the completion of the currently active queue transactions is enabled.

Remarks

Call the StopQueue method to stop enqueueing, dequeueing, or both on a queue. The Wait parameter specifies whether to wait for the completion of the currently active queue transactions.

See Also

  • StopEnqueue
  • StopDequeue
  • StartQueue


TOraQueueAdmin.UnschedulePropagation Method

TOraQueueAdmin.UnschedulePropagation Method

Unschedules previously scheduled propagation of messages from the queue to the specified destination.

Class

TOraQueueAdmin

Syntax

procedure UnschedulePropagation(const Destination: string; const DestinationQueue: string = '');

Parameters
Destination
Holds the destination database link.
DestinationQueue
Holds the name of the destination queue. This parameter is supported starting with Oracle 10.

Remarks

Call the UnschedulePropagation method to unschedule previously scheduled propagation of messages from the queue to the specified destination (database link). DestinationQueue parameter is supported starting with Oracle 10.

See Also

  • SchedulePropagation
  • AlterPropagationSchedule
  • DisablePropagationSchedule


TOraQueueAdmin.VerifyQueueTypes Method

TOraQueueAdmin.VerifyQueueTypes Method

Verifies that the current queue and destination queue have the same type.

Class

TOraQueueAdmin

Syntax

function VerifyQueueTypes(const DestQueueName: string; const Destination: string): boolean;

Parameters
DestQueueName
Holds the name of the destination queue.
Destination
Holds the destination database link.
Return Value
True, if the queues have the same type.

Remarks

Call the VerifyQueueTypes method to verify that the current queue and destination queue have the same type.


TOraQueueTable Class

TOraQueueTable Class

A component managing queue tables in a database.

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

Unit

OraAQ

Syntax

TOraQueueTable = class(TComponent);

Remarks

Use the TOraQueueTable component to manage queue tables in a database.

Database user must have AQ_ADMINISTRATOR_ROLE to work with the TOraQueueTable component.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraQueueTable

See Also

  • Working with TOraQueue, TOraQueueAdmin and TOraQueueTable Components
  • TOraQueueAdmin
  • TOraQueue


TOraQueueTable Members

TOraQueueTable Members

TOraQueueTable class overview.

Properties

Name | Description
Comment | Used to det or set a user-specified description of teh queue table.
Compatible | Used to define the lowest database version the queue is compatible with.
MessageGrouping | Used to specify the message grouping behavior in the queues based on this table.
MultipleConsumers | Used if a definite table for queues that can have multiple consumers for each message is needed.
PayloadTypeName | Used to get or set the object type name for the queue payload.
PrimaryInstance | Used to set the primary owner of the queue table.
QueueTableName | Used to get or set the queue table name.
SecondaryInstance | Used to set the secondary owner of the queue table.
Secure | Used for queue tables that will be used for secure queues.
Session | Used to specify the session through which a queue table will be controlled.
SortList | Used to specify the columns to be used as the sort key.
StorageClause | Used to get or set the table storage clause.

Methods

Name | Description
AlterComment | Alters queue table user-defined description.
AlterPrimaryInstance | Changes queue table primary_instance parameter.
AlterQueueTable | Changes existing queue table properties.
AlterSecondaryInstance | Changes the queue table secondary_instance parameter.
CreateQueueTable | Creates a queue table in a database.
DropQueueTable | Drops the queue table.
GrantSystemPrivilege | Grants system queue privilege.
MigrateQueueTable | Used to upgrade or downgrade a queue table to the desired Compatible parameter value.
PurgeQueueTable | Purges records from the queue table.
ReadQueueTableProperties | Reads information about a queue table specified by the QueueTableName property from the database to the TOraQueueTable component.
RevokeSystemPrivilege | Revokes system queue privilege.


TOraQueueTable Properties

TOraQueueTable Properties

Properties of the TOraQueueTable class.

For a complete list of the TOraQueueTable class members, see the TOraQueueTable Members topic.

Published

Name | Description
Comment | Used to det or set a user-specified description of teh queue table.
Compatible | Used to define the lowest database version the queue is compatible with.
MessageGrouping | Used to specify the message grouping behavior in the queues based on this table.
MultipleConsumers | Used if a definite table for queues that can have multiple consumers for each message is needed.
PayloadTypeName | Used to get or set the object type name for the queue payload.
PrimaryInstance | Used to set the primary owner of the queue table.
QueueTableName | Used to get or set the queue table name.
SecondaryInstance | Used to set the secondary owner of the queue table.
Secure | Used for queue tables that will be used for secure queues.
Session | Used to specify the session through which a queue table will be controlled.
SortList | Used to specify the columns to be used as the sort key.
StorageClause | Used to get or set the table storage clause.

See Also

  • TOraQueueTable Class
  • TOraQueueTable Class Members


TOraQueueTable.Comment Property

TOraQueueTable.Comment Property

Used to det or set a user-specified description of teh queue table.

Class

TOraQueueTable

Syntax

property Comment: string;

Remarks

Use The Comment property to get user-specified description of the queue table or to set it. It is used by the CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.Compatible Property

TOraQueueTable.Compatible Property

Used to define the lowest database version the queue is compatible with.

Class

TOraQueueTable

Syntax

property Compatible: TQueueCompatible default qcDefault;

Remarks

Use the Compatible property to determine the lowest database version with which the queue is compatible. The default value is qcDefault. The meaning of this value depends on the database compatible mode. For more information read the Oracle documentation. This property is used by the CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.MessageGrouping Property

TOraQueueTable.MessageGrouping Property

Used to specify the message grouping behavior in the queues based on this table.

Class

TOraQueueTable

Syntax

property MessageGrouping: TQueueMessageGrouping default qmgNone;

Remarks

Use the MessageGrouping property to determine message grouping behavior in the queues based on this table. mgNone means that each queue message is treated individually, mgTransactional means that messages, enqueued in one transaction, will belong to the same group. The default value is mgNone. This property is used by the CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.MultipleConsumers Property

TOraQueueTable.MultipleConsumers Property

Used if a definite table for queues that can have multiple consumers for each message is needed.

Class

TOraQueueTable

Syntax

property MultipleConsumers: boolean default False;

Remarks

The MultipleConsumers property should be set to True to use a definite table for queues that can have multiple consumers for each message. False is the default value and means that queues, based on this table can have only one consumer for each message. This property is used by the CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.PayloadTypeName Property

TOraQueueTable.PayloadTypeName Property

Used to get or set the object type name for the queue payload.

Class

TOraQueueTable

Syntax

property PayloadTypeName: string stored IsPayloadTypeNameStored;

Remarks

Use the PayloadTypeName property to get or set the object type name for the queue payload. This property is used by the CreateQueueTable method. This property is set to 'RAW' for RAW payload.

See Also

  • CreateQueueTable


TOraQueueTable.PrimaryInstance Property

TOraQueueTable.PrimaryInstance Property

Used to set the primary owner of the queue table.

Class

TOraQueueTable

Syntax

property PrimaryInstance: integer default 0;

Remarks

Use the PrimaryInstance property to get or set primary owner of the queue table. Queue monitor scheduling and propagation for the queues in the queue table are done in this instance. The default value for primary instance is 0, what means that queue monitor scheduling and propagation will be done in any available instance. This property is used by CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.QueueTableName Property

TOraQueueTable.QueueTableName Property

Used to get or set the queue table name.

Class

TOraQueueTable

Syntax

property QueueTableName: string;

Remarks

Use the QueueTableName property to get or set the queue table name. This property is used by the CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.SecondaryInstance Property

TOraQueueTable.SecondaryInstance Property

Used to set the secondary owner of the queue table.

Class

TOraQueueTable

Syntax

property SecondaryInstance: integer default 0;

Remarks

The queue table fails over the secondary instance if the primary instance is not available. The default value is 0. It means that the queue table will fail over any available instance. This property is used by CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.Secure Property

TOraQueueTable.Secure Property

Used for queue tables that will be used for secure queues.

Class

TOraQueueTable

Syntax

property Secure: boolean default False;

Remarks

The Secure property must be True for queue tables that will be used for secure queues. It is used by the CreateQueueTable method.

See Also

  • CreateQueueTable


TOraQueueTable.Session Property

TOraQueueTable.Session Property

Used to specify the session through which a queue table will be controlled.

Class

TOraQueueTable

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session through which a queue table will be controlled.

See Also

  • TOraSession


TOraQueueTable.SortList Property

TOraQueueTable.SortList Property

Used to specify the columns to be used as the sort key.

Class

TOraQueueTable

Syntax

property SortList: TQueueSortList default qslDefault;

Remarks

Use the SortList property to specify the columns to be used as the sort key in the ascending order.

See Also

  • CreateQueueTable


TOraQueueTable.StorageClause Property

TOraQueueTable.StorageClause Property

Used to get or set the table storage clause.

Class

TOraQueueTable

Syntax

property StorageClause: string;

Remarks

Use the StorageClause property to get or set the table storage clause. It is used by the CreateQueueTable method. May contain any SQL code that can be in the CREATE TABLE storage clause.

See Also

  • CreateQueueTable


TOraQueueTable Methods

TOraQueueTable Methods

Methods of the TOraQueueTable class.

For a complete list of the TOraQueueTable class members, see the TOraQueueTable Members topic.

Public

Name | Description
AlterComment | Alters queue table user-defined description.
AlterPrimaryInstance | Changes queue table primary_instance parameter.
AlterQueueTable | Changes existing queue table properties.
AlterSecondaryInstance | Changes the queue table secondary_instance parameter.
CreateQueueTable | Creates a queue table in a database.
DropQueueTable | Drops the queue table.
GrantSystemPrivilege | Grants system queue privilege.
MigrateQueueTable | Used to upgrade or downgrade a queue table to the desired Compatible parameter value.
PurgeQueueTable | Purges records from the queue table.
ReadQueueTableProperties | Reads information about a queue table specified by the QueueTableName property from the database to the TOraQueueTable component.
RevokeSystemPrivilege | Revokes system queue privilege.

See Also

  • TOraQueueTable Class
  • TOraQueueTable Class Members


TOraQueueTable.AlterComment Method

TOraQueueTable.AlterComment Method

Alters queue table user-defined description.

Class

TOraQueueTable

Syntax

procedure AlterComment(const Comment: string);

Parameters
Comment
Holds the user-defined description of the queue-table.

Remarks

Call the AlterComment method to alter queue table user-defined description.

See Also

  • Comment
  • AlterQueueTable


TOraQueueTable.AlterPrimaryInstance Method

TOraQueueTable.AlterPrimaryInstance Method

Changes queue table primary_instance parameter.

Class

TOraQueueTable

Syntax

procedure AlterPrimaryInstance(PrimaryInstance: integer);

Parameters
PrimaryInstance
Holds the primary owner of the queue table.

Remarks

Call the AlterPrimaryInstance method to alter queue table primary_instance parameter.

See Also

  • PrimaryInstance
  • AlterQueueTable


TOraQueueTable.AlterQueueTable Method

TOraQueueTable.AlterQueueTable Method

Changes existing queue table properties.

Class

TOraQueueTable

Syntax

procedure AlterQueueTable(const Comment: string; PrimaryInstance: integer = AQ_NOT_DEFINED; SecondaryInstance: integer = AQ_NOT_DEFINED);

Parameters
Comment
Holds the user-defined description of the queue-table.
PrimaryInstance
Holds the primary owner of the queue table.
SecondaryInstance
Holds the secondary owner of the queue table.

Remarks

Call the AlterQueueTable method to alter existing queue table properties. You can alter the following properties: Comment, PrimaryInstance, SecondaryInstance.

See Also

  • Comment
  • PrimaryInstance
  • SecondaryInstance
  • AlterComment
  • AlterSecondaryInstance
  • AlterPrimaryInstance


TOraQueueTable.AlterSecondaryInstance Method

TOraQueueTable.AlterSecondaryInstance Method

Changes the queue table secondary_instance parameter.

Class

TOraQueueTable

Syntax

procedure AlterSecondaryInstance(SecondaryInstance: integer);

Parameters
SecondaryInstance
Holds the secondary owner of the queue table.

Remarks

Call the AlterSecondaryInstance method to alter queue table secondary_instance parameter.

See Also

  • SecondaryInstance
  • AlterQueueTable


TOraQueueTable.CreateQueueTable Method

TOraQueueTable.CreateQueueTable Method

Creates a queue table in a database.

Class

TOraQueueTable

Syntax

procedure CreateQueueTable;

Remarks

Call the CreateQueueTable method to create a queue table in a database. The QueueTableName property of the TOraQueueTable component will be used as a name for the queue table. Properties

  • StorageClause,
  • PayloadTypeName,
  • SortList,
  • MultipleConsumers,
  • MessageGrouping,
  • Comment,
  • PrimaryInstance,
  • SecondaryInstance,
  • Compatible,
  • Secure

will be used as parameters for a new queue table.


TOraQueueTable.DropQueueTable Method

TOraQueueTable.DropQueueTable Method

Drops the queue table.

Class

TOraQueueTable

Syntax

procedure DropQueueTable(Force: boolean = False);

Parameters
Force
If True, stops and dropps all queues in the table automatically. Otherwise the table will not be dropped if there are any queues in it.

Remarks

Call the DropQueueTable method to drop the queue table. If the Force parameter is set to False, the table will not be dropped if there are any queues in the table. Otherwise all queues will be stopped and dropped automatically.


TOraQueueTable.GrantSystemPrivilege Method

TOraQueueTable.GrantSystemPrivilege Method

Grants system queue privilege.

Class

TOraQueueTable

Syntax

procedure GrantSystemPrivilege(Privilege: TQueueSystemPrivilege; const Grantee: string; AdminOption: boolean = False);

Parameters
Privilege
Holds a system privilege to a grant.
Grantee
Holds the user name, a role, or a PUBLIC role.
AdminOption
Specifies whether the privilege will be granted with ADMIN OPTION.

Remarks

Call the GrantSystemPrivilege method to grant system queue privilege. Privilege parameter is a system privilege to grant. Can be qspEnqueueAny (ENQUEUE_ANY privilege), qspDequeueAny (DEQUEUE_ANY privilege), qspManageAny (MANAGE_ANY privilege). Grantee parameter is a grantee - can be a user, a role, or the PUBLIC role. AdminOption parameter specifies whether the privilege will be granted with ADMIN OPTION.

See Also

  • RevokeSystemPrivilege


TOraQueueTable.MigrateQueueTable Method

TOraQueueTable.MigrateQueueTable Method

Used to upgrade or downgrade a queue table to the desired Compatible parameter value.

Class

TOraQueueTable

Syntax

procedure MigrateQueueTable(Compatible: TQueueCompatible);

Parameters
Compatible
Holds the lowest database version the queue is compatible with.

Remarks

Call the MigrateQueueTable method to upgrade or downgrade a queue table to the desired Compatible parameter value.

See Also

  • Compatible


TOraQueueTable.PurgeQueueTable Method

TOraQueueTable.PurgeQueueTable Method

Purges records from the queue table.

Class

TOraQueueTable

Syntax

procedure PurgeQueueTable(const PurgeCondition: string; Block: boolean = False; DeliveryMode: TQueueDeliveryMode = qdmPersistent);

Parameters
PurgeCondition
Specifies the purge condition, which must be in the format of a SQL WHERE clause and is based on the columns of aq$queue_table_name view.
Block
Specifies whether to hold an exclusive lock on all the queues in the queue table while purging the queue table.
DeliveryMode
Specifies which type of messages should be purged. Possible values are described in TDequeueOptions.DeliveryMode topic

Remarks

Call the PurgeQueueTable method to purge records from the queue table.

See Also

  • TDequeueOptions.DeliveryMode


TOraQueueTable.ReadQueueTableProperties Method

TOraQueueTable.ReadQueueTableProperties Method

Reads information about a queue table specified by the QueueTableName property from the database to the TOraQueueTable component.

Class

TOraQueueTable

Syntax

procedure ReadQueueTableProperties;

Remarks

Call the ReadQueueTableProperties method to read information about a queue table specified by the QueueTableName property from the database to the TOraQueueTable component. After calling this method use properties

  • PayloadTypeName,
  • SortList,
  • MultipleConsumers,
  • MessageGrouping,
  • Comment,
  • PrimaryInstance,
  • SecondaryInstance,
  • Compatible,
  • Secure

to get queue table parameters.


TOraQueueTable.RevokeSystemPrivilege Method

TOraQueueTable.RevokeSystemPrivilege Method

Revokes system queue privilege.

Class

TOraQueueTable

Syntax

procedure RevokeSystemPrivilege(Privilege: TQueueSystemPrivilege; const Grantee: string);

Parameters
Privilege
Holds the system privilege to revoke.
Grantee
Holds the user name, a role, or a PUBLIC role.

Remarks

Call the RevokeSystemPrivilege method to revoke system queue privilege. Privilege parameter is a system privilege to revoke. Can be qspEnqueueAny (ENQUEUE_ANY privilege), qspDequeueAny (DEQUEUE_ANY privilege), qspManageAny (MANAGE_ANY privilege). Grantee parameter is a grantee - can be a user, a role, or the PUBLIC role.


TQueueAgent Class

TQueueAgent Class

A class reperesenting a producer or a consumer of a queue message.

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

Unit

OraAQ

Syntax

TQueueAgent = class(TCollectionItem);

Remarks

The TQueueAgent class represents a producer or a consumer of a queue message. Use the TQueueAgent class to set producers or consumers of queue messages, queue subscribers etc.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TQueueAgent

See Also

  • TQueueAgents
  • TQueueMessageProperties.SenderId
  • TOraQueue.Listen
  • TOraQueueAdmin.AddSubscriber
  • TOraQueueAdmin.RemoveSubscriber
  • TOraQueueAdmin.AlterSubscriber


TQueueAgent Members

TQueueAgent Members

TQueueAgent class overview.

Properties

Name | Description
Address | Used to get or set the recipient protocol-specific address.
Name | Used to get or set a name of the queue agent.
Protocol | Used to set a protocol to interpret the address and propagate the message.


TQueueAgent Properties

TQueueAgent Properties

Properties of the TQueueAgent class.

For a complete list of the TQueueAgent class members, see the TQueueAgent Members topic.

Published

Name | Description
Address | Used to get or set the recipient protocol-specific address.
Name | Used to get or set a name of the queue agent.
Protocol | Used to set a protocol to interpret the address and propagate the message.

See Also

  • TQueueAgent Class
  • TQueueAgent Class Members


TQueueAgent.Address Property

TQueueAgent.Address Property

Used to get or set the recipient protocol-specific address.

Class

TQueueAgent

Syntax

property Address: string;

Remarks

Use the Address property to get or set the recipient protocol-specific address. If the Protocol property is 0, then the address should have the [schema.]queue[@dblink] form.


TQueueAgent.Name Property

TQueueAgent.Name Property

Used to get or set a name of the queue agent.

Class

TQueueAgent

Syntax

property Name: string;

Remarks

Use the Name property to get or set a name of the queue agent.


TQueueAgent.Protocol Property

TQueueAgent.Protocol Property

Used to set a protocol to interpret the address and propagate the message.

Class

TQueueAgent

Syntax

property Protocol: integer default 0;

Remarks

Use the Protocol property to set a protocol to interpret the address and propagate the message.


TQueueAgents Class

TQueueAgents Class

A class holding a collection of the TQueueAgent objects.

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

Unit

OraAQ

Syntax

TQueueAgents = class(TOwnedCollection);

Remarks

Each TQueueAgents holds a collection of the TQueueAgent objects. TQueueAgents maintains an index of the columns in its Items array. The Count property contains the number of columns in the collection.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TOwnedCollection
TQueueAgents

See Also

  • TQueueAgent
  • TQueueMessageProperties.RecipientList
  • TOraQueue.Listen
  • TOraQueueAdmin.GetSubscribers


TQueueAgents Members

TQueueAgents Members

TQueueAgents class overview.

Properties

Name | Description
Items | Used to access individual columns.

Methods

Name | Description
Add | Adds a TQueueAgent object to the collection.
Insert | Inserts a TQueueAgent object in the TQueueAgents collection to the required place.


TQueueAgents Properties

TQueueAgents Properties

Properties of the TQueueAgents class.

For a complete list of the TQueueAgents class members, see the TQueueAgents Members topic.

Public

Name | Description
Items | Used to access individual columns.

See Also

  • TQueueAgents Class
  • TQueueAgents Class Members


TQueueAgents.Items Property(Indexer)

TQueueAgents.Items Property(Indexer)

Used to access individual columns.

Class

TQueueAgents

Syntax

property Items[Index: integer]: TQueueAgent; default;

Parameters
Index
Holds the index of a TQueueAgent object.

Remarks

Use the Items property to access individual columns. The value of the Index parameter corresponds to the Index property of TQueueAgent.

See Also

  • TQueueAgent


TQueueAgents Methods

TQueueAgents Methods

Methods of the TQueueAgents class.

For a complete list of the TQueueAgents class members, see the TQueueAgents Members topic.

Public

Name | Description
Add | Adds a TQueueAgent object to the collection.
Insert | Inserts a TQueueAgent object in the TQueueAgents collection to the required place.

See Also

  • TQueueAgents Class
  • TQueueAgents Class Members


TQueueAgents.Add Method

TQueueAgents.Add Method

Adds a TQueueAgent object to the collection.

Class

TQueueAgents

Syntax

function Add: TQueueAgent;

Return Value
a TQueueAgent object with empty properties.

Remarks

Call the Add method to add a TQueueAgent object with empty properties to the collection.


TQueueAgents.Insert Method

TQueueAgents.Insert Method

Inserts a TQueueAgent object in the TQueueAgents collection to the required place.

Class

TQueueAgents

Syntax

function Insert(Index: Integer): TQueueAgent;

Parameters
Index
Holds the index of the place to insert a TQueueAgent object to.
Return Value
a TQueueAgent object.

Remarks

Call the Insert method to insert a TQueueAgent object in the TQueueAgents collection to the required place, specified with Index parameter.


TQueueMessage Class

TQueueMessage Class

A class representing a queue message.

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

Unit

OraAQ

Syntax

TQueueMessage = class(System.TObject);

Remarks

The TQueueMessage class represents a queue message. Use the TQueueMessage class for setting or reading message parameters and payload when sending or receiving a queue message.

Inheritance Hierarchy

TObject
TQueueMessage

See Also

  • TOraQueue.Dequeue
  • TOraQueue.DequeueArray
  • TOraQueue.Enqueue
  • TOraQueue.EnqueueArray


TQueueMessage Members

TQueueMessage Members

TQueueMessage class overview.

Properties

Name | Description
MessageId | Used to provide a message ID.
MessageProperties | Used to get or set queue the queue message parameters.
RawPayload | Used to set or get payload of the queue message as RAW payload.
StringPayload | Used to set or get the payload of a queue message as string payload.


TQueueMessage Properties

TQueueMessage Properties

Properties of the TQueueMessage class.

For a complete list of the TQueueMessage class members, see the TQueueMessage Members topic.

Public

Name | Description
MessageId | Used to provide a message ID.
MessageProperties | Used to get or set queue the queue message parameters.
RawPayload | Used to set or get payload of the queue message as RAW payload.
StringPayload | Used to set or get the payload of a queue message as string payload.

See Also

  • TQueueMessage Class
  • TQueueMessage Class Members


TQueueMessage.MessageId Property

TQueueMessage.MessageId Property

Used to provide a message ID.

Class

TQueueMessage

Syntax

property MessageId: TMessageId;

Remarks

Use the MessageId property to get the message ID for a message.


TQueueMessage.MessageProperties Property

TQueueMessage.MessageProperties Property

Used to get or set queue the queue message parameters.

Class

TQueueMessage

Syntax

property MessageProperties: TQueueMessageProperties;

Remarks

Use the MessageProperties property to get or set queue the queue message parameters that AQ uses to manage individual messages.

See Also

  • TQueueMessageProperties


TQueueMessage.RawPayload Property

TQueueMessage.RawPayload Property

Used to set or get payload of the queue message as RAW payload.

Class

TQueueMessage

Syntax

property RawPayload: TBytes;

Remarks

Use the RawPayload method to set or get payload of the queue message as RAW payload.


TQueueMessage.StringPayload Property

TQueueMessage.StringPayload Property

Used to set or get the payload of a queue message as string payload.

Class

TQueueMessage

Syntax

property StringPayload: string;

Remarks

Use the StringPayload property to set or get the payload of a queue message as string payload.


TQueueMessageProperties Class

TQueueMessageProperties Class

A class for setting or providing queue message properties.

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

Unit

OraAQ

Syntax

TQueueMessageProperties = class(TPersistent);

Remarks

Use the TQueueMessageProperties class to set or get queue message properties.

Inheritance Hierarchy

TObject
TPersistent
TQueueMessageProperties

See Also

  • TQueueMessage.MessageProperties
  • TOraQueue.EnqueueMessageProperties
  • TOraQueue.OnMessage
  • TOraQueue.Dequeue
  • TOraQueue.DequeueArray
  • TOraQueue.Enqueue
  • TOraQueue.EnqueueArray


TQueueMessageProperties Members

TQueueMessageProperties Members

TQueueMessageProperties class overview.

Properties

Name | Description
Attempts | Contains the number of attempts that have been made to dequeue a message.
Correlation | Contains the identifier supplied by the message producer at enqueue time.
Delay | Contains the delay of the enqueued message.
DeliveryMode | Used to indicate whether the message will be enqueued as buffered or persistent and to specify what kinds of messages should be dequeued.
EnqueueTime | Contains the time when a message was enqueued.
ExceptionQueue | Contains the name of the queue into which the message is moved if it cannot be processed successfully.
Expiration | Contains the expiration of a message.
OriginalMessageId | Contains the parameter for propagating messages.
Priority | Contains the message priority.
RecipientList | Contains the list of agents that receive a message.
SenderId | Contains application-sender identification.
State | Contains the state of a message.
TransactionGroup | Contains the transaction_group for the dequeued message.


TQueueMessageProperties Properties

TQueueMessageProperties Properties

Properties of the TQueueMessageProperties class.

For a complete list of the TQueueMessageProperties class members, see the TQueueMessageProperties Members topic.

Public

Name | Description
Attempts | Contains the number of attempts that have been made to dequeue a message.
Correlation | Contains the identifier supplied by the message producer at enqueue time.
EnqueueTime | Contains the time when a message was enqueued.
OriginalMessageId | Contains the parameter for propagating messages.
State | Contains the state of a message.
TransactionGroup | Contains the transaction_group for the dequeued message.

Published

Name | Description
Delay | Contains the delay of the enqueued message.
DeliveryMode | Used to indicate whether the message will be enqueued as buffered or persistent and to specify what kinds of messages should be dequeued.
ExceptionQueue | Contains the name of the queue into which the message is moved if it cannot be processed successfully.
Expiration | Contains the expiration of a message.
Priority | Contains the message priority.
RecipientList | Contains the list of agents that receive a message.
SenderId | Contains application-sender identification.

See Also

  • TQueueMessageProperties Class
  • TQueueMessageProperties Class Members


TQueueMessageProperties.Attempts Property

TQueueMessageProperties.Attempts Property

Contains the number of attempts that have been made to dequeue a message.

Class

TQueueMessageProperties

Syntax

property Attempts: integer;

Remarks

The Attempts property contains the number of attempts that have been made to dequeue a message.


TQueueMessageProperties.Correlation Property

TQueueMessageProperties.Correlation Property

Contains the identifier supplied by the message producer at enqueue time.

Class

TQueueMessageProperties

Syntax

property Correlation: string;

Remarks

The Correlation property contains the identifier supplied by the message producer at enqueue time.


TQueueMessageProperties.Delay Property

TQueueMessageProperties.Delay Property

Contains the delay of the enqueued message.

Class

TQueueMessageProperties

Syntax

property Delay: integer default AQ_NO_DELAY;

Remarks

The Delay property contains the delay of the enqueued message. The delay represents the number of seconds after which a message is available for dequeuing. The default value is AQ_NO_DELAY. That means the message will be available for immediate dequeuing.


TQueueMessageProperties.DeliveryMode Property

TQueueMessageProperties.DeliveryMode Property

Used to indicate whether the message will be enqueued as buffered or persistent and to specify what kinds of messages should be dequeued.

Class

TQueueMessageProperties

Syntax

property DeliveryMode: TQueueDeliveryMode default qdmPersistent;

Remarks

Use the DeliveryMode property to indicate whether the message will be enqueued as buffered or persistent when enqueueing it, and to specify what kinds of messages should be dequeued (buffered, persistent or both), when dequeueing messages. qdmPersistentOrBuffered value can be set only when dequeuing a message.

See Also

  • TEnqueueOptions.DeliveryMode
  • TDequeueOptions.DeliveryMode


TQueueMessageProperties.EnqueueTime Property

TQueueMessageProperties.EnqueueTime Property

Contains the time when a message was enqueued.

Class

TQueueMessageProperties

Syntax

property EnqueueTime: TDateTime;

Remarks

The EnqueueTime property contains the time when a message was enqueued.


TQueueMessageProperties.ExceptionQueue Property

TQueueMessageProperties.ExceptionQueue Property

Contains the name of the queue into which the message is moved if it cannot be processed successfully.

Class

TQueueMessageProperties

Syntax

property ExceptionQueue: string;

Remarks

The ExceptionQueue property contains the name of the queue into which the message is moved if it cannot be processed successfully.


TQueueMessageProperties.Expiration Property

TQueueMessageProperties.Expiration Property

Contains the expiration of a message.

Class

TQueueMessageProperties

Syntax

property Expiration: integer default AQ_NEVER;

Remarks

The Expiration property contains the expiration of a message in seconds. It is the duration the message is available for dequeuing. The default value is AQ_NEVER. It means that the message will never expire.


TQueueMessageProperties.OriginalMessageId Property

TQueueMessageProperties.OriginalMessageId Property

Contains the parameter for propagating messages.

Class

TQueueMessageProperties

Syntax

property OriginalMessageId: string;

Remarks

The OriginalMessageId property contains the parameter used by Oracle Streams AQ for propagating messages.


TQueueMessageProperties.Priority Property

TQueueMessageProperties.Priority Property

Contains the message priority.

Class

TQueueMessageProperties

Syntax

property Priority: integer default 1;

Remarks

The Priority property contains the message priority. A smaller number indicates higher priority. The priority can be any number, including negative numbers.


TQueueMessageProperties.RecipientList Property

TQueueMessageProperties.RecipientList Property

Contains the list of agents that receive a message.

Class

TQueueMessageProperties

Syntax

property RecipientList: TQueueAgents stored IsRecipientListStored;

Remarks

The RecipientList property contains the list of agents that receive a message.

See Also

  • TQueueAgents


TQueueMessageProperties.SenderId Property

TQueueMessageProperties.SenderId Property

Contains application-sender identification.

Class

TQueueMessageProperties

Syntax

property SenderId: TQueueAgent;

Remarks

The SenderId property contains application-sender identification specified at the enqueue time by the message producer.

See Also

  • TQueueAgent


TQueueMessageProperties.State Property

TQueueMessageProperties.State Property

Contains the state of a message.

Class

TQueueMessageProperties

Syntax

property State: TQueueMessageState;

Remarks

The State property contains the state of a message.


TQueueMessageProperties.TransactionGroup Property

TQueueMessageProperties.TransactionGroup Property

Contains the transaction_group for the dequeued message.

Class

TQueueMessageProperties

Syntax

property TransactionGroup: string;

Remarks

The TransactionGroup property contains the transaction_group for the dequeued message. Messages belonging to the same transaction group will have the same value for this attribute.


Types in OraAQ

Types in OraAQ

Types in the OraAQ unit.

Types

Name | Description
TQueueMessageEvent | This type is used for the TOraQueue.OnMessage event.


TQueueMessageEvent Procedure Reference

TQueueMessageEvent Procedure Reference

This type is used for the TOraQueue.OnMessage event.

Unit

OraAQ

Syntax

TQueueMessageEvent = procedure (Sender: TOraQueue; const MessageId: string; const MessageProperties: TQueueMessageProperties) of object;

Parameters
Sender
An object that raised the event.
MessageId
Holds the payload for the message.
MessageProperties
Holds the message properties.


Enumerations in OraAQ

Enumerations in OraAQ

Enumerations in the OraAQ unit.

Enumerations

Name | Description
TDequeueMode | Specifies the locking behavior associated with the dequeue.
TQueueDeliveryMode | Specifies the type of the message that will be dequeued.
TQueueMessageGrouping | Specifies the message grouping behavior in the queues based on this table.
TQueueMessageState | Specifies the message state.
TQueueNavigation | Specifies the position of the message that will be retrieved.
TQueueSequenceDeviation | Specifies if a message should be enqueued before other messages.
TQueueSortList | Specifies the columnt that will be used as a sort key.
TQueueType | Specifies whether the queue being created is an exception queue or a normal queue.
TQueueVisibility | Specifies the transaction behaviour of the dequeue or enqueue request.


TDequeueMode Enumeration

TDequeueMode Enumeration

Specifies the locking behavior associated with the dequeue.

Unit

OraAQ

Syntax

TDequeueMode = (dqmBrowse, dqmLocked, dqmRemove, dqmRemoveNoData);

Values

Value | Meaning
dqmBrowse | Messages will be dequeued without any locking.
dqmLocked | Sets write locks on the dequeued messages. The locks last for the durations of the transaction.
dqmRemove | Messages are removed after dequeuing. The default value.
dqmRemoveNoData | Messages are marked as updated or deleted after dequeuing. The message can be retained in the queue table based on the retention properties.

Remarks

Use DequeueMode property to specify the locking behavior associated with the dequeue.


TQueueDeliveryMode Enumeration

TQueueDeliveryMode Enumeration

Specifies the type of the message that will be dequeued.

Unit

OraAQ

Syntax

TQueueDeliveryMode = (qdmPersistent, qdmBuffered, qdmPersistentOrBuffered);

Values

Value | Meaning
qdmBuffered | Only buffered message will be dequeued.
qdmPersistent | Only persistent message will be dequeued.
qdmPersistentOrBuffered | Suited message of any type can be dequeued. Is not used when enqueueing a message.


TQueueMessageGrouping Enumeration

TQueueMessageGrouping Enumeration

Specifies the message grouping behavior in the queues based on this table.

Unit

OraAQ

Syntax

TQueueMessageGrouping = (qmgNone, qmgTransactional);

Values

Value | Meaning
qmgNone | Each queue message is treated individually. The default value.
qmgTransactional | Messages, enqueued in one transaction, will belong to the same group.


TQueueMessageState Enumeration

TQueueMessageState Enumeration

Specifies the message state.

Unit

OraAQ

Syntax

TQueueMessageState = (qmsReady, qmsWaiting, qmsProcessed, qmsExpired);

Values

Value | Meaning
qmsExpired | The message has been moved to the exception queue.
qmsProcessed | The message has been processed and is retained.
qmsReady | The message is ready to be processed.
qmsWaiting | The message delay has not yet been reached.


TQueueNavigation Enumeration

TQueueNavigation Enumeration

Specifies the position of the message that will be retrieved.

Unit

OraAQ

Syntax

TQueueNavigation = (qnNextMessage, qnNextTransaction, qnFirstMessage, qnFirstMessageMultiGroup, qnNextMessageMultiGroup);

Values

Value | Meaning
qnFirstMessage | The first message which is available and that matches the search criteria will be dequeued. This setting resets the position to the beginning of the queue.
qnFirstMessageMultiGroup | Available matching messages from the beginning of the queue will be dequeued (possibly across different transaction groups) until reaching the limit of result message array size. This setting resets the position to the beginning of the queue.
qnNextMessage | The next message that is available and that matches the search criteria will be dequeued. The default value.
qnNextMessageMultiGroup | The next set of available matching messages from the beginning of the queue will be dequeued (possibly across different transaction groups) until reaching the limit of the result message array size. This setting resets the position to the beginning of the queue.
qnNextTransaction | The first message of the next transaction group that is available and that matches the search criteria will be dequeued.


TQueueSequenceDeviation Enumeration

TQueueSequenceDeviation Enumeration

Specifies if a message should be enqueued before other messages.

Unit

OraAQ

Syntax

TQueueSequenceDeviation = (qsdNone, qsdBefore, qsdTop);

Values

Value | Meaning
qsdBefore | Message is enqueued before the message specified by RelativeMsgid property.
qsdNone | Message is enqueued in usual order. The default value.
qsdTop | The message will be enqueued before all queued messages.


TQueueSortList Enumeration

TQueueSortList Enumeration

Specifies the columnt that will be used as a sort key.

Unit

OraAQ

Syntax

TQueueSortList = (qslDefault, qslPriority, qslEnqueueTime, qslPriorityEnqueueTime, qslEnqueueTimePriority);

Values

Value | Meaning
qslDefault | No sorting is specified, the table will be sorted in the enqueue time in the ascending order by default. The default value.
qslEnqueueTime | The table will be sorted by enq_time column.
qslEnqueueTimePriority | The table will be sorted by both enq_time and priority columns. Enq_time column defines the most significant order.
qslPriority | The table will be sorted by priority column.
qslPriorityEnqueueTime | The table will be sorted by both the enq_time and priority columns. Priority column defines the most significant order.


TQueueType Enumeration

TQueueType Enumeration

Specifies whether the queue being created is an exception queue or a normal queue.

Unit

OraAQ

Syntax

TQueueType = (qtNormalQueue, qtExceptionQueue);

Values

Value | Meaning
qtExceptionQueue | The queue being created is an exception queue.
qtNormalQueue | The queue being created is a normal queue. The Default value.


TQueueVisibility Enumeration

TQueueVisibility Enumeration

Specifies the transaction behaviour of the dequeue or enqueue request.

Unit

OraAQ

Syntax

TQueueVisibility = (qvOnCommit, qvImmediate);

Values

Value | Meaning
qvImmediate | The dequeue or enqueue is being made in an autonomous transaction.
qvOnCommit | The dequeue or enqueue is a part of the current transaction. The operation is complete when the transaction commits. The default value.


OraCall Unit Members

OraCall Unit Members

Defines Oracle Call Interface routines.

Routines

Name | Description
DetectOCI | Searches OCI library and sets OCIDLL, OCIVersion, OCICallStyle variables.
FreeOCI | Removes OCI llibrary from memory.
GetSubscriptionPort | Returns the value of change notification subscription port.
InitOCI | Initializes OCI enviroment.
LoadedOCI | Returns True when OCI library has been loaded already.
LoadOCI | Loads OCI library to memory.
OraError | This unit contains the EOraError exception class.

Variables

Name | Description
OCICallStyle | Use OCICallStyle to set the set of routines to be used.Possible value is OCI73 and OCI80.
OCIDLL | Use OCIDLL to read and assing a name of OCI library file. OCIDLL variable is assigned automatically after OCI initialization.
OCIThreaded | Allows to initialize OCI enviroment in threaded mode. The default value is True.
OCIVersion | Read OCIVersion to learn the version of OCI.
OCIVersionSt | Read OCIVersionSt to learn version of OCI as string.
OracleErrorMaxLength | Allows to set the maximum length of returned Oracle error message.The default value is 512.


Routines in OraCall

Routines in OraCall

Routines in the OraCall unit.

Routines

Name | Description
DetectOCI | Searches OCI library and sets OCIDLL, OCIVersion, OCICallStyle variables.
FreeOCI | Removes OCI llibrary from memory.
GetSubscriptionPort | Returns the value of change notification subscription port.
InitOCI | Initializes OCI enviroment.
LoadedOCI | Returns True when OCI library has been loaded already.
LoadOCI | Loads OCI library to memory.
OraError | This unit contains the EOraError exception class.


OraCall.DetectOCI Routine

OraCall.DetectOCI Routine

Searches OCI library and sets OCIDLL, OCIVersion, OCICallStyle variables.

Unit

OraCall

Syntax

procedure DetectOCI;


OraCall.FreeOCI Routine

OraCall.FreeOCI Routine

Removes OCI llibrary from memory.

Unit

OraCall

Syntax

procedure FreeOCI;


Ora.GetSubscriptionPort Routine

Ora.GetSubscriptionPort Routine

Returns the value of change notification subscription port.

Unit

OraCall

Syntax

function GetSubscriptionPort: integer;


OraCall.InitOCI Routine

OraCall.InitOCI Routine

Initializes OCI enviroment.

Unit

OraCall

Syntax

procedure InitOCI;


OraCall.LoadedOCI Routine

OraCall.LoadedOCI Routine

Returns True when OCI library has been loaded already.

Unit

OraCall

Syntax

function LoadedOCI: boolean;


OraCall.LoadOCI Routine

OraCall.LoadOCI Routine

Loads OCI library to memory.

Unit

OraCall

Syntax

procedure LoadOCI;


OraError Unit Members

OraError Unit Members

This unit contains the EOraError exception class.

Classes

Name | Description
EOraError | Raised when a component detects Oracle error.


Variables in OraCall

Variables in OraCall

Variables in the OraCall unit.

Variables

Name | Description
OCICallStyle | Use OCICallStyle to set the set of routines to be used.Possible value is OCI73 and OCI80.
OCIDLL | Use OCIDLL to read and assing a name of OCI library file. OCIDLL variable is assigned automatically after OCI initialization.
OCIThreaded | Allows to initialize OCI enviroment in threaded mode. The default value is True.
OCIVersion | Read OCIVersion to learn the version of OCI.
OCIVersionSt | Read OCIVersionSt to learn version of OCI as string.
OracleErrorMaxLength | Allows to set the maximum length of returned Oracle error message.The default value is 512.


OraCall.OCICallStyle Variable

OraCall.OCICallStyle Variable

Use OCICallStyle to set the set of routines to be used.

Possible value is OCI73 and OCI80.

Unit

OraCall

Syntax

OCICallStyle: TOCICallStyle;


OraCall.OCIDLL Variable

OraCall.OCIDLL Variable

Use OCIDLL to read and assing a name of OCI library file. OCIDLL variable is assigned automatically after OCI initialization.

Unit

OraCall

Syntax

OCIDLL: string;

Example

For example:

OCIDLL := 'C:\ORANT\BIN\OCI.DLL'


OraCall.OCIThreaded Variable

OraCall.OCIThreaded Variable

Allows to initialize OCI enviroment in threaded mode.

The default value is True.

Unit

OraCall

Syntax

OCIThreaded: boolean;


OraCall.OCIVersion Variable

OraCall.OCIVersion Variable

Read OCIVersion to learn the version of OCI.

Unit

OraCall

Syntax

OCIVersion: word;

Example

7340 value corresponds to '7.3.4.0.0'.


OraCall.OCIVersionSt Variable

OraCall.OCIVersionSt Variable

Read OCIVersionSt to learn version of OCI as string.

Unit

OraCall

Syntax

OCIVersionSt: string;

Example

For example:

'7.3.4.0.0'


OraCall.OracleErrorMaxLength Variable

OraCall.OracleErrorMaxLength Variable

Allows to set the maximum length of returned Oracle error message.

The default value is 512.

Unit

OraCall

Syntax

OracleErrorMaxLength: integer;


OraClasses Unit Members

OraClasses Unit Members

OraClasses unit defines following data type constants: dtRowId dtCursor dtOraBlob dtOraClob dtBFILE dtCFILE dtLabel dtFixedChar dtUndefined dtTimeStamp dtTimeStampTZ dtTimeStampLTZ dtIntervalYM dtIntervalDS // obsolete dtBLOBLocator = dtOraBlob dtCLOBLocator = dtOraClob

Classes

Name | Description
TOraCursor | A class holding the internal Oracle Call Interface data CDA for Oracle 7 and the OCIStmt descriptor for Oracle 8.
TOraFile | A class holding the value of the BFile field and parameter.
TOraInterval | A class providing support for Oracle 9 interval datatypes.
TOraLob | A class holding the value of the BLOB and CLOB fields and parameters.
TOraNumber | A class supporting
TOraTimeStamp | A class supporting Oracle 9 timestamp datatypes.

Enumerations

Name | Description
TConnectMode | Specifies the system privileges used when a user connects to the server.
TOptimizerMode | Specifies the optimizer mode for connection.

Variables

Name | Description
FloatPrecision | Set this constant to define the type of NUMBER fields with Scale > 0.
IntegerPrecision | Set this constant to define the type of NUMBER fields with precision less than or equal to IntegerPrecision as dtInteger.
LargeIntPrecision | Set this constant to define the type of NUMBER fields with precision greater than the IntegerPresision and less than or equal to LargeIntPrecision as dtLargeInt.


Classes in OraClasses

Classes in OraClasses

Classes in the OraClasses unit.

Classes

Name | Description
TOraCursor | A class holding the internal Oracle Call Interface data CDA for Oracle 7 and the OCIStmt descriptor for Oracle 8.
TOraFile | A class holding the value of the BFile field and parameter.
TOraInterval | A class providing support for Oracle 9 interval datatypes.
TOraLob | A class holding the value of the BLOB and CLOB fields and parameters.
TOraNumber | A class supporting
TOraTimeStamp | A class supporting Oracle 9 timestamp datatypes.


TOraCursor Class

TOraCursor Class

A class holding the internal Oracle Call Interface data CDA for Oracle 7 and the OCIStmt descriptor for Oracle 8.

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

Unit

OraClasses

Syntax

TOraCursor = class(TCRCursor);

Remarks

TOraCursor holds the internal Oracle Call Interface data CDA for Oracle 7 and the OCIStmt descriptor for Oracle 8.

Inheritance Hierarchy

TObject
TSharedObject
TCRCursor
TOraCursor

See Also

  • TCursorField
  • TOraDataSet.Cursor
  • TOraParam.AsCursor


TOraCursor Members

TOraCursor Members

TOraCursor class overview.

Properties

Name | Description
CDA | Used to return CDA.
OCICallStyle | Used to get or set the Oracle Client version for a subsequent cursor operations.
OCIStmt | Used to return the OCIStmt handler.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocCursor | Allocates CDA for Oracle 7 and OCIStmt handler for Oracle 8.
CanFetch | Verifies if the cursor state permits data fetching.
FreeCursor | Releases the cursor data.
Release (inherited from TSharedObject) | Decrements the reference count.


TOraCursor Properties

TOraCursor Properties

Properties of the TOraCursor class.

For a complete list of the TOraCursor class members, see the TOraCursor Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
CDA | Used to return CDA.
OCICallStyle | Used to get or set the Oracle Client version for a subsequent cursor operations.
OCIStmt | Used to return the OCIStmt handler.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TOraCursor Class
  • TOraCursor Class Members


TOraCursor.CDA Property

TOraCursor.CDA Property

Used to return CDA.

Class

TOraCursor

Syntax

property CDA: PCDA;

Remarks

Use the CDA property to return CDA. You can use this property for Oracle 7.


TOraCursor.OCICallStyle Property

TOraCursor.OCICallStyle Property

Used to get or set the Oracle Client version for a subsequent cursor operations.

Class

TOraCursor

Syntax

property OCICallStyle: TOCICallStyle;

Remarks

Use the OCICallStyle property to get or set the Oracle Client version for a subsequent cursor operations.


TOraCursor.OCIStmt Property

TOraCursor.OCIStmt Property

Used to return the OCIStmt handler.

Class

TOraCursor

Syntax

property OCIStmt: pOCIStmt;

Remarks

Use the OCIStmt property to return the OCIStmt handler. You can use this property for Oracle 8.


TOraCursor Methods

TOraCursor Methods

Methods of the TOraCursor class.

For a complete list of the TOraCursor class members, see the TOraCursor Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocCursor | Allocates CDA for Oracle 7 and OCIStmt handler for Oracle 8.
CanFetch | Verifies if the cursor state permits data fetching.
FreeCursor | Releases the cursor data.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TOraCursor Class
  • TOraCursor Class Members


TOraCursor.AllocCursor Method

TOraCursor.AllocCursor Method

Allocates CDA for Oracle 7 and OCIStmt handler for Oracle 8.

Class

TOraCursor

Syntax

procedure AllocCursor(StatementCache: boolean = False);

Parameters
StatementCache
Specifies whether OCI statement caching is used.

Remarks

Call the AllocCursor procedure to allocate CDA for Oracle 7 and OCIStmt handler for Oracle 8.

See Also

  • FreeCursor


TOraCursor.CanFetch Method

TOraCursor.CanFetch Method

Verifies if the cursor state permits data fetching.

Class

TOraCursor

Syntax

function CanFetch: boolean; override;

Return Value
True, if data fetching is permitted, False otherwise.

Remarks

Call the CanFetch function to verify whether the cursor is in the state that permits data fetching.


TOraCursor.FreeCursor Method

TOraCursor.FreeCursor Method

Releases the cursor data.

Class

TOraCursor

Syntax

procedure FreeCursor;

Remarks

Call the FreeCursor method to release the cursor data.

See Also

  • AllocCursor


TOraFile Class

TOraFile Class

A class holding the value of the BFile field and parameter.

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

Unit

OraClasses

Syntax

TOraFile = class(TOraLob);

Remarks

TOraFile is a descendant of the TOraLob class. It holds the value of the BFile field and parameter.

The BFile datatype provides access to the file LOBs that are stored in file systems outside an Oracle database. Oracle 8 currently supports access to binary files, or BFILEs. The BFILE datatype allows the read-only support of large binary files; you cannot modify a file through Oracle.

Inheritance Hierarchy

TObject
TSharedObject
TBlob
TCompressedBlob
TOraLob
TOraFile

See Also

  • TOraLob
  • TBFileField
  • TOraParam.AsBFile


TOraFile Members

TOraFile Members

TOraFile class overview.

Properties

Name | Description
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
Cached (inherited from TOraLob) | Used to indicate where the LOB data is.
FileDir | Determines the directory alias of where the file associated with the BFile field is stored.
FileName | Used to determine the name of a file associated with the BFile field.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
OCILobLocator (inherited from TOraLob) | Used to get or set the OCILobLocator handle.
OCILobLocatorPtr (inherited from TOraLob) | Used to retrieve the LOB value type locator.
OCISvcCtx (inherited from TOraLob) | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocLob (inherited from TOraLob) | Allocates and initializes the LOB locator.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
Close | Closes a file opened by Open.
CreateTemporary (inherited from TOraLob) | Allocates and initializes a temporary LOB locator of the specified type.
DisableBuffering (inherited from TOraLob) | Disables the LOB buffering for the LOB locator.
EnableBuffering (inherited from TOraLob) | Enables the LOB buffering for the LOB locator.
Exists | Determines whether a file associated with the BFile field exists.
FreeLob (inherited from TOraLob) | Releases the LOB locator descriptor.
FreeTemporary (inherited from TOraLob) | Frees a temporary LOB.
Init (inherited from TOraLob) | Initializes the OCILobLocator handle.
IsInit (inherited from TOraLob) | Verifies if the LOB locator is initialized.
IsOpen | Determines whether the file associated with the BFile field is opened.
IsTemporary (inherited from TOraLob) | Indicates whether the LOB is temporary.
LengthLob (inherited from TOraLob) | Returns the number of bytes contained in the LOB object.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
Open | Opens the file associated with the BFile field.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
ReadLob (inherited from TOraLob) | Reads the LOB content from the server.
Refresh | Reloads a file associated the BFile field opened by Open.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.
WriteLob (inherited from TOraLob) | Writes a LOB value to the server.


TOraFile Properties

TOraFile Properties

Properties of the TOraFile class.

For a complete list of the TOraFile class members, see the TOraFile Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocLob (inherited from TOraLob) | Allocates and initializes the LOB locator.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
Cached (inherited from TOraLob) | Used to indicate where the LOB data is.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
CreateTemporary (inherited from TOraLob) | Allocates and initializes a temporary LOB locator of the specified type.
DisableBuffering (inherited from TOraLob) | Disables the LOB buffering for the LOB locator.
EnableBuffering (inherited from TOraLob) | Enables the LOB buffering for the LOB locator.
FileDir | Determines the directory alias of where the file associated with the BFile field is stored.
FileName | Used to determine the name of a file associated with the BFile field.
FreeLob (inherited from TOraLob) | Releases the LOB locator descriptor.
FreeTemporary (inherited from TOraLob) | Frees a temporary LOB.
Init (inherited from TOraLob) | Initializes the OCILobLocator handle.
IsInit (inherited from TOraLob) | Verifies if the LOB locator is initialized.
IsTemporary (inherited from TOraLob) | Indicates whether the LOB is temporary.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
LengthLob (inherited from TOraLob) | Returns the number of bytes contained in the LOB object.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
OCILobLocator (inherited from TOraLob) | Used to get or set the OCILobLocator handle.
OCILobLocatorPtr (inherited from TOraLob) | Used to retrieve the LOB value type locator.
OCISvcCtx (inherited from TOraLob) | Used to assign a service context handle.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
ReadLob (inherited from TOraLob) | Reads the LOB content from the server.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.
WriteLob (inherited from TOraLob) | Writes a LOB value to the server.

See Also

  • TOraFile Class
  • TOraFile Class Members


TOraFile.FileDir Property

TOraFile.FileDir Property

Determines the directory alias of where the file associated with the BFile field is stored.

Class

TOraFile

Syntax

property FileDir: string;

Remarks

Use FileDir to determine the directory alias where the file associated with the BFile field is stored.

To create a directory alias use CREATE DIRECTORY.

See Also

  • FileName


TOraFile.FileName Property

TOraFile.FileName Property

Used to determine the name of a file associated with the BFile field.

Class

TOraFile

Syntax

property FileName: string;

Remarks

Use the FileName property to determine the name of a file associated with the BFile field.

See Also

  • FileDir


TOraFile Methods

TOraFile Methods

Methods of the TOraFile class.

For a complete list of the TOraFile class members, see the TOraFile Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocLob (inherited from TOraLob) | Allocates and initializes the LOB locator.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
Cached (inherited from TOraLob) | Used to indicate where the LOB data is.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
Close | Closes a file opened by Open.
CreateTemporary (inherited from TOraLob) | Allocates and initializes a temporary LOB locator of the specified type.
DisableBuffering (inherited from TOraLob) | Disables the LOB buffering for the LOB locator.
EnableBuffering (inherited from TOraLob) | Enables the LOB buffering for the LOB locator.
Exists | Determines whether a file associated with the BFile field exists.
FreeLob (inherited from TOraLob) | Releases the LOB locator descriptor.
FreeTemporary (inherited from TOraLob) | Frees a temporary LOB.
Init (inherited from TOraLob) | Initializes the OCILobLocator handle.
IsInit (inherited from TOraLob) | Verifies if the LOB locator is initialized.
IsOpen | Determines whether the file associated with the BFile field is opened.
IsTemporary (inherited from TOraLob) | Indicates whether the LOB is temporary.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
LengthLob (inherited from TOraLob) | Returns the number of bytes contained in the LOB object.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
OCILobLocator (inherited from TOraLob) | Used to get or set the OCILobLocator handle.
OCILobLocatorPtr (inherited from TOraLob) | Used to retrieve the LOB value type locator.
OCISvcCtx (inherited from TOraLob) | Used to assign a service context handle.
Open | Opens the file associated with the BFile field.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
ReadLob (inherited from TOraLob) | Reads the LOB content from the server.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh | Reloads a file associated the BFile field opened by Open.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.
WriteLob (inherited from TOraLob) | Writes a LOB value to the server.

See Also

  • TOraFile Class
  • TOraFile Class Members


TOraFile.Close Method

TOraFile.Close Method

Closes a file opened by Open.

Class

TOraFile

Syntax

procedure Close;

Remarks

Call the Close procedure to close a file specified by FileDir and FileName properties of the BFile field, opened earlier by Open.

See Also

  • Open


TOraFile.Exists Method

TOraFile.Exists Method

Determines whether a file associated with the BFile field exists.

Class

TOraFile

Syntax

function Exists: boolean;

Return Value
True, if a file associated with the BFile field exists, False otherwise.

Remarks

Call the Exists method to determine if a file associated with the BFile field exists.

See Also

  • Open


TOraFile.IsOpen Method

TOraFile.IsOpen Method

Determines whether the file associated with the BFile field is opened.

Class

TOraFile

Syntax

function IsOpen: boolean;

Return Value
True, if the file is opened, False otherwise.

Remarks

Use the IsOpen method to determine whether the file associated with the BFile field is opened.

See Also

  • Open


TOraFile.Open Method

TOraFile.Open Method

Opens the file associated with the BFile field.

Class

TOraFile

Syntax

procedure Open;

Remarks

Call the Open procedure to open the file associated with the BFile field.

See Also

  • Close
  • IsOpen
  • Exists


TOraFile.Refresh Method

TOraFile.Refresh Method

Reloads a file associated the BFile field opened by Open.

Class

TOraFile

Syntax

procedure Refresh;

Remarks

Call the Refresh procedure to reload the file associated the BFile field, which was opened earlier by Open.

See Also

  • Open


TOraInterval Class

TOraInterval Class

A class providing support for Oracle 9 interval datatypes.

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

Unit

OraClasses

Syntax

TOraInterval = class(TSharedObject);

Remarks

TOraInterval is used to support Oracle 9 interval datatypes. There are two interval datatypes:

INTERVAL YEAR TO MONTH,

INTERVAL DAY TO SECOND.

They can be distinguished by the DescriptorType property.

Inheritance Hierarchy

TObject
TSharedObject
TOraInterval


TOraInterval Members

TOraInterval Members

TOraInterval class overview.

Properties

Name | Description
AsString | Used to get and set the interval value as string.
DescriptorType | Used to define the descriptor type allocated to operate with the interval value.
FracPrecision | Used to get or set the interval fractional second precision.
IsNull | Used to get or set the null interval value flag.
LeadPrecision | Used to get or set the leading field precision.
OCIInterval | Used to get or set the OCIInterval descriptor handle.
OCIIntervalPtr | Used to get the OCIInterval type locator.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocInterval | Allocates the OCIInterval descriptor handle.
Compare | Compares the current TOraInterval value with the Dest value.
FreeInterval | Frees the OCIInterval descriptor handle.
GetDaySecond | Gets the values of the day and second from an interval.
GetYearMonth | Gets the values of the year and month from an interval.
Release (inherited from TSharedObject) | Decrements the reference count.
SetDaySecond | Used to set the values of the day and second from in an interval.
SetYearMonth | Sets the values of the year and month in an interval.


TOraInterval Properties

TOraInterval Properties

Properties of the TOraInterval class.

For a complete list of the TOraInterval class members, see the TOraInterval Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AsString | Used to get and set the interval value as string.
DescriptorType | Used to define the descriptor type allocated to operate with the interval value.
FracPrecision | Used to get or set the interval fractional second precision.
IsNull | Used to get or set the null interval value flag.
LeadPrecision | Used to get or set the leading field precision.
OCIInterval | Used to get or set the OCIInterval descriptor handle.
OCIIntervalPtr | Used to get the OCIInterval type locator.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TOraInterval Class
  • TOraInterval Class Members


TOraInterval.AsString Property

TOraInterval.AsString Property

Used to get and set the interval value as string.

Class

TOraInterval

Syntax

property AsString: string;

Remarks

Use the AsString property to get and set the interval value as string. Oracle establishes certain formats for each interval type.

INTERVAL YEAR TO MONTH format:

'[year-]month'.

INTERVAL DAY TO SECOND formats:

'seconds',

'minutes[:seconds]',

'hours[:minutes:[seconds]]',

'days[ hours[:minutes:[seconds]]]'.

Optional fields are surrounded by brackets.

Reading AsString property when IsNull is True returns an empty string.

See Also

  • IsNull


TOraInterval.DescriptorType Property

TOraInterval.DescriptorType Property

Used to define the descriptor type allocated to operate with the interval value.

Class

TOraInterval

Syntax

property DescriptorType: cardinal;

Remarks

Use the DescriptorType property to define the type of the descriptor which is allocated to operate with the interval value. In most cases you don't need to set this property directly: it is adjusted automatically when working with fields and parameters.

Valid values for this property are:

OCI_DTYPE_INTERVAL_DS,

OCI_DTYPE_INTERVAL_YM.

They are defined in OraCall unit.


TOraInterval.FracPrecision Property

TOraInterval.FracPrecision Property

Used to get or set the interval fractional second precision.

Class

TOraInterval

Syntax

property FracPrecision: byte;

Remarks

Use the FracPrecision property to get or set fractional second precision of the interval (the number of digits that are used to represent fractional seconds). This property affects only when reading the AsString property. The default value of the property is 6.

See Also

  • AsString


TOraInterval.IsNull Property

TOraInterval.IsNull Property

Used to get or set the null interval value flag.

Class

TOraInterval

Syntax

property IsNull: boolean;

Remarks

Use the IsNull property to get or set the null interval value flag. When IsNull is True getting values via the GetDaySecond and GetYearMonth methods can raise an exception. The AsString property in this case returns an empty string.

See Also

  • GetDaySecond
  • GetYearMonth
  • AsString


TOraInterval.LeadPrecision Property

TOraInterval.LeadPrecision Property

Used to get or set the leading field precision.

Class

TOraInterval

Syntax

property LeadPrecision: byte;

Remarks

Use the LeadPrecision property to get or set the leading field precision (the number of digits that are used to represent leading interval part). This property has effect only when reading the AsString property. The default value of the property is 2.

See Also

  • AsString


TOraInterval.OCIInterval Property

TOraInterval.OCIInterval Property

Used to get or set the OCIInterval descriptor handle.

Class

TOraInterval

Syntax

property OCIInterval: pOCIInterval;

Remarks

Use the OCIInterval property to get or set the OCIInterval descriptor handle.


TOraInterval.OCIIntervalPtr Property

TOraInterval.OCIIntervalPtr Property

Used to get the OCIInterval type locator.

Class

TOraInterval

Syntax

property OCIIntervalPtr: ppOCIInterval;

Remarks

Use the OCIIntervalPtr property to get the OCIInterval type locator.


TOraInterval Methods

TOraInterval Methods

Methods of the TOraInterval class.

For a complete list of the TOraInterval class members, see the TOraInterval Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocInterval | Allocates the OCIInterval descriptor handle.
Compare | Compares the current TOraInterval value with the Dest value.
FreeInterval | Frees the OCIInterval descriptor handle.
GetDaySecond | Gets the values of the day and second from an interval.
GetYearMonth | Gets the values of the year and month from an interval.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
SetDaySecond | Used to set the values of the day and second from in an interval.
SetYearMonth | Sets the values of the year and month in an interval.

See Also

  • TOraInterval Class
  • TOraInterval Class Members


TOraInterval.AllocInterval Method

TOraInterval.AllocInterval Method

Allocates the OCIInterval descriptor handle.

Class

TOraInterval

Syntax

procedure AllocInterval;

Remarks

Call the AllocInterval method to allocate the OCIInterval descriptor handle according to the DescriptorType property.

See Also

  • DescriptorType


TOraInterval.Compare Method

TOraInterval.Compare Method

Compares the current TOraInterval value with the Dest value.

Class

TOraInterval

Syntax

function Compare(Dest: TOraInterval): integer;

Parameters
Dest
Holds the Dest value.
Return Value
the negative value if current interval is shorter than Dest, zero if intervals are equal, and positive value if the current interval is longer than Dest.

Remarks

Call the Compare method to compare the current TOraInterval value with Dest value.

Returns negative value if current interval is shorter than Dest, zero if intervals are equal and positive value if current interval is longer than Dest.


TOraInterval.FreeInterval Method

TOraInterval.FreeInterval Method

Frees the OCIInterval descriptor handle.

Class

TOraInterval

Syntax

procedure FreeInterval;

Remarks

Call the FreeInterval procedure frees the OCIInterval descriptor handle. After the FreeInterval call the IsNull property is set to True.

See Also

  • IsNull


TOraInterval.GetDaySecond Method

TOraInterval.GetDaySecond Method

Gets the values of the day and second from an interval.

Class

TOraInterval

Syntax

procedure GetDaySecond(var Day: integer; var Hour: integer; var Min: integer; var Sec: integer; var FSec: integer);

Parameters
Day
Holds the day value.
Hour
Holds the hour value.
Min
Holds the minute value.
Sec
Holds the second value.
FSec
Holds the fraction second value.

Remarks

Call the GetDaySecond procedure to get the values of the day and second from an interval.

See Also

  • SetDaySecond


TOraInterval.GetYearMonth Method

TOraInterval.GetYearMonth Method

Gets the values of the year and month from an interval.

Class

TOraInterval

Syntax

procedure GetYearMonth(var Year: integer; var Month: integer);

Parameters
Year
Holds the year value.
Month
Holds the month value.

Remarks

Call the GetYearMonth procedure to get the values of the year and month from an interval.

See Also

  • SetYearMonth


TOraInterval.SetDaySecond Method

TOraInterval.SetDaySecond Method

Used to set the values of the day and second from in an interval.

Class

TOraInterval

Syntax

procedure SetDaySecond(Day: integer; Hour: integer; Min: integer; Sec: integer; FSec: integer);

Parameters
Day
Holds the day value.
Hour
Holds the hour value.
Min
Holds the minute value.
Sec
Holds the second value.
FSec
Holds the fraction second value.

Remarks

Call the SetDaySecond method to set the values of the day and second from in an interval.

See Also

  • GetDaySecond


TOraInterval.SetYearMonth Method

TOraInterval.SetYearMonth Method

Sets the values of the year and month in an interval.

Class

TOraInterval

Syntax

procedure SetYearMonth(Year: integer; Month: integer);

Parameters
Year
Holds the year value.
Month
Holds the month value.

Remarks

Call the SetYearMonth method to set the values of the year and month in an interval.

See Also

  • GetYearMonth


TOraLob Class

TOraLob Class

A class holding the value of the BLOB and CLOB fields and parameters.

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

Unit

OraClasses

Syntax

TOraLob = class(TCompressedBlob);

Remarks

TOraLob is a descendant of the TBlob class. It holds value of BLOB and CLOB fields and parameters.

Note: You can affect performance of reading/writing LOBs by changing MemData.DefaultPieceSize variable to a different value. DefaultPieceSize defines the size of data portion transferred through network at a single OCI call.

Inheritance Hierarchy

TObject
TSharedObject
TBlob
TCompressedBlob
TOraLob

See Also

  • TBlob
  • TOraDataSet.GetLob
  • TOraParam.AsBLOBLocator


TOraLob Members

TOraLob Members

TOraLob class overview.

Properties

Name | Description
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
Cached | Used to indicate where the LOB data is.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
OCILobLocator | Used to get or set the OCILobLocator handle.
OCILobLocatorPtr | Used to retrieve the LOB value type locator.
OCISvcCtx | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocLob | Allocates and initializes the LOB locator.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
CreateTemporary | Allocates and initializes a temporary LOB locator of the specified type.
DisableBuffering | Disables the LOB buffering for the LOB locator.
EnableBuffering | Enables the LOB buffering for the LOB locator.
FreeLob | Releases the LOB locator descriptor.
FreeTemporary | Frees a temporary LOB.
Init | Initializes the OCILobLocator handle.
IsInit | Verifies if the LOB locator is initialized.
IsTemporary | Indicates whether the LOB is temporary.
LengthLob | Returns the number of bytes contained in the LOB object.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
ReadLob | Reads the LOB content from the server.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.
WriteLob | Writes a LOB value to the server.


TOraLob Properties

TOraLob Properties

Properties of the TOraLob class.

For a complete list of the TOraLob class members, see the TOraLob Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
Cached | Used to indicate where the LOB data is.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
OCILobLocator | Used to get or set the OCILobLocator handle.
OCILobLocatorPtr | Used to retrieve the LOB value type locator.
OCISvcCtx | Used to assign a service context handle.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.

See Also

  • TOraLob Class
  • TOraLob Class Members


TOraLob.Cached Property

TOraLob.Cached Property

Used to indicate where the LOB data is.

Class

TOraLob

Syntax

property Cached: boolean;

Remarks

Use the Cached property to indicate whether the LOB data is cached on a client or it is accessed remotely on the server. In most cases you don't need to set the value of this property directly. To enable or disable LOB caching use the TOraDataSet.Options property.

See Also

  • TOraDataSet.Options


TOraLob.OCILobLocator Property

TOraLob.OCILobLocator Property

Used to get or set the OCILobLocator handle.

Class

TOraLob

Syntax

property OCILobLocator: pOCILobLocator;

Remarks

Use the OCILobLocator property to get or set the OCILobLocator handle.


TOraLob.OCILobLocatorPtr Property

TOraLob.OCILobLocatorPtr Property

Used to retrieve the LOB value type locator.

Class

TOraLob

Syntax

property OCILobLocatorPtr: ppOCILobLocator;

Remarks

Use the OCILobLocatorPtr property to retrieve the LOB value type locator.


TOraLob.OCISvcCtx Property

TOraLob.OCISvcCtx Property

Used to assign a service context handle.

Class

TOraLob

Syntax

property OCISvcCtx: pOCISvcCtx;

Remarks

Use the OCISvcCtx property to assign a service context handle. Some operations with LOBs require service context handle. To get a service context handle use TOraSession.OCISvcCtx.

See Also

  • TOraSession.OCISvcCtx


TOraLob Methods

TOraLob Methods

Methods of the TOraLob class.

For a complete list of the TOraLob class members, see the TOraLob Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocLob | Allocates and initializes the LOB locator.
Assign (inherited from TBlob) | Sets BLOB value from another TBlob object.
AsString (inherited from TBlob) | Used to manipulate BLOB value as string.
AsWideString (inherited from TBlob) | Used to manipulate BLOB value as Unicode string.
Clear (inherited from TBlob) | Deletes the current value in TBlob object.
CreateTemporary | Allocates and initializes a temporary LOB locator of the specified type.
DisableBuffering | Disables the LOB buffering for the LOB locator.
EnableBuffering | Enables the LOB buffering for the LOB locator.
FreeLob | Releases the LOB locator descriptor.
FreeTemporary | Frees a temporary LOB.
Init | Initializes the OCILobLocator handle.
IsInit | Verifies if the LOB locator is initialized.
IsTemporary | Indicates whether the LOB is temporary.
IsUnicode (inherited from TBlob) | Gives choice of making TBlob store and process data in Unicode format or not.
LengthLob | Returns the number of bytes contained in the LOB object.
LoadFromFile (inherited from TBlob) | Loads the contents of a file into a TBlob object.
LoadFromStream (inherited from TBlob) | Copies the contents of a stream into the TBlob object.
Read (inherited from TBlob) | Acquires a raw sequence of bytes from the data stored in TBlob.
ReadLob | Reads the LOB content from the server.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToFile (inherited from TBlob) | Saves the contents of the TBlob object to a file.
SaveToStream (inherited from TBlob) | Copies the contents of a TBlob object to a stream.
Size (inherited from TBlob) | Used to learn the size of the TBlob value in bytes.
Truncate (inherited from TBlob) | Sets new TBlob size and discards all data over it.
Write (inherited from TBlob) | Stores a raw sequence of bytes into a TBlob object.
WriteLob | Writes a LOB value to the server.

See Also

  • TOraLob Class
  • TOraLob Class Members


TOraLob.AllocLob Method

TOraLob.AllocLob Method

Allocates and initializes the LOB locator.

Class

TOraLob

Syntax

procedure AllocLob; virtual;

Remarks

Call the AllocLob method to allocate and initialize the LOB locator.


TOraLob.CreateTemporary Method

TOraLob.CreateTemporary Method

Allocates and initializes a temporary LOB locator of the specified type.

Class

TOraLob

Syntax

procedure CreateTemporary(LobType: TLobType);

Parameters
LobType
Holds the type of the temporary LOB locator.

Remarks

Call the CreateTemporary method to allocate and initialize a temporary LOB locator of the specified type.


TOraLob.DisableBuffering Method

TOraLob.DisableBuffering Method

Disables the LOB buffering for the LOB locator.

Class

TOraLob

Syntax

procedure DisableBuffering;

Remarks

Call the DisableBuffering method to disable the LOB buffering for the LOB locator. The next time data is read from or written to the LOB through the input locator, the LOB buffering subsystem is not used.

See Also

  • EnableBuffering


TOraLob.EnableBuffering Method

TOraLob.EnableBuffering Method

Enables the LOB buffering for the LOB locator.

Class

TOraLob

Syntax

procedure EnableBuffering;

Remarks

Call the EnableBuffering method to enable the LOB buffering for the LOB locator. The next time data is read from or written to the LOB through the input locator, the LOB buffering subsystem is used.

See Also

  • DisableBuffering


TOraLob.FreeLob Method

TOraLob.FreeLob Method

Releases the LOB locator descriptor.

Class

TOraLob

Syntax

procedure FreeLob;

Remarks

Call the FreeLob method to release the LOB locator descriptor.


TOraLob.FreeTemporary Method

TOraLob.FreeTemporary Method

Frees a temporary LOB.

Class

TOraLob

Syntax

procedure FreeTemporary;

Remarks

Use the FreeTemporary method to free a temporary LOB.

See Also

  • FreeLob


TOraLob.Init Method

TOraLob.Init Method

Initializes the OCILobLocator handle.

Class

TOraLob

Syntax

procedure Init;

Remarks

Call the Init method to initialize the OCILobLocator handle.


TOraLob.IsInit Method

TOraLob.IsInit Method

Verifies if the LOB locator is initialized.

Class

TOraLob

Syntax

function IsInit: boolean;

Return Value
True, if the LOB locator is initialized. False otherwise.

Remarks

Call the IsInit method to verify that the LOB locator is initialized.


TOraLob.IsTemporary Method

TOraLob.IsTemporary Method

Indicates whether the LOB is temporary.

Class

TOraLob

Syntax

function IsTemporary: LongBool;

Return Value
True, if the LOB is temporary. False otherwise.

Remarks

Call the IsTemporary method to indicate whether the LOB is temporary.


TOraLob.LengthLob Method

TOraLob.LengthLob Method

Returns the number of bytes contained in the LOB object.

Class

TOraLob

Syntax

function LengthLob: longint;

Return Value
the LOB object size in bytes.

Remarks

Call the LengthLob method to return the number of bytes contained in the LOB object.


TOraLob.ReadLob Method

TOraLob.ReadLob Method

Reads the LOB content from the server.

Class

TOraLob

Syntax

procedure ReadLob(var SharedPiece: PPieceHeader); overload;procedure ReadLob; overload;

Remarks

Call the ReadLob method to get the LOB content from the server. When reading such properties as AsString or AsWideString this method is called automatically.


TOraLob.WriteLob Method

TOraLob.WriteLob Method

Writes a LOB value to the server.

Class

TOraLob

Syntax

procedure WriteLob;

Remarks

Call the WriteLob method to write a LOB value to the server.


TOraNumber Class

TOraNumber Class

A class supporting

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

Unit

OraClasses

Syntax

TOraNumber = class(TSharedObject);

Remarks

TOraNumber is used to support the Oracle numbers in native format. Support of the internal Oracle number format on clients allows to use full number precision without accuracy losses.

Inheritance Hierarchy

TObject
TSharedObject
TOraNumber


TOraNumber Members

TOraNumber Members

TOraNumber class overview.

Properties

Name | Description
AsFloat | Used to get and set the number value as float.
AsInteger | Used to get and set the number value as integer.
AsLargeInt | Used to get and set the number value as Int64.
AsString | Used to get and set the number value as string.
IsNull | Used to set the null number value flag.
OCINumber | Used to get or set the OCINumber opaque structure value.
OCINumberPtr | Used to get a pointer to the OCINumber structure.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AssignTo | Copies all properties of the current TOraNumber instance to the Dest TOraNumber instance.
Compare | Compares the current TOraNumber value with the Dest value.
Release (inherited from TSharedObject) | Decrements the reference count.


TOraNumber Properties

TOraNumber Properties

Properties of the TOraNumber class.

For a complete list of the TOraNumber class members, see the TOraNumber Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AsFloat | Used to get and set the number value as float.
AsInteger | Used to get and set the number value as integer.
AsLargeInt | Used to get and set the number value as Int64.
AsString | Used to get and set the number value as string.
IsNull | Used to set the null number value flag.
OCINumber | Used to get or set the OCINumber opaque structure value.
OCINumberPtr | Used to get a pointer to the OCINumber structure.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TOraNumber Class
  • TOraNumber Class Members


TOraNumber.AsFloat Property

TOraNumber.AsFloat Property

Used to get and set the number value as float.

Class

TOraNumber

Syntax

property AsFloat: double;

Remarks

Use the AsFloat property to get and set the number value as float.

Reading AsFloat property when IsNull is True returns 0.

See Also

  • IsNull


TOraNumber.AsInteger Property

TOraNumber.AsInteger Property

Used to get and set the number value as integer.

Class

TOraNumber

Syntax

property AsInteger: integer;

Remarks

Use the AsIntegert property to get and set the number value as integer.

Reading AsInteger property when IsNull is True returns 0.

See Also

  • IsNull


TOraNumber.AsLargeInt Property

TOraNumber.AsLargeInt Property

Used to get and set the number value as Int64.

Class

TOraNumber

Syntax

property AsLargeInt: Int64;

Remarks

Use the AsLargeInt property to get and set the number value as Int64.

Reading AsLargeInt property when IsNull is True returns 0.

See Also

  • IsNull


TOraNumber.AsString Property

TOraNumber.AsString Property

Used to get and set the number value as string.

Class

TOraNumber

Syntax

property AsString: string;

Remarks

Use the AsString property to get and set the number value as string.

Reading AsString property when IsNull is True returns empty string.

See Also

  • IsNull


TOraNumber.IsNull Property

TOraNumber.IsNull Property

Used to set the null number value flag.

Class

TOraNumber

Syntax

property IsNull: boolean;

Remarks

Use the IsNull property to get or set the null number value flag.


TOraNumber.OCINumber Property

TOraNumber.OCINumber Property

Used to get or set the OCINumber opaque structure value.

Class

TOraNumber

Syntax

property OCINumber: OCINumber;

Remarks

Use the OCINumber property to get or set the OCINumber opaque structure value.


TOraNumber.OCINumberPtr Property

TOraNumber.OCINumberPtr Property

Used to get a pointer to the OCINumber structure.

Class

TOraNumber

Syntax

property OCINumberPtr: pOCINumber;

Remarks

Use the OCINumberPtr property to get a pointer to the OCINumber structure.

See Also

  • OCINumber


TOraNumber Methods

TOraNumber Methods

Methods of the TOraNumber class.

For a complete list of the TOraNumber class members, see the TOraNumber Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AssignTo | Copies all properties of the current TOraNumber instance to the Dest TOraNumber instance.
Compare | Compares the current TOraNumber value with the Dest value.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TOraNumber Class
  • TOraNumber Class Members


TOraNumber.AssignTo Method

TOraNumber.AssignTo Method

Copies all properties of the current TOraNumber instance to the Dest TOraNumber instance.

Class

TOraNumber

Syntax

procedure AssignTo(Dest: TOraNumber);

Parameters
Dest
Holds a Dest TOraNumber instance.

Remarks

Call AssignTo method to copy all properties of the current TOraNumber instance to the Dest TOraNumber instance.


TOraNumber.Compare Method

TOraNumber.Compare Method

Compares the current TOraNumber value with the Dest value.

Class

TOraNumber

Syntax

function Compare(Dest: TOraNumber): integer;

Parameters
Dest
Holds the Dest value to compare the current TOraNumber value with.
Return Value
a negative value if current number is less than Dest, zero if numbers are equal, and a positive value if the current number is greater than Dest.

Remarks

Call the Compare method to compare the current TOraNumber value with the Dest value.

Returns a negative value if current number is less than Dest, zero if numbers are equal, and a positive value if the current number is greater than Dest.


TOraTimeStamp Class

TOraTimeStamp Class

A class supporting Oracle 9 timestamp datatypes.

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

Unit

OraClasses

Syntax

TOraTimeStamp = class(TSharedObject);

Remarks

TOraTimeStamp is used to support Oracle 9 timestamp datatypes. There are three timestamp datatypes:

TIMESTAMP,

TIMESTAMP WITH TIME ZONE,

TIMESTAMP WITH LOCAL TIME ZONE.

They can be distinguished by DescriptorType property.

Inheritance Hierarchy

TObject
TSharedObject
TOraTimeStamp


TOraTimeStamp Members

TOraTimeStamp Members

TOraTimeStamp class overview.

Properties

Name | Description
AsDateTime | Used to get and set the timestamp value as TDateTime.
AsString | Used to get and set the timestamp value as string.
DescriptorType | Defines the type of the descriptor allocated to operate with the interval value.
Format | Used to get or set the date-time format model for operations with the TOraTimeStamp.AsString property.
IsNull | Used to get or set the null timestamp value flag.
OCIDateTime | Used to set the OCIDateTime descriptor handle.
OCIDateTimePtr | Used to provide the OCIDateTime type locator.
Precision | Used to learn or set the precision with which the fractional seconds are returned.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
TimeZone | Used to provide a time zone name portion of the datetime value.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocDateTime | Allocates the OCIDateTime descriptor handle according to the TOraTimeStamp.DescriptorType property.
Compare | Compares the current TOraTimeStamp value with the Dest value.
Construct | Constructs datetime descriptor.
GetDate | Provides a date portion of the datetime value.
GetTime | Provides a time portion of the datetime value.
GetTimeZoneOffset | Provides a time zone portion of the datetime value.
Release (inherited from TSharedObject) | Decrements the reference count.
SetDate | Provides a date portion of the datetime value.
SetTime | Sets the time into a datetime value.
SetTimeZoneOffset | Provides a time zone portion of the datetime value.


TOraTimeStamp Properties

TOraTimeStamp Properties

Properties of the TOraTimeStamp class.

For a complete list of the TOraTimeStamp class members, see the TOraTimeStamp Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AsDateTime | Used to get and set the timestamp value as TDateTime.
AsString | Used to get and set the timestamp value as string.
DescriptorType | Defines the type of the descriptor allocated to operate with the interval value.
Format | Used to get or set the date-time format model for operations with the TOraTimeStamp.AsString property.
IsNull | Used to get or set the null timestamp value flag.
OCIDateTime | Used to set the OCIDateTime descriptor handle.
OCIDateTimePtr | Used to provide the OCIDateTime type locator.
Precision | Used to learn or set the precision with which the fractional seconds are returned.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
TimeZone | Used to provide a time zone name portion of the datetime value.

See Also

  • TOraTimeStamp Class
  • TOraTimeStamp Class Members


TOraTimeStamp.AsDateTime Property

TOraTimeStamp.AsDateTime Property

Used to get and set the timestamp value as TDateTime.

Class

TOraTimeStamp

Syntax

property AsDateTime: TDateTime;

Remarks

Use the AsDateTime property to get and set the timestamp value as TDateTime.

Reading the AsDateTime property when IsNull is True returns 0.

See Also

  • IsNull


TOraTimeStamp.AsString Property

TOraTimeStamp.AsString Property

Used to get and set the timestamp value as string.

Class

TOraTimeStamp

Syntax

property AsString: string;

Remarks

Use the AsString property to get and set the timestamp value as string. Format of the string is specified by the Format property.

Reading the AsString property when IsNull is True returns empty string.

See Also

  • Format
  • IsNull


TOraTimeStamp.DescriptorType Property

TOraTimeStamp.DescriptorType Property

Defines the type of the descriptor allocated to operate with the interval value.

Class

TOraTimeStamp

Syntax

property DescriptorType: cardinal;

Remarks

Use the DescriptorType property to define the type of the descriptor that is allocated to operate with the interval value. In most cases you don't need to set this property directly: it is adjusted automatically when working with fields and parameters.

Valid values for this property are:

OCI_DTYPE_TIMESTAMP,

OCI_DTYPE_TIMESTAMP_TZ,

OCI_DTYPE_TIMESTAMP_LTZ.

They are defined in the OraCall unit.


TOraTimeStamp.Format Property

TOraTimeStamp.Format Property

Used to get or set the date-time format model for operations with the AsString property.

Class

TOraTimeStamp

Syntax

property Format: string;

Remarks

Use the Format property to get or set the date-time format model for operations with the AsString property. For example, the date format model for string '17:54:23' is 'HH24:MM:SS' . For complete description of the date-time models refer to the Oracle documentation.

See Also

  • AsString


TOraTimeStamp.IsNull Property

TOraTimeStamp.IsNull Property

Used to get or set the null timestamp value flag.

Class

TOraTimeStamp

Syntax

property IsNull: boolean;

Remarks

Use the IsNull property to get or set the null timestamp value flag. When IsNull is true getting values via the GetDate, GetTime and SetTimeZoneOffset methods can raise an exception. The AsString property in this case returns empty string. The AsDateTime property returns 0.

See Also

  • GetDate
  • GetTime
  • SetTimeZoneOffset
  • AsString
  • AsDateTime


TOraTimeStamp.OCIDateTime Property

TOraTimeStamp.OCIDateTime Property

Used to set the OCIDateTime descriptor handle.

Class

TOraTimeStamp

Syntax

property OCIDateTime: pOCIDateTime;

Remarks

Use the OCIDateTime property to get or set the OCIDateTime descriptor handle.


TOraTimeStamp.OCIDateTimePtr Property

TOraTimeStamp.OCIDateTimePtr Property

Used to provide the OCIDateTime type locator.

Class

TOraTimeStamp

Syntax

property OCIDateTimePtr: ppOCIDateTime;

Remarks

Use the OCIDateTimePtr property to get the OCIDateTime type locator.


TOraTimeStamp.Precision Property

TOraTimeStamp.Precision Property

Used to learn or set the precision with which the fractional seconds are returned.

Class

TOraTimeStamp

Syntax

property Precision: byte;

Remarks

Use the Precision property to get or set the precision in which the fractional seconds are returned when reading the AsString property. The default value of the property is 6.

See Also

  • AsString


TOraTimeStamp.TimeZone Property

TOraTimeStamp.TimeZone Property

Used to provide a time zone name portion of the datetime value.

Class

TOraTimeStamp

Syntax

property TimeZone: string;

Remarks

Use the TimeZone property to get a time zone name portion of the datetime value.


TOraTimeStamp Methods

TOraTimeStamp Methods

Methods of the TOraTimeStamp class.

For a complete list of the TOraTimeStamp class members, see the TOraTimeStamp Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocDateTime | Allocates the OCIDateTime descriptor handle according to the TOraTimeStamp.DescriptorType property.
Compare | Compares the current TOraTimeStamp value with the Dest value.
Construct | Constructs datetime descriptor.
GetDate | Provides a date portion of the datetime value.
GetTime | Provides a time portion of the datetime value.
GetTimeZoneOffset | Provides a time zone portion of the datetime value.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
SetDate | Provides a date portion of the datetime value.
SetTime | Sets the time into a datetime value.
SetTimeZoneOffset | Provides a time zone portion of the datetime value.

See Also

  • TOraTimeStamp Class
  • TOraTimeStamp Class Members


TOraTimeStamp.AllocDateTime Method

TOraTimeStamp.AllocDateTime Method

Allocates the OCIDateTime descriptor handle according to the DescriptorType property.

Class

TOraTimeStamp

Syntax

procedure AllocDateTime;

Remarks

Use the AllocDateTime method to allocate the OCIDateTime descriptor handle according to the DescriptorType property.

See Also

  • DescriptorType


TOraTimeStamp.Compare Method

TOraTimeStamp.Compare Method

Compares the current TOraTimeStamp value with the Dest value.

Class

TOraTimeStamp

Syntax

function Compare(Dest: TOraTimeStamp): integer;

Parameters
Dest
Holds the Dest value.
Return Value
negative value if the current timestamp is less than Dest, zero if timestamp is equal, and positive value if the current timestamp is greater than Dest.

Remarks

Call the Compare method to compare the current TOraTimeStamp value with the Dest value.

Returns negative value if current timestamp is less than Dest, zero if timestamp are equal and positive value if current timestamp is greater than Dest.


TOraTimeStamp.Construct Method

TOraTimeStamp.Construct Method

Constructs datetime descriptor.

Class

TOraTimeStamp

Syntax

procedure Construct(Year: smallint; Month: byte; Day: byte; Hour: byte; Min: byte; Sec: byte; FSec: cardinal; TimeZone: string);

Parameters
Year
Holds the year.
Month
Holds the month.
Day
Holds the day.
Hour
Holds the hour.
Min
Holds the minute.
Sec
Holds the second.
FSec
Holds the fraction second.
TimeZone
Holds the time zone name.

Remarks

Call the Construct method to construct datetime descriptor. When calling the Construct procedure only relevant fields based on the datetime type are used. For the type with time zone, the date and time fields are assumed to be in the local time of the specified time zone. If the time zone is not specified, then session default time zone is assumed.

See Also

  • SetDate
  • SetTime
  • SetTimeZoneOffset


TOraTimeStamp.GetDate Method

TOraTimeStamp.GetDate Method

Provides a date portion of the datetime value.

Class

TOraTimeStamp

Syntax

procedure GetDate(var Year: smallint; var Month: byte; var Day: byte);

Parameters
Year
Holds the year.
Month
Holds the month.
Day
Holds the day.

Remarks

Call the GetDate method to get a date (year, month, day) portion of the datetime value.

See Also

  • GetTime
  • SetTimeZoneOffset


TOraTimeStamp.GetTime Method

TOraTimeStamp.GetTime Method

Provides a time portion of the datetime value.

Class

TOraTimeStamp

Syntax

procedure GetTime(var Hour: byte; var Min: byte; var Sec: byte; var FSec: cardinal);

Parameters
Hour
Holds the hour.
Min
Holds the minute.
Sec
Holds the second.
FSec
Holds the fraction second.

Remarks

Call the GetTime method to get a time (hour, minute, second, fractional second) of the datetime value.

See Also

  • GetDate
  • SetTimeZoneOffset
  • GetTime


TOraTimeStamp.GetTimeZoneOffset Method

TOraTimeStamp.GetTimeZoneOffset Method

Provides a time zone portion of the datetime value.

Class

TOraTimeStamp

Syntax

procedure GetTimeZoneOffset(var Hour: shortint; var Min: shortint);

Parameters
Hour
Holds the hour.
Min
Holds the minute.

Remarks

Call the GetTimeZoneOffset method to get a time zone (hour, minute) portion of the datetime value.

See Also

  • GetDate
  • GetTime


TOraTimeStamp.SetDate Method

TOraTimeStamp.SetDate Method

Provides a date portion of the datetime value.

Class

TOraTimeStamp

Syntax

procedure SetDate(Year: smallint; Month: byte; Day: byte);

Parameters
Year
Holds the year.
Month
Holds the month.
Day
Holds the day.

Remarks

Call the SetDate method to set a date (year, month, day) portion in a datetime value.

See Also

  • Construct


TOraTimeStamp.SetTime Method

TOraTimeStamp.SetTime Method

Sets the time into a datetime value.

Class

TOraTimeStamp

Syntax

procedure SetTime(Hour: byte; Min: byte; Sec: byte; FSec: cardinal);

Parameters
Hour
Holds the hour.
Min
Holds the minute.
Sec
Holds the second.
FSec
Holds the fraction second.

Remarks

Call the SetTime method to set the time (hour, minute, second, fractional second) into a datetime value.

See Also

  • Construct


TOraTimeStamp.SetTimeZoneOffset Method

TOraTimeStamp.SetTimeZoneOffset Method

Provides a time zone portion of the datetime value.

Class

TOraTimeStamp

Syntax

procedure SetTimeZoneOffset(TZHour: shortint; TZMin: shortint);

Parameters
TZHour
Holds the hour.
TZMin
Holds the minute.

Remarks

Call the SetTimeZoneOffset method to set a time zone (hour, minute) portion of the datetime value.

See Also

  • Construct


Enumerations in OraClasses

Enumerations in OraClasses

Enumerations in the OraClasses unit.

Enumerations

Name | Description
TConnectMode | Specifies the system privileges used when a user connects to the server.
TOptimizerMode | Specifies the optimizer mode for connection.


TConnectMode Enumeration

TConnectMode Enumeration

Specifies the system privileges used when a user connects to the server.

Unit

OraClasses

Syntax

TConnectMode = (cmNormal, cmSysOper, cmSysDBA, cmSysASM);

Values

Value | Meaning
cmNormal | Connect as an ordinary user. The default value.
cmSysASM | Connect with the SYSASM role.
cmSysDBA | Connect with the SYSDBA role.
cmSysOper | Connect with the SYSOPER role.


TOptimizerMode Enumeration

TOptimizerMode Enumeration

Specifies the optimizer mode for connection.

Unit

OraClasses

Syntax

TOptimizerMode = (omDefault, omFirstRows1000, omFirstRows100, omFirstRows10, omFirstRows1, omFirstRows, omAllRows, omChoose, omRule);

Values

Value | Meaning
omAllRows | Explicitly chooses the cost-based approach to optimize a statement block with a goal of best throughput (that is minimum total resource consumption).
omChoose | Causes the optimizer to choose between the rule-based and cost-based approaches for a SQL statement. The optimizer selection is based on the presence of statistics for the tables accessed by the statement. If the data dictionary has statistics for at least one of these tables, then the optimizer uses the cost-based approach and optimizes with the goal of the best throughput. If the data dictionary does not have statistics for these tables, then it uses the rule-based approach.
omDefault | Session optimizer mode will not be changed.
omFirstRows | This mode is retained for backward compatibility and plan stability. It optimizes for the best plan to return the first single row.
omFirstRows1 | Instruct Oracle to optimize a SQL statement for fast response. It instructs Oracle to choose the plan that returns the first row most efficiently. If you use the version server lower than Oracle 9.0, these values have the same effect as omFirstRows.
omFirstRows10 | Instruct Oracle to optimize an SQL statement for fast response. It instructs Oracle to choose the plan that returns the first 10 rows most efficiently. If you use the version server lower than Oracle 9.0, these values have the same effect as omFirstRows.
omFirstRows100 | Instruct Oracle to optimize an SQL statement for fast response. It instructs Oracle to choose the plan that returns the first 100 rows most efficiently. If you use the version server lower than Oracle 9.0, these values have the same effect as omFirstRows.
omFirstRows1000 | Instruct Oracle to optimize an SQL statement for fast response. It instructs Oracle to choose the plan that returns the first 1000 rows most efficiently. If you use the version server lower than Oracle 9.0, these values have the same effect as omFirstRows.
omRule | Chooses rule-based optimization (RBO). Any other value causes the optimizer to choose cost-based optimization (CBO). The rule-based optimizer is the archaic optimizer mode from the earliest releases of Oracle Database.


Variables in OraClasses

Variables in OraClasses

Variables in the OraClasses unit.

Variables

Name | Description
FloatPrecision | Set this constant to define the type of NUMBER fields with Scale > 0.
IntegerPrecision | Set this constant to define the type of NUMBER fields with precision less than or equal to IntegerPrecision as dtInteger.
LargeIntPrecision | Set this constant to define the type of NUMBER fields with precision greater than the IntegerPresision and less than or equal to LargeIntPrecision as dtLargeInt.


OraClasses.FloatPrecision Variable

OraClasses.FloatPrecision Variable

Set this constant to define the type of NUMBER fields with Scale > 0.

Unit

OraClasses

Syntax

FloatPrecision: integer = 15;

Remarks

Set this constant to define the type of NUMBER fields with Scale > 0. If its precision is less than or equal to FloatPrecision the field will be defined as TFloatField. Otherwise it will be defined as TOraNumberField (if TOraSessionOptions.EnableNumbers option is set to True).

According to these constants and TOraSessionOptions.EnableIntegers and TOraSessionOptions.EnableNumbers options, Oracle NUMBER type is mapped to ODAC field classes in the following way:
Conditions | Field class
Precision <= IntegerPrecision, Scale = 0, TOraSessionOptions.EnableIntegers = True | TIntegerField
IntegerPrecision < Precision <= LargeIntPrecision, Scale = 0, TOraSessionOptions.EnableIntegers = True | TLargeIntField
Precision > FloatPrecision, Scale > 0, TOraSessionOptions.EnableNumbers = True | TOraNumberField
In other cases | TFloatField

Example

FloatPrecision: integer = 15;


OraClasses.IntegerPrecision Variable

OraClasses.IntegerPrecision Variable

Set this constant to define the type of NUMBER fields with precision less than or equal to IntegerPrecision as dtInteger.

Unit

OraClasses

Syntax

IntegerPrecision: integer = 9;


OraClasses.LargeIntPrecision Variable

OraClasses.LargeIntPrecision Variable

Set this constant to define the type of NUMBER fields with precision greater than the IntegerPresision and less than or equal to LargeIntPrecision as dtLargeInt.

Unit

OraClasses

Syntax

LargeIntPrecision: integer = 0;


OraConnectionPool Unit Members

OraConnectionPool Unit Members

This unit contains the TOraConnectionPoolManager class for managing connection pool.

Classes

Name | Description
TOraConnectionPoolManager | [!inherited]

Enumerations

Name | Description
TOraPoolingType | Specifies the pool type.


Classes in OraConnectionPool

Classes in OraConnectionPool

Classes in the OraConnectionPool unit.

Classes

Name | Description
TOraConnectionPoolManager | [!inherited]


TOraConnectionPoolManager Class

TOraConnectionPoolManager Class

[!inherited]

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

Unit

OraConnectionPool

Syntax

TOraConnectionPoolManager = class(TCRConnectionPoolManager);

Remarks

[!inherited]

Inheritance Hierarchy

TObject
TCRConnectionPoolManager
TOraConnectionPoolManager

See Also

  • [!inherited]


TOraConnectionPoolManager Members

TOraConnectionPoolManager Members

TOraConnectionPoolManager class overview.


Enumerations in OraConnectionPool

Enumerations in OraConnectionPool

Enumerations in the OraConnectionPool unit.

Enumerations

Name | Description
TOraPoolingType | Specifies the pool type.


TOraPoolingType Enumeration

TOraPoolingType Enumeration

Specifies the pool type.

Unit

OraConnectionPool

Syntax

TOraPoolingType = (optLocal, optOCI, optMTS);

Values

Value | Meaning
optLocal | Pool is created and controlled by ODAC.
optMTS | Pool is created and controlled by MTS.
optOCI | Pool is created and controlled by OCI.


OraErrHand Unit Members

OraErrHand Unit Members

This unit contains the TOraErrorHandler component.

Classes

Name | Description
TOraErrorHandler | A component allowing translating of error messages.

Types

Name | Description
TOnOraErrorEvent | This type is used for the TOraErrorHandler.OnError event.


Classes in OraErrHand

Classes in OraErrHand

Classes in the OraErrHand unit.

Classes

Name | Description
TOraErrorHandler | A component allowing translating of error messages.


TOraErrorHandler Class

TOraErrorHandler Class

A component allowing translating of error messages.

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

Unit

OraErrHand

Syntax

TOraErrorHandler = class(TComponent);

Remarks

TOraErrorHandler allows to translate error messages. Messages is stored in error table or can be got out of OnError event handler.

Structure of the error table must be as following:

ErrorCode   INTEGER
Constraint  VARCHAR2
Message     VARCHAR2
SenderName  VARCHAR2
ErrorClass  VARCHAR2

You can create and edit error table by ErrorHandler Editor in design time.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TOraErrorHandler

See Also

  • EOraError


TOraErrorHandler Members

TOraErrorHandler Members

TOraErrorHandler class overview.

Properties

Name | Description
Active | Activates searching messages in error table.
Debug | Used for an error message to contain additional information.
Session | Used to specify the session in which the dataset will be executed.
TableName | Used to define the error table name.

Methods

Name | Description
Close | Sets the Active property of a table to False.
Open | Sets the Active property to True.

Events

Name | Description
OnError | Occurs if an appropriate error can not be found in the error table or Active is False.


TOraErrorHandler Properties

TOraErrorHandler Properties

Properties of the TOraErrorHandler class.

For a complete list of the TOraErrorHandler class members, see the TOraErrorHandler Members topic.

Published

Name | Description
Active | Activates searching messages in error table.
Debug | Used for an error message to contain additional information.
Session | Used to specify the session in which the dataset will be executed.
TableName | Used to define the error table name.

See Also

  • TOraErrorHandler Class
  • TOraErrorHandler Class Members


TOraErrorHandler.Active Property

TOraErrorHandler.Active Property

Activates searching messages in error table.

Class

TOraErrorHandler

Syntax

property Active: boolean default False;

Remarks

When the Active property is True, ErrorHandler searches messages in error table.

See Also

  • Open


TOraErrorHandler.Debug Property

TOraErrorHandler.Debug Property

Used for an error message to contain additional information.

Class

TOraErrorHandler

Syntax

property Debug: boolean default False;

Remarks

When the Debug property is True, error message contains additional information: sender name, constraint name and error code.


TOraErrorHandler.Session Property

TOraErrorHandler.Session Property

Used to specify the session in which the dataset will be executed.

Class

TOraErrorHandler

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session in which the dataset will be executed. If Session is not connected, the Open method calls Session.Connect.

See Also

  • TOraSession


TOraErrorHandler.TableName Property

TOraErrorHandler.TableName Property

Used to define the error table name.

Class

TOraErrorHandler

Syntax

property TableName: string;

Remarks

Use the TableName property to determine the error table name. The error table must exist.


TOraErrorHandler Methods

TOraErrorHandler Methods

Methods of the TOraErrorHandler class.

For a complete list of the TOraErrorHandler class members, see the TOraErrorHandler Members topic.

Public

Name | Description
Close | Sets the Active property of a table to False.
Open | Sets the Active property to True.

See Also

  • TOraErrorHandler Class
  • TOraErrorHandler Class Members


TOraErrorHandler.Close Method

TOraErrorHandler.Close Method

Sets the Active property of a table to False.

Class

TOraErrorHandler

Syntax

procedure Close;

Remarks

Call the Close method to set the Active property of a table to False. When Active is False, the table is closed; the table cannot read data from or write data to the database.

See Also

  • Open


TOraErrorHandler.Open Method

TOraErrorHandler.Open Method

Sets the Active property to True.

Class

TOraErrorHandler

Syntax

procedure Open;

Remarks

Call the Open method to set the Active property for the table to True. When Active is True, data can be read from and written to the database.

See Also

  • Close
  • Active


TOraErrorHandler Events

TOraErrorHandler Events

Events of the TOraErrorHandler class.

For a complete list of the TOraErrorHandler class members, see the TOraErrorHandler Members topic.

Published

Name | Description
OnError | Occurs if an appropriate error can not be found in the error table or Active is False.

See Also

  • TOraErrorHandler Class
  • TOraErrorHandler Class Members


TOraErrorHandler.OnError Event

TOraErrorHandler.OnError Event

Occurs if an appropriate error can not be found in the error table or Active is False.

Class

TOraErrorHandler

Syntax

property OnError: TOnOraErrorEvent;

Remarks

Occurs when ErrorHandler can not find an appropriate error in the error table or Active is False.

See Also

  • TCustomDAConnection.OnError


Types in OraErrHand

Types in OraErrHand

Types in the OraErrHand unit.

Types

Name | Description
TOnOraErrorEvent | This type is used for the TOraErrorHandler.OnError event.


TOnOraErrorEvent Procedure Reference

TOnOraErrorEvent Procedure Reference

This type is used for the TOraErrorHandler.OnError event.

Unit

OraErrHand

Syntax

TOnOraErrorEvent = procedure (Sender: TObject; E: Exception; ErrorCode: integer; const ConstraintName: string; var Msg: string) of object;

Parameters
Sender
An object that raised the event.
E
Holds the reference to an exception object.
ErrorCode
The code of an error.
ConstraintName
Holds the name of the constraint that raised the error.
Msg
Holds the error message (can be set individually).


Classes in OraError

Classes in OraError

Classes in the OraError unit.

Classes

Name | Description
EOraError | Raised when a component detects Oracle error.


EOraError Class

EOraError Class

Raised when a component detects Oracle error.

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

Unit

OraError

Syntax

EOraError = class(EDAError);

Remarks

EOraError is raised when a component detects Oracle error. Use EOraError in an exception handling block.

Inheritance Hierarchy

TObject
Exception
EDatabaseError
EDAError
EOraError

See Also

  • TOraErrorHandler


EOraError Members

EOraError Members

EOraError class overview.

Properties

Name | Description
ErrorCode (inherited from EDAError) | Determines the error code returned by the server.
Sender | Holds reference to the sender if exception is raised by the TComponent instance.


EOraError Properties

EOraError Properties

Properties of the EOraError class.

For a complete list of the EOraError class members, see the EOraError Members topic.

Public

Name | Description
ErrorCode (inherited from EDAError) | Determines the error code returned by the server.
Sender | Holds reference to the sender if exception is raised by the TComponent instance.

See Also

  • EOraError Class
  • EOraError Class Members


EOraError.Sender Property

EOraError.Sender Property

Holds reference to the sender if exception is raised by the TComponent instance.

Class

EOraError

Syntax

property Sender: TComponent;

Remarks

The Sender property holds reference to the sender if exception is raised by the TComponent instance.


OraLoader Unit Members

OraLoader Unit Members

This unit contains implementation of the TOraLoader component.

Classes

Name | Description
TDPColumn | A base class holding a collection of TDPColumn objects.
TOraLoader | TOraLoader allows to load external data into the server database.

Types

Name | Description
TDPErrorEvent | This type is used for the TOraLoader.OnError event.
TDPGetColumnDataEvent | This type is used for the TOraLoader.OnGetColumnData event.
TDPPutDataEvent | This type is used for the TOraLoader.OnPutData event.

Enumerations

Name | Description
TDPErrorAction | Specifies the action for TOraLoader to take to process errors that occur during loading.
TLoadMode | Specifies the access mode to use for a TOraLoader object when a database table is being modified.


Classes in OraLoader

Classes in OraLoader

Classes in the OraLoader unit.

Classes

Name | Description
TDPColumn | A base class holding a collection of TDPColumn objects.
TOraLoader | TOraLoader allows to load external data into the server database.


TDPColumn Class

TDPColumn Class

A base class holding a collection of TDPColumn objects.

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

Unit

OraLoader

Syntax

TDPColumn = class(TDAColumn);

Remarks

Each TOraLoader uses TDPColumns to maintain a collection of TDPColumn objects. TDPColumn object represents the attributes for column loading. Every TDPColumn object corresponds to one of the table fields with the same name as its Name property.

To create columns at design time use column editor of TOraLoader component.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TDAColumn
TDPColumn

See Also

  • TOraLoader
  • TQueueAgents


TDPColumn Members

TDPColumn Members

TDPColumn class overview.

Properties

Name | Description
DateFormat | Used to specify a conversion mask for a column.
FieldType (inherited from TDAColumn) | Used to specify the types of values that will be loaded.
Name (inherited from TDAColumn) | Used to specify the field name of loading table.
Precision | Used to set the precision of number columns.
Scale | Used to set the precision of number columns.
Size | Used to set the maximum size in bytes of data for a column.


TDPColumn Properties

TDPColumn Properties

Properties of the TDPColumn class.

For a complete list of the TDPColumn class members, see the TDPColumn Members topic.

Published

Name | Description
DateFormat | Used to specify a conversion mask for a column.
FieldType (inherited from TDAColumn) | Used to specify the types of values that will be loaded.
Name (inherited from TDAColumn) | Used to specify the field name of loading table.
Precision | Used to set the precision of number columns.
Scale | Used to set the precision of number columns.
Size | Used to set the maximum size in bytes of data for a column.

See Also

  • TDPColumn Class
  • TDPColumn Class Members


TDPColumn.DateFormat Property

TDPColumn.DateFormat Property

Used to specify a conversion mask for a column.

Class

TDPColumn

Syntax

property DateFormat: string;

Remarks

Set DateFormat to specify a conversion mask for a column. TOraLoader uses DateFormat to convert string representation of date to its internal representation. If not set, the date format defaults to the date conversion mask set in the direct path context.

See Also

  • TDAColumn.Name


TDPColumn.Precision Property

TDPColumn.Precision Property

Used to set the precision of number columns.

Class

TDPColumn

Syntax

property Precision: integer default 0;

Remarks

Use Precision property to set the precision of number columns.

See Also

  • TDAColumn.FieldType


TDPColumn.Scale Property

TDPColumn.Scale Property

Used to set the precision of number columns.

Class

TDPColumn

Syntax

property Scale: integer default 0;

Remarks

Use Scale property to set the scale of number columns.

See Also

  • TDAColumn.FieldType


TDPColumn.Size Property

TDPColumn.Size Property

Used to set the maximum size in bytes of data for a column.

Class

TDPColumn

Syntax

property Size: integer default 0;

Remarks

Use Size property to set the maximum size in bytes of data for a column. Size is used only for string columns.

See Also

  • TDAColumn.FieldType


TOraLoader Class

TOraLoader Class

TOraLoader allows to load external data into the server database.

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

Unit

OraLoader

Syntax

TOraLoader = class(TDALoader);

Remarks

TOraLoader serves for fast loading of data to the server. It uses direct path load interface to speed up loading. To specify the name of the loading table set TDALoader.TableName property. Use TDALoader.Columns property to access individual columns. Write TDALoader.OnGetColumnData or TDALoader.OnPutData event handlers to read external data and pass it to the database. Call TDALoader.Load method to start loading data.

Limitations and Restrictions

TOraLoader has the following limitations similar to those of SQL*Loader:

  • triggers are not supported
  • check constraints are not supported
  • referential integrity constraints are not supported
  • clustered tables are not supported
  • loading of remote objects is not supported
  • user-defined types are not supported
  • LOBs must be specified after all scalar columns
  • LONGs must be specified last
  • You cannot use TOraLoader in a threaded OCI environment in direct mode with Oracle client 8.17 or lower.
  • ODAC sets OraCall := False when you use OraLoader unit in your application. You can set it to True for Oracle client 9.2 or higher.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDALoader
TOraLoader

See Also

  • Working with TOraLoader Component
  • TDALoader
  • TQueueAgents
  • TOraSession


TOraLoader Members

TOraLoader Members

TOraLoader class overview.

Properties

Name | Description
Columns (inherited from TDALoader) | Used to add a TDAColumn object for each field that will be loaded.
Connection (inherited from TDALoader) | Used to specify TCustomDAConnection in which TDALoader will be executed.
LoadMode | Used to specify which access mode to use for a TOraLoader object when a database table is being modified.
Session | Used to specify the session in which TOraLoader will be executed.
TableName (inherited from TDALoader) | Used to specify the name of the table to which data will be loaded.

Methods

Name | Description
CreateColumns (inherited from TDALoader) | Creates TDAColumn objects for all fields of the table with the same name as TDALoader.TableName.
Load (inherited from TDALoader) | Starts loading data.
LoadFromDataSet (inherited from TDALoader) | Loads data from the specified dataset.
PutColumnData (inherited from TDALoader) | Overloaded. Puts the value of individual columns.

Events

Name | Description
OnError | Occurs when processing errors that are raised during loading is needed.
OnGetColumnData | Occurs when it is needed to put column values.
OnProgress (inherited from TDALoader) | Occurs if handling data loading progress of the TDALoader.LoadFromDataSet method is needed.
OnPutData | Occurs when putting loading data by rows is needed.


TOraLoader Properties

TOraLoader Properties

Properties of the TOraLoader class.

For a complete list of the TOraLoader class members, see the TOraLoader Members topic.

Public

Name | Description
Columns (inherited from TDALoader) | Used to add a TDAColumn object for each field that will be loaded.
Connection (inherited from TDALoader) | Used to specify TCustomDAConnection in which TDALoader will be executed.
CreateColumns (inherited from TDALoader) | Creates TDAColumn objects for all fields of the table with the same name as TDALoader.TableName.
Load (inherited from TDALoader) | Starts loading data.
LoadFromDataSet (inherited from TDALoader) | Loads data from the specified dataset.
OnGetColumnData (inherited from TDALoader) | Occurs when it is needed to put column values.
OnProgress (inherited from TDALoader) | Occurs if handling data loading progress of the TDALoader.LoadFromDataSet method is needed.
OnPutData (inherited from TDALoader) | Occurs when putting loading data by rows is needed.
PutColumnData (inherited from TDALoader) | Overloaded. Puts the value of individual columns.
TableName (inherited from TDALoader) | Used to specify the name of the table to which data will be loaded.

Published

Name | Description
LoadMode | Used to specify which access mode to use for a TOraLoader object when a database table is being modified.
Session | Used to specify the session in which TOraLoader will be executed.

See Also

  • TOraLoader Class
  • TOraLoader Class Members


TOraLoader.LoadMode Property

TOraLoader.LoadMode Property

Used to specify which access mode to use for a TOraLoader object when a database table is being modified.

Class

TOraLoader

Syntax

property LoadMode: TLoadMode default lmDirect;

Remarks

Use the LoadMode property to specify which access mode to use for a TOraLoader object when a database table is being modified.

Set this property to lmDirect to make all modifications pass through internal data buffers or set it to lmDML to construct relevant DML statement which applies updates to the database table.

See Also

  • Working with TOraLoader Component


TOraLoader.Session Property

TOraLoader.Session Property

Used to specify the session in which TOraLoader will be executed.

Class

TOraLoader

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session in which TOraLoader will be executed. If Session is not connected, Load method calls Session.Connect.

See Also

  • TOraSession


TOraLoader Events

TOraLoader Events

Events of the TOraLoader class.

For a complete list of the TOraLoader class members, see the TOraLoader Members topic.

Public

Name | Description
Columns (inherited from TDALoader) | Used to add a TDAColumn object for each field that will be loaded.
Connection (inherited from TDALoader) | Used to specify TCustomDAConnection in which TDALoader will be executed.
CreateColumns (inherited from TDALoader) | Creates TDAColumn objects for all fields of the table with the same name as TDALoader.TableName.
Load (inherited from TDALoader) | Starts loading data.
LoadFromDataSet (inherited from TDALoader) | Loads data from the specified dataset.
OnProgress (inherited from TDALoader) | Occurs if handling data loading progress of the TDALoader.LoadFromDataSet method is needed.
PutColumnData (inherited from TDALoader) | Overloaded. Puts the value of individual columns.
TableName (inherited from TDALoader) | Used to specify the name of the table to which data will be loaded.

Published

Name | Description
OnError | Occurs when processing errors that are raised during loading is needed.
OnGetColumnData | Occurs when it is needed to put column values.
OnPutData | Occurs when putting loading data by rows is needed.

See Also

  • TOraLoader Class
  • TOraLoader Class Members


TOraLoader.OnError Event

TOraLoader.OnError Event

Occurs when processing errors that are raised during loading is needed.

Class

TOraLoader

Syntax

property OnError: TDPErrorEvent;

Remarks

Write the OnError event handler to process errors that occur during loading. Handler is used only if LoadMode = lmDirect, i.e. when using Oracle Direct Path interface. E parameter is an exception that was raised. Col and Row parameters are appropriate column and row values for data that loader failed to write to a table.

See Also

  • LoadMode


TOraLoader.OnGetColumnData Event

TOraLoader.OnGetColumnData Event

Occurs when it is needed to put column values.

Class

TOraLoader

Syntax

property OnGetColumnData: TDPGetColumnDataEvent;

Remarks

Write OnGetColumnData event handler to put column values. TOraLoader calls OnGetColumnData event handler for each column in the loop. Column points to TDAColumn object that corresponds to the current loading column. Use its Name or Index property to identify what column is loading. The Row parameter indicates the current loading record. TDALoader increments Row parameter when all the columns of the current record are loaded. The first row is 1. Set EOF to True to stop data loading. Fill Value parameter by column values. To start loading call the TDALoader.Load method.

Another way to load data is using OnPutData event.

See Also

  • TDALoader.OnPutData
  • TDALoader.Load
  • OnPutData


TOraLoader.OnPutData Event

TOraLoader.OnPutData Event

Occurs when putting loading data by rows is needed.

Class

TOraLoader

Syntax

property OnPutData: TDPPutDataEvent;

Remarks

Note that rows should be loaded from the first in ascending order. To start loading, call TDALoader.Load method.

To start loading, call the TDALoader.Load method.

See Also

  • TDALoader.PutColumnData
  • TDALoader.Load
  • TDALoader.OnGetColumnData
  • OnGetColumnData


Types in OraLoader

Types in OraLoader

Types in the OraLoader unit.

Types

Name | Description
TDPErrorEvent | This type is used for the TOraLoader.OnError event.
TDPGetColumnDataEvent | This type is used for the TOraLoader.OnGetColumnData event.
TDPPutDataEvent | This type is used for the TOraLoader.OnPutData event.


TDPErrorEvent Procedure Reference

TDPErrorEvent Procedure Reference

This type is used for the TOraLoader.OnError event.

Unit

OraLoader

Syntax

TDPErrorEvent = procedure (Sender: TOraLoader; E: Exception; Col: integer; Row: integer; var Action: TDPErrorAction) of object;

Parameters
Sender
An object that raised the event.
E
The exception that was raised.
Col
The column value for data that loader failed to write to a table.
Row
The row value for data that loader failed to write to a table.
Action
The action to take when an exception is raised.


TDPGetColumnDataEvent Procedure Reference

TDPGetColumnDataEvent Procedure Reference

This type is used for the TOraLoader.OnGetColumnData event.

Unit

OraLoader

Syntax

TDPGetColumnDataEvent = procedure (Sender: TObject; Column: TDPColumn; Row: integer; var Value: variant; var IsEOF: boolean) of object;

Parameters
Sender
An object that raised the event.
Column
Points to TDAColumn object that corresponds to the current loading column.
Row
Indicates the current loading record.
Value
The column values.
IsEOF
True, if data loading needs to be stopped.


TDPPutDataEvent Procedure Reference

TDPPutDataEvent Procedure Reference

This type is used for the TOraLoader.OnPutData event.

Unit

OraLoader

Syntax

TDPPutDataEvent = procedure (Sender: TOraLoader) of object;

Parameters
Sender
An object that raised the event.


Enumerations in OraLoader

Enumerations in OraLoader

Enumerations in the OraLoader unit.

Enumerations

Name | Description
TDPErrorAction | Specifies the action for TOraLoader to take to process errors that occur during loading.
TLoadMode | Specifies the access mode to use for a TOraLoader object when a database table is being modified.


TDPErrorAction Enumeration

TDPErrorAction Enumeration

Specifies the action for TOraLoader to take to process errors that occur during loading.

Unit

OraLoader

Syntax

TDPErrorAction = (dpAbort, dpFail, dpIgnore);

Values

Value | Meaning
dpAbort | TOraLoader silently interrupts the current operation.
dpFail | TOraLoader reraises the exception passed as E parameter.
dpIgnore | TOraLoader skips the current row and continues execution.


TLoadMode Enumeration

TLoadMode Enumeration

Specifies the access mode to use for a TOraLoader object when a database table is being modified.

Unit

OraLoader

Syntax

TLoadMode = (lmDirect, lmDML);

Values

Value | Meaning
lmDirect | All modifications are passed through internal data buffers.
lmDML | Constructs relevant DML statement which applies updates to the database table.

Remarks

Use the LoadMode property to specify which access mode to use for a TOraLoader object when a database table is being modified.

Set this property to lmDirect to make all modifications pass through internal data buffers or set it to lmDML to construct relevant DML statement which applies updates to the database table.


OraObjects Unit Members

OraObjects Unit Members

This unit contains classes for Oracle OBJECT, ARRAY, TABLE and XMLTYPE data types.

Classes

Name | Description
TOraArray | A class representing the value of the Oracle array data type.
TOraNestTable | A class representing a value of the Oracle nested table data type.
TOraObject | A class representing the Oracle object data type value.
TOraRef | A class representing the Oracle reference data type value.
TOraType | A class holding information about Oracle type required for TOraObject objects.
TOraXML | A class representing a value of the Oracle SYS.XMLTYPE type.


Classes in OraObjects

Classes in OraObjects

Classes in the OraObjects unit.

Classes

Name | Description
TOraArray | A class representing the value of the Oracle array data type.
TOraNestTable | A class representing a value of the Oracle nested table data type.
TOraObject | A class representing the Oracle object data type value.
TOraRef | A class representing the Oracle reference data type value.
TOraType | A class holding information about Oracle type required for TOraObject objects.
TOraXML | A class representing a value of the Oracle SYS.XMLTYPE type.


TOraArray Class

TOraArray Class

A class representing the value of the Oracle array data type.

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

Unit

OraObjects

Syntax

TOraArray = class(TOraObject);

Remarks

TOraArray represents the value of the Oracle array data type. TOraArray is inherited from TOraObject. You can get a TOraArray object by the TOraDataSet.GetArray method after fetching rows containing array field.

Inheritance Hierarchy

TObject
TSharedObject
TDBObject
TOraObject
TOraArray

See Also

  • TOraObject
  • TOraDataSet.GetArray
  • TOraParam.AsArray


TOraArray Members

TOraArray Members

TOraArray class overview.

Properties

Name | Description
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
ItemAsDateTime | Used to read the value of the array's data into a TDateTime object or variable, or to assign a TDateTime value to the contents of the array's value.
ItemAsFloat | Used to read the value of the array's data into a Double, or to assign a Double value to the contents of the array's item.
ItemAsInteger | Used to read the value of the Item's data into an integer, or to assign an integer value to the contents of the item.
ItemAsObject | Used to read the value of the Item's data into a TOraObject, or to assign a TOraObject value to the contents of the item.
ItemAsOCIString | Used to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI string value to the content of the item.
ItemAsString | Used to read the value of the Item's data into a string, or to assign a string value to the content of the item.
ItemExists | Indicates whether the item with Index exists.
ItemIsNull | Indicates whether the item contains a value.
ItemType | Indicates the type of an array element.
MaxSize | Defines the maximum number of elements that an array object may hold.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size | Holds the size of an array.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
AppendItem | Appends an item to the end of an array.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
Clear | Removes all items from an array.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
InsertItem | Inserts an item to the Index position.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
Pin (inherited from TOraObject) | Marks an object as being in use.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.


TOraArray Properties

TOraArray Properties

Properties of the TOraArray class.

For a complete list of the TOraArray class members, see the TOraArray Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
ItemAsDateTime | Used to read the value of the array's data into a TDateTime object or variable, or to assign a TDateTime value to the contents of the array's value.
ItemAsFloat | Used to read the value of the array's data into a Double, or to assign a Double value to the contents of the array's item.
ItemAsInteger | Used to read the value of the Item's data into an integer, or to assign an integer value to the contents of the item.
ItemAsObject | Used to read the value of the Item's data into a TOraObject, or to assign a TOraObject value to the contents of the item.
ItemAsOCIString | Used to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI string value to the content of the item.
ItemAsString | Used to read the value of the Item's data into a string, or to assign a string value to the content of the item.
ItemExists | Indicates whether the item with Index exists.
ItemIsNull | Indicates whether the item contains a value.
ItemType | Indicates the type of an array element.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
MaxSize | Defines the maximum number of elements that an array object may hold.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin (inherited from TOraObject) | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Size | Holds the size of an array.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.

See Also

  • TOraArray Class
  • TOraArray Class Members


TOraArray.ItemAsDateTime Property(Indexer)

TOraArray.ItemAsDateTime Property(Indexer)

Used to read the value of the array's data into a TDateTime object or variable, or to assign a TDateTime value to the contents of the array's value.

Class

TOraArray

Syntax

property ItemAsDateTime[Index: integer]: TDateTime;

Parameters
Index
Holds the index. ???

Remarks

Use the ItemAsDateTime property to read the value of the array's data into an object or variable of type TDateTime, or to assign a TDateTime value to the contents of the array's value.


TOraArray.ItemAsFloat Property(Indexer)

TOraArray.ItemAsFloat Property(Indexer)

Used to read the value of the array's data into a Double, or to assign a Double value to the contents of the array's item.

Class

TOraArray

Syntax

property ItemAsFloat[Index: integer]: double;

Parameters
Index
Holds the index of the array item.

Remarks

Use the ItemAsFloat property to read the value of the array's data into a Double, or to assign a Double value to the contents of the array's item.


TOraArray.ItemAsInteger Property(Indexer)

TOraArray.ItemAsInteger Property(Indexer)

Used to read the value of the Item's data into an integer, or to assign an integer value to the contents of the item.

Class

TOraArray

Syntax

property ItemAsInteger[Index: integer]: integer;

Parameters
Index
Holds the index of the item.

Remarks

Use the ItemAsInteger property to read the value of the Item's data into an integer, or to assign an integer value to the contents of the item.


TOraArray.ItemAsObject Property(Indexer)

TOraArray.ItemAsObject Property(Indexer)

Used to read the value of the Item's data into a TOraObject, or to assign a TOraObject value to the contents of the item.

Class

TOraArray

Syntax

property ItemAsObject[Index: integer]: TOraObject;

Parameters
Index
Holds the index of the item.

Remarks

Use the ItemAsObject property to read the value of the Item's data into an TOraObject, or to assign an TOraObject value to the contents of the item.

See Also

  • TOraObject


TOraArray.ItemAsOCIString Property(Indexer)

TOraArray.ItemAsOCIString Property(Indexer)

Used to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI string value to the content of the item.

Class

TOraArray

Syntax

property ItemAsOCIString[Index: integer]: pOCIString;

Parameters
Index
Holds the index of the item.

Remarks

Use the ItemAsOCIString property to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI string value to the content of the item.


TOraArray.ItemAsString Property(Indexer)

TOraArray.ItemAsString Property(Indexer)

Used to read the value of the Item's data into a string, or to assign a string value to the content of the item.

Class

TOraArray

Syntax

property ItemAsString[Index: integer]: string;

Parameters
Index
Holds the index of the item.

Remarks

Use ItemAsString property to read the value of the Item's data into a string, or to assign a string value to the content of the item.


TOraArray.ItemExists Property(Indexer)

TOraArray.ItemExists Property(Indexer)

Indicates whether the item with Index exists.

Class

TOraArray

Syntax

property ItemExists[Index: integer]: boolean;

Parameters
Index
Holds the index of the item.

Remarks

Check ItemExists property to learn whether the item with Index exists.

See Also

  • Size


TOraArray.ItemIsNull Property(Indexer)

TOraArray.ItemIsNull Property(Indexer)

Indicates whether the item contains a value.

Class

TOraArray

Syntax

property ItemIsNull[Index: integer]: boolean;

Parameters
Index
Holds the index of the item.

Remarks

Use IsNull to determine if the Item contains a value. If IsNull is True, the Item is blank. If IsNull is False, the Item has a value.


TOraArray.ItemType Property

TOraArray.ItemType Property

Indicates the type of an array element.

Class

TOraArray

Syntax

property ItemType: word;

Remarks

Read the ItemType property to return the type of an array element.


TOraArray.MaxSize Property

TOraArray.MaxSize Property

Defines the maximum number of elements that an array object may hold.

Class

TOraArray

Syntax

property MaxSize: integer;

Remarks

Use the MaxSize property to get the maximum number of elements that an array object may hold.

See Also

  • Size


TOraArray.Size Property

TOraArray.Size Property

Holds the size of an array.

Class

TOraArray

Syntax

property Size: integer;

Remarks

Use the Size property to learn the length of an array.

See Also

  • ItemExists


TOraArray Methods

TOraArray Methods

Methods of the TOraArray class.

For a complete list of the TOraArray class members, see the TOraArray Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
AppendItem | Appends an item to the end of an array.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Clear | Removes all items from an array.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
InsertItem | Inserts an item to the Index position.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin (inherited from TOraObject) | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.

See Also

  • TOraArray Class
  • TOraArray Class Members


TOraArray.AppendItem Method

TOraArray.AppendItem Method

Appends an item to the end of an array.

Class

TOraArray

Syntax

function AppendItem: integer;

Return Value
the index of an appended item.

Remarks

Call the AppendItem function to append an item to the end of an array. Returns the index of an appended item.

See Also

  • InsertItem


TOraArray.Clear Method

TOraArray.Clear Method

Removes all items from an array.

Class

TOraArray

Syntax

procedure Clear;

Remarks

Call this method to remove all items from an array.


TOraArray.InsertItem Method

TOraArray.InsertItem Method

Inserts an item to the Index position.

Class

TOraArray

Syntax

procedure InsertItem(Index: integer);

Parameters
Index
Holds the index position.

Remarks

Call the InsertItem procedure to insert an item to the Index position.

See Also

  • AppendItem


TOraNestTable Class

TOraNestTable Class

A class representing a value of the Oracle nested table data type.

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

Unit

OraObjects

Syntax

TOraNestTable = class(TOraArray);

Remarks

TOraNestTable represents a value of the Oracle nested table data type. TOraNestTable is inherited from TOraArray. You can get a TOraNestTable object using the TOraDataSet.GetTable method after fetching rows containing array field. Also you can get it using the TOraParam.AsTable method.

Inheritance Hierarchy

TObject
TSharedObject
TDBObject
TOraObject
TOraArray
TOraNestTable

See Also

  • TOraArray
  • TOraNestedTable
  • TOraDataSet.GetTable
  • TOraParam.AsTable


TOraNestTable Members

TOraNestTable Members

TOraNestTable class overview.

Properties

Name | Description
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
ItemAsDateTime (inherited from TOraArray) | Used to read the value of the array's data into a TDateTime object or variable, or to assign a TDateTime value to the contents of the array's value.
ItemAsFloat (inherited from TOraArray) | Used to read the value of the array's data into a Double, or to assign a Double value to the contents of the array's item.
ItemAsInteger (inherited from TOraArray) | Used to read the value of the Item's data into an integer, or to assign an integer value to the contents of the item.
ItemAsObject (inherited from TOraArray) | Used to read the value of the Item's data into a TOraObject, or to assign a TOraObject value to the contents of the item.
ItemAsOCIString (inherited from TOraArray) | Used to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI string value to the content of the item.
ItemAsString (inherited from TOraArray) | Used to read the value of the Item's data into a string, or to assign a string value to the content of the item.
ItemExists (inherited from TOraArray) | Indicates whether the item with Index exists.
ItemIsNull (inherited from TOraArray) | Indicates whether the item contains a value.
ItemType (inherited from TOraArray) | Indicates the type of an array element.
MaxSize (inherited from TOraArray) | Defines the maximum number of elements that an array object may hold.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size (inherited from TOraArray) | Holds the size of an array.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
AppendItem (inherited from TOraArray) | Appends an item to the end of an array.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
Clear (inherited from TOraArray) | Removes all items from an array.
CreateObject (inherited from TOraObject) | Creates an object.
DeleteItem | Deletes an item pointed by its index.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
InsertItem (inherited from TOraArray) | Inserts an item to the Index position.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
Pin (inherited from TOraObject) | Marks an object as being in use.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.


TOraNestTable Methods

TOraNestTable Methods

Methods of the TOraNestTable class.

For a complete list of the TOraNestTable class members, see the TOraNestTable Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
AppendItem (inherited from TOraArray) | Appends an item to the end of an array.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Clear (inherited from TOraArray) | Removes all items from an array.
CreateObject (inherited from TOraObject) | Creates an object.
DeleteItem | Deletes an item pointed by its index.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
InsertItem (inherited from TOraArray) | Inserts an item to the Index position.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
ItemAsDateTime (inherited from TOraArray) | Used to read the value of the array's data into a TDateTime object or variable, or to assign a TDateTime value to the contents of the array's value.
ItemAsFloat (inherited from TOraArray) | Used to read the value of the array's data into a Double, or to assign a Double value to the contents of the array's item.
ItemAsInteger (inherited from TOraArray) | Used to read the value of the Item's data into an integer, or to assign an integer value to the contents of the item.
ItemAsObject (inherited from TOraArray) | Used to read the value of the Item's data into a TOraObject, or to assign a TOraObject value to the contents of the item.
ItemAsOCIString (inherited from TOraArray) | Used to get the value of the Item's data as a generic OCI string pointer, or to assign the OCI string value to the content of the item.
ItemAsString (inherited from TOraArray) | Used to read the value of the Item's data into a string, or to assign a string value to the content of the item.
ItemExists (inherited from TOraArray) | Indicates whether the item with Index exists.
ItemIsNull (inherited from TOraArray) | Indicates whether the item contains a value.
ItemType (inherited from TOraArray) | Indicates the type of an array element.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
MaxSize (inherited from TOraArray) | Defines the maximum number of elements that an array object may hold.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin (inherited from TOraObject) | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Size (inherited from TOraArray) | Holds the size of an array.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.

See Also

  • TOraNestTable Class
  • TOraNestTable Class Members


TOraNestTable.DeleteItem Method

TOraNestTable.DeleteItem Method

Deletes an item pointed by its index.

Class

TOraNestTable

Syntax

procedure DeleteItem(Index: integer);

Parameters
Index
Holds the index of the item to delete.

Remarks

Call the DeleteItem method to delete an item pointed by Index.


TOraObject Class

TOraObject Class

A class representing the Oracle object data type value.

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

Unit

OraObjects

Syntax

TOraObject = class(TDBObject);

Remarks

TOraObject represents a value of the Oracle object data type. You can get the description of the object type using the ObjectType method. Use the AllocObject method to create an object of a certain type. To access the attribute value use AttrAsInteger, AttrAsString, etc. You can get a TOraObject object using TOraDataSet.GetObject method after fetching rows containing an array field. Also you can get it using the TOraParam.AsObject method.

Example

var
MyType : TOraType;
MyObject : TOraObject;
. . .
MyType := TOraType.Create;
MyType.Describe('SCOTT.PERSON');
MyObject := TOraObject.Create(Obj.ObjectType);
MyObject.AttrAsString('Name') := 'Ja';
. . .

Inheritance Hierarchy

TObject
TSharedObject
TDBObject
TOraObject

See Also

  • TOraType
  • TOraDataSet.GetObject
  • TOraParam.AsObject
  • TOraRef
  • TOraArray
  • TOraNestTable


TOraObject Members

TOraObject Members

TOraObject class overview.

Properties

Name | Description
AttrAsArray | Used to get the TOraArray type attribute value.
AttrAsDateTime | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull | Used to indicate if the attribute value is NULL.
Indicator | Used to get a pointer to the indicator structure of an object.
Instance | Used to get a pointer to the internal representation of an object.
IsNull | Used to verify if an object is empty.
ObjectType | Used to indicate the object type.
OCISvcCtx | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject | Overloaded. Allocates an object instance.
Assign | Copies properties or other attributes from another object.
CreateObject | Creates an object.
Exists | Verifies if an object instance exists in a database.
Flush | Places modifications made to the object to the database.
FreeObject | Deallocates and frees an object instance.
IsDirty | Verifies if an object instance is marked as dirty.
IsLocked | Verifies if an object instance is marked as locked.
Lock | Marks an object as locked for update.
MarkDelete | Marks an object as being deleted.
MarkUpdate | Marks an object as being updated.
Pin | Marks an object as being in use.
Refresh | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark | Marks an object as not being dirty.
Unpin | Decrements the pin count value for an object.


TOraObject Properties

TOraObject Properties

Properties of the TOraObject class.

For a complete list of the TOraObject class members, see the TOraObject Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttrAsArray | Used to get the TOraArray type attribute value.
AttrAsDateTime | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull | Used to indicate if the attribute value is NULL.
Indicator | Used to get a pointer to the indicator structure of an object.
Instance | Used to get a pointer to the internal representation of an object.
IsNull | Used to verify if an object is empty.
ObjectType | Used to indicate the object type.
OCISvcCtx | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.

See Also

  • TOraObject Class
  • TOraObject Class Members


TOraObject.AttrAsArray Property(Indexer)

TOraObject.AttrAsArray Property(Indexer)

Used to get the TOraArray type attribute value.

Class

TOraObject

Syntax

property AttrAsArray[Name: string]: TOraArray;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsArray property to get the value of an attribute of the TOraArray type.

Provide an attribute name in the Name index parameter.


TOraObject.AttrAsDateTime Property(Indexer)

TOraObject.AttrAsDateTime Property(Indexer)

Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsDateTime[Name: string]: TDateTime;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsDateTime property to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.


TOraObject.AttrAsFloat Property(Indexer)

TOraObject.AttrAsFloat Property(Indexer)

Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsFloat[Name: string]: double;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsFloat property to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.


TOraObject.AttrAsInteger Property(Indexer)

TOraObject.AttrAsInteger Property(Indexer)

Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsInteger[Name: string]: integer;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsInteger property to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.


TOraObject.AttrAsLob Property(Indexer)

TOraObject.AttrAsLob Property(Indexer)

Used to get reference to the TOraLob object that represents the LOBAttribute value.

Class

TOraObject

Syntax

property AttrAsLob[Name: string]: TOraLob;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsLob property to get reference to the TOraLob object that represents the LOBAttribute value.

See Also

  • TOraLob


TOraObject.AttrAsObject Property(Indexer)

TOraObject.AttrAsObject Property(Indexer)

Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsObject[Name: string]: TOraObject;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsObject property to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute. Type of an attribute specified by the Name parameter must be Object. You can use AttrAs... properties to access its attributes after.

Another way to get an attribute value of a nested object is using of the name path.

Example

Example 1.
Street1 := MyObject.AttrAsObject('Address').AsString('Street');

Example 1.
Street2 := MyObject.AttrAsString('Address.Street');

See Also

  • TOraObject


TOraObject.AttrAsOCIDate Property(Indexer)

TOraObject.AttrAsOCIDate Property(Indexer)

Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsOCIDate[Name: string]: OCIDate;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsOCIDate property to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.


TOraObject.AttrAsOCINumber Property(Indexer)

TOraObject.AttrAsOCINumber Property(Indexer)

Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsOCINumber[Name: string]: OCINumber;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsOCINumber property to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.


TOraObject.AttrAsOCIString Property(Indexer)

TOraObject.AttrAsOCIString Property(Indexer)

Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsOCIString[Name: string]: pOCIString;

Parameters
Name
Holds an attribute name.

Remarks

Use AttrAsOCIString property to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.


TOraObject.AttrAsString Property(Indexer)

TOraObject.AttrAsString Property(Indexer)

Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.

Class

TOraObject

Syntax

property AttrAsString[Name: string]: string;

Parameters
Name
Holds an attribute name.

Remarks

Use the AttrAsString property to read the attribute's data value as string, or to assign a string value to the contents of an attribute.


TOraObject.AttrIsNull Property(Indexer)

TOraObject.AttrIsNull Property(Indexer)

Used to indicate if the attribute value is NULL.

Class

TOraObject

Syntax

property AttrIsNull[const Name: string]: boolean;

Parameters
Name
Holds an attribute name.

Remarks

Check the AttrIsNull property to learn whether the attribute value is NULL.


TOraObject.Indicator Property

TOraObject.Indicator Property

Used to get a pointer to the indicator structure of an object.

Class

TOraObject

Syntax

property Indicator: IntPtr;

Remarks

Use the Indicator property to get a pointer to the indicator structure of an object.


TOraObject.Instance Property

TOraObject.Instance Property

Used to get a pointer to the internal representation of an object.

Class

TOraObject

Syntax

property Instance: IntPtr;

Remarks

Use the Instance property to get a pointer to the internal representation of an object.


TOraObject.IsNull Property

TOraObject.IsNull Property

Used to verify if an object is empty.

Class

TOraObject

Syntax

property IsNull: boolean;

Remarks

Use the IsNull property to verify whether this object is empty. Assign a value to this property to set the object to Null or not Null.


TOraObject.ObjectType Property

TOraObject.ObjectType Property

Used to indicate the object type.

Class

TOraObject

Syntax

property ObjectType: TOraType;

Remarks

Read the ObjectType property to learn the type of an object.

See Also

  • TOraType


TOraObject.OCISvcCtx Property

TOraObject.OCISvcCtx Property

Used to assign a service context handle.

Class

TOraObject

Syntax

property OCISvcCtx: pOCISvcCtx;

Remarks

Use the OCISvcCtx property to assign a service context handle. Some operations with objects require a service context handle. To get a service context handle use TOraSession.OCISvcCtx.

See Also

  • TOraSession.OCISvcCtx


TOraObject Methods

TOraObject Methods

Methods of the TOraObject class.

For a complete list of the TOraObject class members, see the TOraObject Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject | Overloaded. Allocates an object instance.
Assign | Copies properties or other attributes from another object.
CreateObject | Creates an object.
Exists | Verifies if an object instance exists in a database.
Flush | Places modifications made to the object to the database.
FreeObject | Deallocates and frees an object instance.
IsDirty | Verifies if an object instance is marked as dirty.
IsLocked | Verifies if an object instance is marked as locked.
Lock | Marks an object as locked for update.
MarkDelete | Marks an object as being deleted.
MarkUpdate | Marks an object as being updated.
Pin | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark | Marks an object as not being dirty.
Unpin | Decrements the pin count value for an object.

See Also

  • TOraObject Class
  • TOraObject Class Members


TOraObject.AllocObject Overload

TOraObject.AllocObject Overload

Allocates an object instance.

Class

TOraObject

Overload List

Name | Description
AllocObject | Allocates an object instance.
AllocObject(SvcCtx: pOCISvcCtx) | Allocates an object instance.
AllocObject(SvcCtx: pOCISvcCtx; TypeName: string) | Allocates an object instance.
AllocObject(TypeName: string) | Allocates an object instance.


TOraObject.AllocObject Method

TOraObject.AllocObject Method

Allocates an object instance.

Class

TOraObject

Syntax

procedure AllocObject; overload; virtual

Remarks

Call the AllocObject method to allocate an object instance. Overloaded procedures with parameters modify either service context handle or object type properties before allocating the object.


TOraObject.AllocObject Method

TOraObject.AllocObject Method

Allocates an object instance.

Class

TOraObject

Syntax

procedure AllocObject(SvcCtx: pOCISvcCtx); overload

Parameters
SvcCtx
Holds service context.


TOraObject.AllocObject Method

TOraObject.AllocObject Method

Allocates an object instance.

Class

TOraObject

Syntax

procedure AllocObject(SvcCtx: pOCISvcCtx; TypeName: string); overload; virtual

Parameters
SvcCtx
Holds service context.
TypeName
Holds the type of a TOraObject.


TOraObject.AllocObject Method

TOraObject.AllocObject Method

Allocates an object instance.

Class

TOraObject

Syntax

procedure AllocObject(TypeName: string); overload; virtual

Parameters
TypeName
Holds the type of a TOraObject.


TOraObject.Assign Method

TOraObject.Assign Method

Copies properties or other attributes from another object.

Class

TOraObject

Syntax

procedure Assign(Source: TOraObject); virtual;

Parameters
Source
Holds the source object to copy properties or other attributes from.

Remarks

Call the Assign method to copy the properties or other attributes from another object.


TOraObject.CreateObject Method

TOraObject.CreateObject Method

Creates an object.

Class

TOraObject

Syntax

procedure CreateObject(SvcCtx: pOCISvcCtx; TypeName: string);

Parameters
SvcCtx
Holds an OCI service context handle.
TypeName
Holds the type of the object to create.

Remarks

Call the CreateObject method to create an object.

Note: This method is obsolete, so it's better to use the AllocObject method instead.


TOraObject.Exists Method

TOraObject.Exists Method

Verifies if an object instance exists in a database.

Class

TOraObject

Syntax

function Exists: boolean;

Remarks

Call the Exists method to verify whether an instance of an object exists in the database.


TOraObject.Flush Method

TOraObject.Flush Method

Places modifications made to the object to the database.

Class

TOraObject

Syntax

procedure Flush;

Remarks

Call the Flush method to place modifications made to the object into the database.

See the OCIObjectFlush function description in Oracle references for more detailed description of this method.


TOraObject.FreeObject Method

TOraObject.FreeObject Method

Deallocates and frees an object instance.

Class

TOraObject

Syntax

procedure FreeObject(FreeChild: boolean = True); virtual;

Parameters
FreeChild
Holds True, if there is an object to be deallocated and freed.

Remarks

Call the FreeObject method to deallocate and free an object instance.


TOraObject.IsDirty Method

TOraObject.IsDirty Method

Verifies if an object instance is marked as dirty.

Class

TOraObject

Syntax

function IsDirty: boolean;

Return Value
True, if the instance is marked as dirty.

Remarks

Call the IsDirty method to verify whether the object instance is marked as dirty.

The return value is True if the instance is dirty.


TOraObject.IsLocked Method

TOraObject.IsLocked Method

Verifies if an object instance is marked as locked.

Class

TOraObject

Syntax

function IsLocked: boolean;

Return Value
True, if the instance is locked.

Remarks

Call the IsLocked method to verify whether the object instance is marked as locked.

The return value is True if the instance is locked.


TOraObject.Lock Method

TOraObject.Lock Method

Marks an object as locked for update.

Class

TOraObject

Syntax

procedure Lock;

Remarks

Call the Lock method to mark an object as locked for update.

See the OCIObjectLock function description in the Oracle references for more detailed description of this method.


TOraObject.MarkDelete Method

TOraObject.MarkDelete Method

Marks an object as being deleted.

Class

TOraObject

Syntax

procedure MarkDelete;

Remarks

Call the MarkDelete method to mark an object as being deleted.

See the OCIObjectMarkDelete function description in the Oracle references for more detailed description of this method.


TOraObject.MarkUpdate Method

TOraObject.MarkUpdate Method

Marks an object as being updated.

Class

TOraObject

Syntax

procedure MarkUpdate;

Remarks

Call MarkUpdate method to mark this object as being updated.

See the OCIObjectMarkUpdate function description in the Oracle references for more detailed description of this method.


TOraObject.Pin Method

TOraObject.Pin Method

Marks an object as being in use.

Class

TOraObject

Syntax

procedure Pin; virtual;

Remarks

Call the Pin method to mark an object as being in use.

See the OCIObjectPin function description in the Oracle references for more detailed description of this method.


TOraObject.Refresh Method

TOraObject.Refresh Method

Retrieves the latest database image for the object.

Class

TOraObject

Syntax

procedure Refresh;

Remarks

Call the Refresh method to retrieve the latest database image for the object.


TOraObject.Unmark Method

TOraObject.Unmark Method

Marks an object as not being dirty.

Class

TOraObject

Syntax

procedure Unmark;

Remarks

Call the Unmark method to mark an object as not being dirty.

See the OCIObjectUnmark function description in the Oracle references for more detailed description of this method.


TOraObject.Unpin Method

TOraObject.Unpin Method

Decrements the pin count value for an object.

Class

TOraObject

Syntax

procedure Unpin; virtual;

Remarks

Call the Unpin method to decrement pin count value for an object. When pin count is zero object is considered completely unpinned.

See the OCIObjectUnpin function description in the Oracle references for more detailed description of this method.


TOraRef Class

TOraRef Class

A class representing the Oracle reference data type value.

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

Unit

OraObjects

Syntax

TOraRef = class(TOraObject);

Remarks

TOraRef represents a value of Oracle reference data type. TOraRef is inherited from TOraObject. You can get TOraRef object by TOraDataSet.GetRef method after fetching rows containing array field. Also you can get it using TOraParam.AsRef method.

Inheritance Hierarchy

TObject
TSharedObject
TDBObject
TOraObject
TOraRef

See Also

  • TOraObject
  • TOraType
  • TOraDataSet.GetRef
  • TOraParam.AsRef


TOraRef Members

TOraRef Members

TOraRef class overview.

Properties

Name | Description
AsHex | Used to convert the REF value converted to the hexadecimal string.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCIRef | Used to get or set the OCIRef handle of reference.
OCIRefPtr | Provides reference to OCIRef handle.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
Clear | Invalidates reference so that it would no longer point to an object.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
Pin | Pins reference.
RefIsNull | Verifies whether reference is associated with an object and the identifier of that object is currently Null.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin | Unpins reference.


TOraRef Properties

TOraRef Properties

Properties of the TOraRef class.

For a complete list of the TOraRef class members, see the TOraRef Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
AsHex | Used to convert the REF value converted to the hexadecimal string.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCIRef | Used to get or set the OCIRef handle of reference.
OCIRefPtr | Provides reference to OCIRef handle.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin (inherited from TOraObject) | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.

See Also

  • TOraRef Class
  • TOraRef Class Members


TOraRef.AsHex Property

TOraRef.AsHex Property

Used to convert the REF value converted to the hexadecimal string.

Class

TOraRef

Syntax

property AsHex: string;

Remarks

Use the AsHex property to get the REF value converted to hexadecimal string.

See Also

  • TOraRef


TOraRef.OCIRef Property

TOraRef.OCIRef Property

Used to get or set the OCIRef handle of reference.

Class

TOraRef

Syntax

property OCIRef: pOCIRef;

Remarks

Use the OCIRef property to get or set the OCIRef handle of reference.

See Also

  • TOraRef


TOraRef.OCIRefPtr Property

TOraRef.OCIRefPtr Property

Provides reference to OCIRef handle.

Class

TOraRef

Syntax

property OCIRefPtr: ppOCIRef;

Remarks

Use the OCIRefPtr property to get reference to OCIRef handle.

See Also

  • TOraRef


TOraRef Methods

TOraRef Methods

Methods of the TOraRef class.

For a complete list of the TOraRef class members, see the TOraRef Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Clear | Invalidates reference so that it would no longer point to an object.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin | Pins reference.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
RefIsNull | Verifies whether reference is associated with an object and the identifier of that object is currently Null.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin | Unpins reference.

See Also

  • TOraRef Class
  • TOraRef Class Members


TOraRef.Clear Method

TOraRef.Clear Method

Invalidates reference so that it would no longer point to an object.

Class

TOraRef

Syntax

procedure Clear;

Remarks

Call the Clear method to invalidate reference so that it would no longer point to an object.

See Also

  • TOraRef


TOraRef.Pin Method

TOraRef.Pin Method

Pins reference.

Class

TOraRef

Syntax

procedure Pin; override;

Remarks

Call the Pin method to pin reference.

See Also

  • TOraRef


TOraRef.RefIsNull Method

TOraRef.RefIsNull Method

Verifies whether reference is associated with an object and the identifier of that object is currently Null.

Class

TOraRef

Syntax

function RefIsNull: boolean;

Return Value
True, if object identifier is Null. False otherwise.

Remarks

Call the RefIsNull method to verify whether reference is associated with an object and the identifier of that object is currently Null.

The return value is True if object's identifier is Null.

See Also

  • TOraRef


TOraRef.Unpin Method

TOraRef.Unpin Method

Unpins reference.

Class

TOraRef

Syntax

procedure Unpin; override;

Remarks

Call the Unpin method to unpin reference.

See Also

  • TOraRef


TOraType Class

TOraType Class

A class holding information about Oracle type required for TOraObject objects.

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

Unit

OraObjects

Syntax

TOraType = class(TObjectType);

Remarks

The TOraType class represents Oracle type and holds information about type required for TOraObject objects.

Inheritance Hierarchy

TObject
TSharedObject
TObjectType
TOraType

See Also

  • TObjectType
  • TOraObject


TOraType Members

TOraType Members

TOraType class overview.

Properties

Name | Description
AttributeCount (inherited from TObjectType) | Used to indicate the number of attributes of type.
Attributes (inherited from TObjectType) | Used to access separate attributes.
DataSize | Used to specify the size for allocating an Oracle object in the memory.
DataType (inherited from TObjectType) | Used to indicate the type of object dtObject, dtArray or dtTable.
IndicatorSize | Contains the size of the indicator structure for Oracle object.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Size (inherited from TObjectType) | Used to learn the size of an object instance.
TDO | Used to retrieve the type descriptor object for type.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttributeByName (inherited from TObjectType) | Retrieves attribute information for an attribute when only the attribute's name is known.
Describe | Overloaded. Retrieves type information from Oracle.
FindAttribute (inherited from TObjectType) | Indicates whether a specified Attribute component is referenced in the TAttributes object.
Release (inherited from TSharedObject) | Decrements the reference count.


TOraType Properties

TOraType Properties

Properties of the TOraType class.

For a complete list of the TOraType class members, see the TOraType Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttributeByName (inherited from TObjectType) | Retrieves attribute information for an attribute when only the attribute's name is known.
AttributeCount (inherited from TObjectType) | Used to indicate the number of attributes of type.
Attributes (inherited from TObjectType) | Used to access separate attributes.
DataSize | Used to specify the size for allocating an Oracle object in the memory.
DataType (inherited from TObjectType) | Used to indicate the type of object dtObject, dtArray or dtTable.
FindAttribute (inherited from TObjectType) | Indicates whether a specified Attribute component is referenced in the TAttributes object.
IndicatorSize | Contains the size of the indicator structure for Oracle object.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
Size (inherited from TObjectType) | Used to learn the size of an object instance.
TDO | Used to retrieve the type descriptor object for type.

See Also

  • TOraType Class
  • TOraType Class Members


TOraType.DataSize Property

TOraType.DataSize Property

Used to specify the size for allocating an Oracle object in the memory.

Class

TOraType

Syntax

property DataSize: word;

Remarks

Use the DataSize property to determine the size for allocating an Oracle object in the memory.

See Also

  • IndicatorSize


TOraType.IndicatorSize Property

TOraType.IndicatorSize Property

Contains the size of the indicator structure for Oracle object.

Class

TOraType

Syntax

property IndicatorSize: word;

Remarks

Use the IndicatorSize property to learn the size of the indicator structure for Oracle object.

See Also

  • DataSize


TOraType.TDO Property

TOraType.TDO Property

Used to retrieve the type descriptor object for type.

Class

TOraType

Syntax

property TDO: pOCIType;

Remarks

Use the TDO property to retrieve the type descriptor object for type.

See Also

  • TOraType.Describe


TOraType Methods

TOraType Methods

Methods of the TOraType class.

For a complete list of the TOraType class members, see the TOraType Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AttributeByName (inherited from TObjectType) | Retrieves attribute information for an attribute when only the attribute's name is known.
AttributeCount (inherited from TObjectType) | Used to indicate the number of attributes of type.
Attributes (inherited from TObjectType) | Used to access separate attributes.
DataType (inherited from TObjectType) | Used to indicate the type of object dtObject, dtArray or dtTable.
Describe | Overloaded. Retrieves type information from Oracle.
FindAttribute (inherited from TObjectType) | Indicates whether a specified Attribute component is referenced in the TAttributes object.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Release (inherited from TSharedObject) | Decrements the reference count.
Size (inherited from TObjectType) | Used to learn the size of an object instance.

See Also

  • TOraType Class
  • TOraType Class Members


TOraType.Describe Overload

TOraType.Describe Overload

Retrieves type information from Oracle.

Class

TOraType

Overload List

Name | Description
Describe(SvcCtx: pOCISvcCtx) | Retrieves type information from Oracle.
Describe(SvcCtx: pOCISvcCtx; Name: string) | Retrieves type information from Oracle.


TOraType.Describe Method

TOraType.Describe Method

Retrieves type information from Oracle.

Class

TOraType

Syntax

procedure Describe(SvcCtx: pOCISvcCtx); overload

Parameters
SvcCtx
Holds service context.

Remarks

Call the Describe method to retrieve type information from Oracle. Pass service context by SvcCtx parameter and name of type by the Name parameter.


TOraType.Describe Method

TOraType.Describe Method

Retrieves type information from Oracle.

Class

TOraType

Syntax

procedure Describe(SvcCtx: pOCISvcCtx; Name: string); overload

Parameters
SvcCtx
Holds service context.
Name
Holds the type name.

Example

var
OraType: TOraType;
. . .
OraType := TOraType.Create();
OraType.Describe(Session.OCISvcCtx, 'Scott.TCustomer');

See Also

  • TOraType.TDO


TOraXML Class

TOraXML Class

A class representing a value of the Oracle SYS.XMLTYPE type.

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

Unit

OraObjects

Syntax

TOraXML = class(TOraObject);

Remarks

TOraXML represents a value of Oracle SYS.XMLTYPE type. Use TOraXML.AllocObject method to create an object. Use TOraXML.AsString and TOraXML.LoadFromStream to initialize XML value. You can get TOraXML object by TOraXMLField.AsXML method after fetching rows contained XMLTYPE field. Also you can get it by TOraParam.AsXML method. To manipulate obtained XML document use TOraXML.Extract, TOraXML.Exists, and TOraXML.Transform functions.

Example

var
   XMLDoc : TOraXML;
begin
   XMLDoc := TOraXML.Create();
   XMLDoc.OCISvcCtx := OraSession1.OCISvcCtx;
   XMLDoc.AsString := '<root><node1>value</node1></root>';
...

Inheritance Hierarchy

TObject
TSharedObject
TDBObject
TOraObject
TOraXML

See Also

  • TOraType
  • TOraXMLField


TOraXML Members

TOraXML Members

TOraXML class overview.

Properties

Name | Description
AsString | Used to get and set the XML document value.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.

Methods

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject | Overloaded. Allocates an object instance from the existing TOraLob object.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
CreateObject (inherited from TOraObject) | Creates an object.
Exists | Checks if the given set of nodes in the TOraXML exists.
Extract | Extracts the given set of nodes from the TOraXML.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
GetSchema | Determines the based schema document, schema URL and root element used for the current XMLType creation.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsSchemaBased | Determines if an XMLType instance is schema-based.
LoadFromStream | Copies the contents of a stream into the TOraXML object.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
Pin (inherited from TOraObject) | Marks an object as being in use.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToStream | Copies the contents of a TOraXML object to a stream.
Transform | Transforms and returns a TOraXML object.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.
Validate | Checks if the input instance conforms to a specified XML schema.


TOraXML Properties

TOraXML Properties

Properties of the TOraXML class.

For a complete list of the TOraXML class members, see the TOraXML Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject (inherited from TOraObject) | Overloaded. Allocates an object instance.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AsString | Used to get and set the XML document value.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
CreateObject (inherited from TOraObject) | Creates an object.
Exists (inherited from TOraObject) | Verifies if an object instance exists in a database.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin (inherited from TOraObject) | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.

See Also

  • TOraXML Class
  • TOraXML Class Members


TOraXML.AsString Property

TOraXML.AsString Property

Used to get and set the XML document value.

Class

TOraXML

Syntax

property AsString: string;

Remarks

Use the AsString property to get and set the XML document value. Reading AsString when TOraObject.IsNull is True returns empty string.

See Also

  • TOraObject.IsNull


TOraXML Methods

TOraXML Methods

Methods of the TOraXML class.

For a complete list of the TOraXML class members, see the TOraXML Members topic.

Public

Name | Description
AddRef (inherited from TSharedObject) | Increments the reference count for the number of references dependent on the TSharedObject object.
AllocObject | Overloaded. Allocates an object instance from the existing TOraLob object.
Assign (inherited from TOraObject) | Copies properties or other attributes from another object.
AttrAsArray (inherited from TOraObject) | Used to get the TOraArray type attribute value.
AttrAsDateTime (inherited from TOraObject) | Used to read the attribute's data value into TDateTime, or to assign a TDateTime value to the contents of an attribute.
AttrAsFloat (inherited from TOraObject) | Used to read the attribute's data value into a double, or to assign a double value to the contents of an attribute.
AttrAsInteger (inherited from TOraObject) | Used to read the attribute's data value as integer, or to assign an integer value to the contents of an attribute.
AttrAsLob (inherited from TOraObject) | Used to get reference to the TOraLob object that represents the LOBAttribute value.
AttrAsObject (inherited from TOraObject) | Used to read the attribute's data value as TOraObject, or to assign a TOraObject value to the contents of an attribute.
AttrAsOCIDate (inherited from TOraObject) | Used to read the attribute's data value as OCIDate, or to assign an OCIDate value to the contents of an attribute.
AttrAsOCINumber (inherited from TOraObject) | Used to read the attribute's data value into OCINumber, or to assign an OCINumber value to the contents of an attribute.
AttrAsOCIString (inherited from TOraObject) | Used to read the attribute's data value as OCIString, or to assign an OCIString value to the contents of an attribute.
AttrAsString (inherited from TOraObject) | Used to read the attribute's data value as string, or to assign a string value to the contents of an attribute.
AttrIsNull (inherited from TOraObject) | Used to indicate if the attribute value is NULL.
CreateObject (inherited from TOraObject) | Creates an object.
Exists | Checks if the given set of nodes in the TOraXML exists.
Extract | Extracts the given set of nodes from the TOraXML.
Flush (inherited from TOraObject) | Places modifications made to the object to the database.
FreeObject (inherited from TOraObject) | Deallocates and frees an object instance.
GetSchema | Determines the based schema document, schema URL and root element used for the current XMLType creation.
Indicator (inherited from TOraObject) | Used to get a pointer to the indicator structure of an object.
Instance (inherited from TOraObject) | Used to get a pointer to the internal representation of an object.
IsDirty (inherited from TOraObject) | Verifies if an object instance is marked as dirty.
IsLocked (inherited from TOraObject) | Verifies if an object instance is marked as locked.
IsNull (inherited from TOraObject) | Used to verify if an object is empty.
IsSchemaBased | Determines if an XMLType instance is schema-based.
LoadFromStream | Copies the contents of a stream into the TOraXML object.
Lock (inherited from TOraObject) | Marks an object as locked for update.
MarkDelete (inherited from TOraObject) | Marks an object as being deleted.
MarkUpdate (inherited from TOraObject) | Marks an object as being updated.
ObjectType (inherited from TOraObject) | Used to indicate the object type.
OCISvcCtx (inherited from TOraObject) | Used to assign a service context handle.
Pin (inherited from TOraObject) | Marks an object as being in use.
RefCount (inherited from TSharedObject) | Used to return the count of reference to a TSharedObject object.
Refresh (inherited from TOraObject) | Retrieves the latest database image for the object.
Release (inherited from TSharedObject) | Decrements the reference count.
SaveToStream | Copies the contents of a TOraXML object to a stream.
Transform | Transforms and returns a TOraXML object.
Unmark (inherited from TOraObject) | Marks an object as not being dirty.
Unpin (inherited from TOraObject) | Decrements the pin count value for an object.
Validate | Checks if the input instance conforms to a specified XML schema.

See Also

  • TOraXML Class
  • TOraXML Class Members


TOraXML.AllocObject Overload

TOraXML.AllocObject Overload

Allocates an object instance from the existing TOraLob object.

Class

TOraXML

Overload List

Name | Description
AllocObject | Allocates an object instance from the existing TOraLob object.
AllocObject(SvcCtx: pOCISvcCtx; OraLob: TOraLob) | Allocates an object instance from the existing TOraLob object.
AllocObject(SvcCtx: pOCISvcCtx; TypeName: string) | Allocates an object instance from the existing TOraLob object.
AllocObject(TypeName: string) | Allocates an object instance from the existing TOraLob object.


TOraXML.AllocObject Method

TOraXML.AllocObject Method

Allocates an object instance from the existing TOraLob object.

Class

TOraXML

Syntax

procedure AllocObject; overload; override

Remarks

Call the AllocObject method to allocate an object instance from the existing TOraLob object. The procedure modifies service context handle before allocating the object.

See Also

  • TOraObject.AllocObject
  • TOraLob


TOraXML.AllocObject Method

TOraXML.AllocObject Method

Allocates an object instance from the existing TOraLob object.

Class

TOraXML

Syntax

procedure AllocObject(SvcCtx: pOCISvcCtx; OraLob: TOraLob); overload

Parameters
SvcCtx
Holds service context.
OraLob
Holds a TOraLob object the data from which is copied to the XML object.


TOraXML.AllocObject Method

TOraXML.AllocObject Method

Allocates an object instance from the existing TOraLob object.

Class

TOraXML

Syntax

procedure AllocObject(SvcCtx: pOCISvcCtx; TypeName: string); overload; override

Parameters
SvcCtx
Holds service context.
TypeName
Holds the type of a TOraObject.


TOraXML.AllocObject Method

TOraXML.AllocObject Method

Allocates an object instance from the existing TOraLob object.

Class

TOraXML

Syntax

procedure AllocObject(TypeName: string); overload; override

Parameters
TypeName
Holds the type of a TOraObject.


TOraXML.Exists Method

TOraXML.Exists Method

Checks if the given set of nodes in the TOraXML exists.

Class

TOraXML

Syntax

function Exists(XPathExpr: string; NSmap: string = ''): boolean;

Parameters
XPathExpr
Holds the set of nodes in the TOraXML.
NSmap
Holds a namespace map of TOraXML.
Return Value
True if specified nodes exist in TOraXML, False otherwise.

Remarks

Call the Exists method to check if the given set of nodes in TOraXML exists. This set of nodes is specified by the XPathExpr parameter.

Returns True if specified nodes exist in the TOraXML, otherwise, returns False.

Example

var
   RetDoc: TOraXML;
   Res: boolean;
begin
...
   Edit;
   TOraXMLField(FieldByName('XMLField')).AsXML.AsString :=
      '<root> '+
      '<x xmlns:edi=''http://ecommerce.org/schema''> '+
      '<b>32.18</b> '+
      '<edi:price units=''Euro''>32.18</edi:price> '+
      '</x> '+
      '</root>';
   Post;
...
   with TOraXMLField(FieldByName('XMLField')).AsXML do begin
      Res := Exists('//edi:price', 'xmlns:edi=http://ecommerce.org/schema'); //Res = True
      Res := Exists('/root/node1'); //Res = False
   end;
end;

See Also

  • Extract
  • GetSchema
  • IsSchemaBased
  • Transform


TOraXML.Extract Method

TOraXML.Extract Method

Extracts the given set of nodes from the TOraXML.

Class

TOraXML

Syntax

procedure Extract(RetDoc: TOraXML; XPathExpr: string; NSmap: string = '');

Parameters
RetDoc
Holds a destination TOraXML object which holds the operation result.
XPathExpr
Holds an expression that specifies the set of nodes to extract.
NSmap
Holds a namespace map of TOraXML.

Remarks

Call the Extract method to extract the given set of nodes from the TOraXML. This set of nodes is specified by the XPathExpr expression. The original document remains unchanged. If no nodes match the specified expression, returns NULL document. RetDoc parameter is a destination TOraXML object which holds the operation result. RetDoc object must be created before passing it as a parameter. Use XPathExpr parameter to specify what nodes to search for. The NSmap parameter is a namespace that can be used to identify the mapping of prefix(es) specified in the XPath_string to the corresponding namespace(s). The format is "xmlns=a.com xmlns:b=b.com".

Example

var
   RetDoc: TOraXML;
   Str: string;
begin
...
   Edit;
   TOraXMLField(FieldByName('XMLField')).AsXML.AsString :=
      '<root> '+
      '<x xmlns:edi=''http://ecommerce.org/schema''> '+
      '<b>32.18</b> '+
      '<edi:price units=''Euro''>32.18</edi:price> '+
      '</x> '+
      '</root>';
   Post;
...
   RetDoc := TOraXML.Create();
   RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
   try
      with TOraXMLField(FieldByName('XMLField')).AsXML do begin
         Extract(RetDoc, '//edi:price', 'xmlns:edi=http://ecommerce.org/schema');
         Str := RetDoc.AsString;
         Extract(RetDoc, '/root/x/b');
         Str := RetDoc.AsString; // Str = '<b>32.18</b>'
      end;
   finally
      RetDoc.Free;
   end;
end;

See Also

  • Exists
  • GetSchema
  • IsSchemaBased
  • Transform


TOraXML.GetSchema Method

TOraXML.GetSchema Method

Determines the based schema document, schema URL and root element used for the current XMLType creation.

Class

TOraXML

Syntax

procedure GetSchema(SchemaDoc: TOraXML; var SchemaURL: string; var RootElem: string);

Parameters
SchemaDoc
Holds a destination TOraXML object which holds the operation result.
SchemaURL
Holds the schema URL.
RootElem
Holds the root element declared in schema.

Remarks

Call the GetSchema method for schema based TOraXML objects to determine the based schema document, schema URL and root element used for the current XMLType creation. SchemaDoc parameter is a destination TOraXML object which holds the operation result. SchemaDoc object must be created before passing it as a parameter. Use SchemaURL parameter to return based schema URL used for creating XMLType object. Use RootElem parameter to return root element declared in schema that is represented by XML document.

Example

var
   RetDoc: TOraXML;
   ResStr: boolean;
begin
   with OraQuery1 do begin
      RetDoc := TOraXML.Create();
      RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
      try
         with TOraXMLField(FieldByName('XMLField')).AsXML do begin
            GetSchema(RetDoc, SchemaURL, RootElem);
            ResStr := RetDoc.AsString;
         end;
      finally
         RetDoc.Free;
      end;
   end;
end;

See Also

  • Exists
  • Extract
  • IsSchemaBased
  • Transform


TOraXML.IsSchemaBased Method

TOraXML.IsSchemaBased Method

Determines if an XMLType instance is schema-based.

Class

TOraXML

Syntax

function IsSchemaBased: boolean;

Return Value
True, if the XML instance is schema-based. False otherwise.

Remarks

Call the IsShemaBased method to determine whether the XMLType instance is schema-based. Returns True or False depending on whether the XMLType instance is schema-based.

See Also

  • Exists
  • Extract
  • GetSchema
  • Transform


TOraXML.LoadFromStream Method

TOraXML.LoadFromStream Method

Copies the contents of a stream into the TOraXML object.

Class

TOraXML

Syntax

procedure LoadFromStream(Stream: TStream);

Parameters
Stream
Holds the name of a stream from which the field's value is copied.

Remarks

Call the LoadFromStream method to copy the contents of a stream into the TOraXML object. Specify the stream from which the field's value is copied as the value of the Stream parameter.

See Also

  • SaveToStream


TOraXML.SaveToStream Method

TOraXML.SaveToStream Method

Copies the contents of a TOraXML object to a stream.

Class

TOraXML

Syntax

procedure SaveToStream(Stream: TStream);

Parameters
Stream
Hold the name of a stream to copy the contents of a TOraXML object to.

Remarks

Call the SaveToStream method to copy the contents of a TOraXML object to a stream. Specify the name of the stream to which the field's value is saved as the value of the Stream parameter.

See Also

  • LoadFromStream


TOraXML.Transform Method

TOraXML.Transform Method

Transforms and returns a TOraXML object.

Class

TOraXML

Syntax

procedure Transform(XSLDoc: TOraXML; RetDoc: TOraXML);

Parameters
XSLDoc
Holds an XSL document.
RetDoc
Holds a destination TOraXML object which holds the new (transformed) XML document.

Remarks

Call the Transform method to transform and return TOraXML, using the given XSL document in XSLDoc parameter. The new (transformed) XML document is assigned to RetDoc. XSLDoc parameter is the XSL document to be applied to the XMLType. RetDoc parameter is a destination TOraXML object which holds the operation result. RetDoc object must be created before passing it as a parameter.

Example

var
   RetDoc, XSLDoc: TOraXML;
begin
   RetDoc := TOraXML.Create();
   RetDoc.OCISvcCtx := OraSession1.OCISvcCtx;
   XSLDoc := TOraXML.Create();
   XSLDoc.OCISvcCtx := OraSession1.OCISvcCtx;
   try
      with TOraXMLField(FieldByName('XMLField')).AsXML do begin
         XSLDoc.AsString:=XSLDocument;
         Transform(XSLDoc, RetDoc);
         Str := RetDoc.AsString;
      end;
   finally
      RetDoc.Free;
      XSLDoc.Free;
   end;
end;

See Also

  • Exists
  • Extract
  • GetSchema
  • IsSchemaBased


TOraXML.Validate Method

TOraXML.Validate Method

Checks if the input instance conforms to a specified XML schema.

Class

TOraXML

Syntax

function Validate(SchemaURL: string): boolean;

Parameters
SchemaURL
Holds the URL of the XML Schema against which to check the conformance.
Return Value
True, if the input instance conforms to a specified XML schema. False otherwise.

Remarks

Call the Validate method to check if the input instance conforms to a specified XML schema. SchemaURL parameter is the URL of the XML Schema against which to check the conformance.

Example

Result := TOraXMLField(FieldByName('XMLField')).AsXML.Validate('http://www.oracle.com/PO.xsd');

See Also

  • Extract
  • GetSchema
  • IsSchemaBased
  • Transform


OraPackage Unit Members

OraPackage Unit Members

This unit contains implementation of the TOraPackage component.

Classes

Name | Description
TCustomOraPackage | A a base class for components that provide access to packages stored in an Oracle database.
TOraPackage | A component providing access to packages stored in an Oracle database.


Classes in OraPackage

Classes in OraPackage

Classes in the OraPackage unit.

Classes

Name | Description
TCustomOraPackage | A a base class for components that provide access to packages stored in an Oracle database.
TOraPackage | A component providing access to packages stored in an Oracle database.


TCustomOraPackage Class

TCustomOraPackage Class

A a base class for components that provide access to packages stored in an Oracle database.

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

Unit

OraPackage

Syntax

TCustomOraPackage = class(TComponent);

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomOraPackage


TCustomOraPackage Members

TCustomOraPackage Members

TCustomOraPackage class overview.

Properties

Name | Description
Params | Used to receive values that are the output parameters of package stored procedures.
Session | Used to specify the session component which is associated with this TOraPackage object.

Methods

Name | Description
ExecProc | Calls the stored procedures defined for a given package.
ExecProcEx | Calls the stored procedures defined for a given package.
VariableByName | Provides access to package variables.


TCustomOraPackage Properties

TCustomOraPackage Properties

Properties of the TCustomOraPackage class.

For a complete list of the TCustomOraPackage class members, see the TCustomOraPackage Members topic.

Public

Name | Description
Params | Used to receive values that are the output parameters of package stored procedures.

Published

Name | Description
Session | Used to specify the session component which is associated with this TOraPackage object.

See Also

  • TCustomOraPackage Class
  • TCustomOraPackage Class Members


TCustomOraPackage.Params Property

TCustomOraPackage.Params Property

Used to receive values that are the output parameters of package stored procedures.

Class

TCustomOraPackage

Syntax

property Params: TOraParams;

Remarks

Use the Params property to receive values that are the output parameters of package stored procedures.


TCustomOraPackage.Session Property

TCustomOraPackage.Session Property

Used to specify the session component which is associated with this TOraPackage object.

Class

TCustomOraPackage

Syntax

property Session: TOraSession;

Remarks

Use the Session propery to specify the session component which is associated with this TOraPackage object.

At design-time select a session instance from a dropdown listbox.


TCustomOraPackage Methods

TCustomOraPackage Methods

Methods of the TCustomOraPackage class.

For a complete list of the TCustomOraPackage class members, see the TCustomOraPackage Members topic.

Public

Name | Description
ExecProc | Calls the stored procedures defined for a given package.
ExecProcEx | Calls the stored procedures defined for a given package.
VariableByName | Provides access to package variables.

See Also

  • TCustomOraPackage Class
  • TCustomOraPackage Class Members


TCustomOraPackage.ExecProc Method

TCustomOraPackage.ExecProc Method

Calls the stored procedures defined for a given package.

Class

TCustomOraPackage

Syntax

procedure ExecProc(const Name: string); overload;function ExecProc(Name: string; const Params: array of variant): variant; overload;

Parameters
Name
Holds the name of the stored procedure.
Params
holds the parameter values array.
Return Value
a result, if a stored procedure is a function, Null otherwise.

Remarks

Call the ExecProc method to call the stored procedures defined for a given package. The Name parameter is a name of a stored procedure.

If a stored procedure accepts or returns parameters they must be supplied in the Params array in exactly the same order and number as they appear in the declaration of this stored procedure. If the value for an input parameter was not included in the Params array, the parameter default value is taken. Only the parameter values at the end of the list may be unincluded to the parameter values array. If the parameter has no default value, the NULL value is sent.

For example, the following is a stored procedure declaration in package DBMS_ALERT:

DBMS_ALERT.SIGNAL (
    name       IN   VARCHAR2,
    message   IN   VARCHAR2);

it may be called with this code:

MyOraPackage.ExecProc('SIGNAL', ['MySignalName', 'MyMessage']);

This is different from the way ExecProcEx is used.

Note: Stored functions unlike stored procedures return result values. To understand the parameters usage see TCustomDAConnection.ExecProc.

See Also

  • ExecProcEx
  • TCustomDAConnection.ExecProc
  • TCustomDAConnection.ExecSQL
  • TCustomDAConnection.ExecSQLEx


TCustomOraPackage.ExecProcEx Method

TCustomOraPackage.ExecProcEx Method

Calls the stored procedures defined for a given package.

Class

TCustomOraPackage

Syntax

function ExecProcEx(Name: string; const Params: array of variant): variant;

Parameters
Name
Holds the name of the stored procedure.
Params
Holds the parameter values array.
Return Value
a result, if a stored procedure is a function, Null otherwise.

Remarks

Call the ExecProcEx method to call stored procedures defined for a given package. Name parameter is a name of a stored procedure.

If the sored procedure accepts or returns parameters, they must be supplied in the Params array as pairs of parameters' names and values so that every value would come immediately after its name. If the value for an input parameter was not included in the Params array, parameter default value is taken. If the parameter has no default value, NULL value is sent.

For example, the following is a stored procedure declaration in package DBMS_ALERT:

DBMS_ALERT.SIGNAL (
    name       IN   VARCHAR2,
    message   IN   VARCHAR2);

it may be called by this code:

MyOraPackage.ExecProcEx("SIGNAL", ["name", "MySignalName", "message", "MyMessage"]);

It is different from the way ExecProc is used.

See Also

  • ExecProc
  • TCustomDAConnection.ExecProcEx
  • TCustomDAConnection.ExecSQLEx


TCustomOraPackage.VariableByName Method

TCustomOraPackage.VariableByName Method

Provides access to package variables.

Class

TCustomOraPackage

Syntax

function VariableByName(Name: string): TVariable;

Parameters
Name
Holds the name of a variable.
Return Value
a reference for a TVariable object.

Remarks

Call the VariableByName method to get access to package variables.

Reference for a variable with the name not defined yet will prepare a placeholder for it.


TOraPackage Class

TOraPackage Class

A component providing access to packages stored in an Oracle database.

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

Unit

OraPackage

Syntax

TOraPackage = class(TCustomOraPackage);

Remarks

Use the TOraPackage components to get access to packages stored in Oracle database.

Packages may encapsulate sets of procedures and functions along with related variables and constants. To get the list of Oracle supplied packages refer to the Oracle online documents.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomOraPackage
TOraPackage


TOraPackage Members

TOraPackage Members

TOraPackage class overview.

Properties

Name | Description
PackageName | Used to supply an Oracle package name.
Params (inherited from TCustomOraPackage) | Used to receive values that are the output parameters of package stored procedures.
Session (inherited from TCustomOraPackage) | Used to specify the session component which is associated with this TOraPackage object.

Methods

Name | Description
ExecProc (inherited from TCustomOraPackage) | Calls the stored procedures defined for a given package.
ExecProcEx (inherited from TCustomOraPackage) | Calls the stored procedures defined for a given package.
VariableByName (inherited from TCustomOraPackage) | Provides access to package variables.


TOraPackage Properties

TOraPackage Properties

Properties of the TOraPackage class.

For a complete list of the TOraPackage class members, see the TOraPackage Members topic.

Public

Name | Description
ExecProc (inherited from TCustomOraPackage) | Calls the stored procedures defined for a given package.
ExecProcEx (inherited from TCustomOraPackage) | Calls the stored procedures defined for a given package.
Params (inherited from TCustomOraPackage) | Used to receive values that are the output parameters of package stored procedures.
VariableByName (inherited from TCustomOraPackage) | Provides access to package variables.

Published

Name | Description
PackageName | Used to supply an Oracle package name.
Session (inherited from TCustomOraPackage) | Used to specify the session component which is associated with this TOraPackage object.

See Also

  • TOraPackage Class
  • TOraPackage Class Members


TOraPackage.PackageName Property

TOraPackage.PackageName Property

Used to supply an Oracle package name.

Class

TOraPackage

Syntax

property PackageName: string;

Remarks

Use the PackageName property to supply an Oracle package name. Subsequent accesses to package methods and variables will be associated with this name.

At design-time dropdown listbox provides all Oracle supplied and user-defined packages to select from.


Classes in OraProvider

Classes in OraProvider

Classes in the OraProvider unit.

Classes

Name | Description
TOraProvider | A component for loading data to and from a dataset.


TOraProvider Class

TOraProvider Class

A component for loading data to and from a dataset.

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

Unit

OraProvider

Syntax

TOraProvider = class(TDataSetProvider);

Remarks

TOraProvider provides data to and applies updates from a client dataset. TOraProvider is derived from TDataSetProvider and has same methods and properties as TProvider component.

Note: TOraProvider component works with Delphi (C++Builder) Enterprise edition only. So to install it you need to compile and install OraProvider package oraprovXX.bpk .

Inheritance Hierarchy

TObject
TOraProvider


TOraProvider Members

TOraProvider Members

TOraProvider class overview.


OraScript Unit Members

OraScript Unit Members

This unit contains implementation of the TOraScript component.

Classes

Name | Description
TOraScript | A component for executing several SQL statements one by one.
TOraStatement | A class used for controlling single SQL statements of the script.
TOraStatements | A class for holding a collection of TOraStatement objects.


Classes in OraScript

Classes in OraScript

Classes in the OraScript unit.

Classes

Name | Description
TOraScript | A component for executing several SQL statements one by one.
TOraStatement | A class used for controlling single SQL statements of the script.
TOraStatements | A class for holding a collection of TOraStatement objects.


TOraScript Class

TOraScript Class

A component for executing several SQL statements one by one.

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

Unit

OraScript

Syntax

TOraScript = class(TDAScript);

Remarks

Often it is necessary to execute several SQL statements one by one. Known way is using a lot of components such as TOraSQL. Usually it is not a good solution. Sometimes it can be performed by anonymous PL/SQL block. But sometimes it does not work. For example, DDL statements cannot be used in PL/SQL. With only one TOraScript component you can execute several SQL statements as one. This sequence of statements is named script. To separate single statements use semicolon (;), slash (/) ,and for PL/SQL - only slash . Note that slash must be the first character in line.

Errors that occur while execution can be processed in the TDAScript.OnError event handler. By default, on error TOraScript shows exception and continues execution.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDAScript
TOraScript

See Also

  • TOraSQL


TOraScript Members

TOraScript Members

TOraScript class overview.

Properties

Name | Description
Connection (inherited from TDAScript) | Used to specify the connection in which the script will be executed.
DataSet | Description is not available at the moment.
Debug (inherited from TDAScript) | Used to display the script execution and all its parameter values.
Delimiter (inherited from TDAScript) | Used to set the delimiter string that separates script statements.
EndLine (inherited from TDAScript) | Used to get the current statement last line number in a script.
EndOffset (inherited from TDAScript) | Used to get the offset in the last line of the current statement.
EndPos (inherited from TDAScript) | Used to get the end position of the current statement.
Macros (inherited from TDAScript) | Used to change SQL script text in design- or run-time easily.
Session | Used to specify the session in which the script will be executed.
SQL (inherited from TDAScript) | Used to get or set script text.
StartLine (inherited from TDAScript) | Used to get the current statement start line number in a script.
StartOffset (inherited from TDAScript) | Used to get the offset in the first line of the current statement.
StartPos (inherited from TDAScript) | Used to get the start position of the current statement in a script.
Statements | Contains the list of statements obtained from the SQL property.

Methods

Name | Description
BreakExec (inherited from TDAScript) | Stops script execution.
ErrorOffset (inherited from TDAScript) | Used to get the offset of the statement if the Execute method raised an exception.
Execute (inherited from TDAScript) | Executes a script.
ExecuteFile (inherited from TDAScript) | Executes SQL statements contained in a file.
ExecuteNext (inherited from TDAScript) | Executes the next statement in the script and then stops.
ExecuteStream (inherited from TDAScript) | Executes SQL statements contained in a stream object.
FindMacro (inherited from TDAScript) | Indicates whether a specified macro exists in a dataset.
MacroByName (inherited from TDAScript) | Finds a Macro with the name passed in Name.

Events

Name | Description
AfterExecute (inherited from TDAScript) | Occurs after a SQL script execution.
BeforeExecute (inherited from TDAScript) | Occurs when taking a specific action before executing the current SQL statement is needed.
OnError (inherited from TDAScript) | Occurs when Oracle raises an error.


TOraScript Properties

TOraScript Properties

Properties of the TOraScript class.

For a complete list of the TOraScript class members, see the TOraScript Members topic.

Public

Name | Description
BreakExec (inherited from TDAScript) | Stops script execution.
Connection (inherited from TDAScript) | Used to specify the connection in which the script will be executed.
EndLine (inherited from TDAScript) | Used to get the current statement last line number in a script.
EndOffset (inherited from TDAScript) | Used to get the offset in the last line of the current statement.
EndPos (inherited from TDAScript) | Used to get the end position of the current statement.
ErrorOffset (inherited from TDAScript) | Used to get the offset of the statement if the Execute method raised an exception.
Execute (inherited from TDAScript) | Executes a script.
ExecuteFile (inherited from TDAScript) | Executes SQL statements contained in a file.
ExecuteNext (inherited from TDAScript) | Executes the next statement in the script and then stops.
ExecuteStream (inherited from TDAScript) | Executes SQL statements contained in a stream object.
FindMacro (inherited from TDAScript) | Indicates whether a specified macro exists in a dataset.
MacroByName (inherited from TDAScript) | Finds a Macro with the name passed in Name.
StartLine (inherited from TDAScript) | Used to get the current statement start line number in a script.
StartOffset (inherited from TDAScript) | Used to get the offset in the first line of the current statement.
StartPos (inherited from TDAScript) | Used to get the start position of the current statement in a script.
Statements | Contains the list of statements obtained from the SQL property.

Published

Name | Description
AfterExecute (inherited from TDAScript) | Occurs after a SQL script execution.
BeforeExecute (inherited from TDAScript) | Occurs when taking a specific action before executing the current SQL statement is needed.
DataSet | Description is not available at the moment.
Debug (inherited from TDAScript) | Used to display the script execution and all its parameter values.
Delimiter (inherited from TDAScript) | Used to set the delimiter string that separates script statements.
Macros (inherited from TDAScript) | Used to change SQL script text in design- or run-time easily.
OnError (inherited from TDAScript) | Occurs when Oracle raises an error.
Session | Used to specify the session in which the script will be executed.
SQL (inherited from TDAScript) | Used to get or set script text.

See Also

  • TOraScript Class
  • TOraScript Class Members


TOraScript.DataSet Property

TOraScript.DataSet Property

Class

TOraScript

Syntax

property DataSet: TOraDataSet;

Remarks

Use the DataSet property to assign a component that will be used by TOraScript to execute statements, and obtain results of execution.

See Also

  • TOraDataSet
  • TDAScript.ExecuteNext


TOraScript.Session Property

TOraScript.Session Property

Used to specify the session in which the script will be executed.

Class

TOraScript

Syntax

property Session: TOraSession;

Remarks

Use the Session property to specify the session in which the script will be executed. If Session is not connected, Execute method calls Session.Connect.

See Also

  • TOraSession


TOraScript.Statements Property

TOraScript.Statements Property

Contains the list of statements obtained from the SQL property.

Class

TOraScript

Syntax

property Statements: TOraStatements;

Remarks

Contains the list of statements that are obtained from the SQL property. Access the Statements property to view SQL statement, set parameters or execute the specified statement. Statements is a zero-based array of statement records. Index specifies the array element to access.

For example, consider the following script:

CREATE TABLE A (FIELD1 INTEGER);
INSERT INTO A VALUES(1);
INSERT INTO A VALUES(2);
INSERT INTO A VALUES(3);
CREATE TABLE B (FIELD1 INTEGER);
INSERT INTO B VALUES(1);
INSERT INTO B VALUES(2);
INSERT INTO B VALUES(3);

Note: The list of statements is created and filled when the value of the Statements property is requested for the first time. That's why the first access to the Statements property can take a long time.

Example

You can use the Statements property as presented below:

procedure TForm1.Button1Click(Sender: TObject);
var
   i: integer;
begin
   with Script do
   begin
      for i := 0 to Statements.Count - 1 do
         if Copy(Statements[i].SQL, 1, 6) <> 'CREATE' then
            Statements[i].Execute;
   end;
end;

See Also

  • TOraStatements


TOraStatement Class

TOraStatement Class

A class used for controlling single SQL statements of the script.

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

Unit

OraScript

Syntax

TOraStatement = class(TDAStatement);

Remarks

TOraScript contains SQL statements, represented as TOraStatement objects. TOraStatement class has attributes and methods for controlling single SQL statements of the script.

Inheritance Hierarchy

TObject
TPersistent
TCollectionItem
TDAStatement
TOraStatement

See Also

  • TOraScript
  • TOraStatements
  • TOraStatements


TOraStatement Members

TOraStatement Members

TOraStatement class overview.

Properties

Name | Description
EndLine (inherited from TDAStatement) | Used to determine the number of the last statement line in a script.
EndOffset (inherited from TDAStatement) | Used to get the offset in the last line of the statement.
EndPos (inherited from TDAStatement) | Used to get the end position of the statement in a script.
Omit (inherited from TDAStatement) | Used to avoid execution of a statement.
Params | Contains parameters for an SQL statement.
Script (inherited from TDAStatement) | Used to determine the TDAScript object the SQL Statement belongs to.
SQL (inherited from TDAStatement) | Used to get or set the text of an SQL statement.
StartLine (inherited from TDAStatement) | Used to determine the number of the first statement line in a script.
StartOffset (inherited from TDAStatement) | Used to get the offset in the first line of a statement.
StartPos (inherited from TDAStatement) | Used to get the start position of the statement in a script.


TOraStatement Properties

TOraStatement Properties

Properties of the TOraStatement class.

For a complete list of the TOraStatement class members, see the TOraStatement Members topic.

Public

Name | Description
EndLine (inherited from TDAStatement) | Used to determine the number of the last statement line in a script.
EndOffset (inherited from TDAStatement) | Used to get the offset in the last line of the statement.
EndPos (inherited from TDAStatement) | Used to get the end position of the statement in a script.
Omit (inherited from TDAStatement) | Used to avoid execution of a statement.
Params | Contains parameters for an SQL statement.
Script (inherited from TDAStatement) | Used to determine the TDAScript object the SQL Statement belongs to.
SQL (inherited from TDAStatement) | Used to get or set the text of an SQL statement.
StartLine (inherited from TDAStatement) | Used to determine the number of the first statement line in a script.
StartOffset (inherited from TDAStatement) | Used to get the offset in the first line of a statement.
StartPos (inherited from TDAStatement) | Used to get the start position of the statement in a script.

See Also

  • TOraStatement Class
  • TOraStatement Class Members


TOraStatement.Params Property

TOraStatement.Params Property

Contains parameters for an SQL statement.

Class

TOraStatement

Syntax

property Params: TOraParams;

Remarks

The Params property contains parameters for an SQL statement.

Access Params at runtime to view and set parameter names, values, and data types dynamically. Params is a zero-based array of parameter records. Index specifies the array element to access.

See Also

  • TOraParam


TOraStatements Class

TOraStatements Class

A class for holding a collection of TOraStatement objects.

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

Unit

OraScript

Syntax

TOraStatements = class(TDAStatements);

Remarks

Each TOraStatements holds a collection of TOraStatement objects. TOraStatements maintains an index of the statements in its TOraStatements.Items array. The Count property contains the number of statements in the collection. Use TOraStatements class to manipulate script SQL statements.

Inheritance Hierarchy

TObject
TPersistent
TCollection
TDAStatements
TOraStatements

See Also

  • TDAScript
  • TDAStatement


TOraStatements Members

TOraStatements Members

TOraStatements class overview.

Properties

Name | Description
Items | Used to access individual script statements.


TOraStatements Properties

TOraStatements Properties

Properties of the TOraStatements class.

For a complete list of the TOraStatements class members, see the TOraStatements Members topic.

Public

Name | Description
Items | Used to access individual script statements.

See Also

  • TOraStatements Class
  • TOraStatements Class Members


TOraStatements.Items Property(Indexer)

TOraStatements.Items Property(Indexer)

Used to access individual script statements.

Class

TOraStatements

Syntax

property Items[Index: Integer]: TOraStatement; default;

Parameters
Index
Holds an array of the statements index.

Remarks

Use the Items property to access individual script statements. The value of the Index parameter corresponds to the Index property of TOraStatement.

See Also

  • TOraStatement


OraSmart Unit Members

OraSmart Unit Members

This unit contains the TSmartQuery and TOraTable components.

Classes

Name | Description
TCustomSmartQuery | A base class defining functionality for descendant classes that access database using dynamically generated SQL statements.
TOraTable | A component for retrieving and updating data in a single table without writing SQL statements.
TSmartQuery | A component providing TCustomSmartQuery.Expand fields feature, that lets all data controls be aware of all the fields belonging to updating table an not only those requested in SELECT clause, and TCustomSmartQuery.SmartRefresh feature (in Professional and Developer editions only).
TSmartQueryOptions | This class allows setting up the behaviour of the TSmartQuery class.

Enumerations

Name | Description
TSmartState | Specifies if TCustomSmartQuery is in view mode.


Classes in OraSmart

Classes in OraSmart

Classes in the OraSmart unit.

Classes

Name | Description
TCustomSmartQuery | A base class defining functionality for descendant classes that access database using dynamically generated SQL statements.
TOraTable | A component for retrieving and updating data in a single table without writing SQL statements.
TSmartQuery | A component providing TCustomSmartQuery.Expand fields feature, that lets all data controls be aware of all the fields belonging to updating table an not only those requested in SELECT clause, and TCustomSmartQuery.SmartRefresh feature (in Professional and Developer editions only).
TSmartQueryOptions | This class allows setting up the behaviour of the TSmartQuery class.


TCustomSmartQuery Class

TCustomSmartQuery Class

A base class defining functionality for descendant classes that access database using dynamically generated SQL statements.

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

Unit

OraSmart

Syntax

TCustomSmartQuery = class(TCustomOraQuery);

Remarks

TCustomSmartQuery is a base class that defines functionality for descendant classes that access database using dynamically generated SQL statements. Applications never use TCustomSmartQuery objects directly. Instead they use descendants of TCustomSmartQuery, such as TSmartQuery and TOraTable.

TSmartQuery is an alternative to TOraQuery. It provides TCustomSmartQuery.Expand fields feature, that lets all data controls be aware of all the fields belonging to updating table and not only those requested in a SELECT clause, and TCustomSmartQuery.SmartRefresh feature (in Professional and Developer editions only).

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TCustomSmartQuery

See Also

  • TOraQuery
  • TSmartQuery
  • TOraStoredProc
  • TOraTable


TCustomSmartQuery Members

TCustomSmartQuery Members

TCustomSmartQuery class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DependEvents | Used to get or set the names of the events that dataset will depend on in TCustomSmartQuery.SmartRefresh mode.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
Expand | Lets all data controls be aware of all the fields belonging to updating table.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
Options | Used to specify the behaviour of TCustomSmartQuery object.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshEvent | Used to get or set the name of the event that dataset will be waiting for in TCustomSmartQuery.SmartRefresh mode.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SmartRefresh | Let TCustomSmartQuery components work in a concurrent environment.
SmartState | Defines if TCustomSmartQuery is in view mode.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.
View | Allows viewing all fields of the updating table.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterSmartRefresh | Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
RefreshFields | Occures before an application posts changes for the current record to the database or cache.


TCustomSmartQuery Properties

TCustomSmartQuery Properties

Properties of the TCustomSmartQuery class.

For a complete list of the TCustomSmartQuery class members, see the TCustomSmartQuery Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DependEvents | Used to get or set the names of the events that dataset will depend on in TCustomSmartQuery.SmartRefresh mode.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Expand | Lets all data controls be aware of all the fields belonging to updating table.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options | Used to specify the behaviour of TCustomSmartQuery object.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshEvent | Used to get or set the name of the event that dataset will be waiting for in TCustomSmartQuery.SmartRefresh mode.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SmartRefresh | Let TCustomSmartQuery components work in a concurrent environment.
SmartState | Defines if TCustomSmartQuery is in view mode.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TCustomSmartQuery Class
  • TCustomSmartQuery Class Members


TCustomSmartQuery.DependEvents Property

TCustomSmartQuery.DependEvents Property

Used to get or set the names of the events that dataset will depend on in SmartRefresh mode.

Class

TCustomSmartQuery

Syntax

property DependEvents: string;

Remarks

Use DependEvents property to get or set the names of the events that dataset will depend on in SmartRefresh mode. In the other words, when some TCustomsSmartQuery object receives RefreshEvent, it causes an update of every dataset that has received event name in DependEvents list, i.e. all depending datasets are updated.

See Also

  • SmartRefresh
  • RefreshEvent


TCustomSmartQuery.Expand Property

TCustomSmartQuery.Expand Property

Lets all data controls be aware of all the fields belonging to updating table.

Class

TCustomSmartQuery

Syntax

property Expand: boolean default False;

Remarks

Set Expand property to True to let all data controls be aware of all the fields belonging to updating table an not only those requested in the SELECT clause. Those fields which are not requested explicitly will show no data until the dataset enters edit state for a particular record. At that time all fields for that record will be populated from the database.

Preferred design for an application may include DBGrid component which hides unwanted fields and other data components which reveal those fields only for the selected record. This way large tables with lots of fields are edited by the user only on demand during the course of a session. Thus network traffic may be lessened and memory usage lowered for transfers of the requested fields only.

If Expand property is True you can point in a SELECT statement the fields that will be displayed only in the grid. The rest of the fields from the updating table will be fetched before edit.

Note: This property is mutually exclusive with CachedUpdates property. Thus setting Expand to True leaves CachedUpdates property set to False. Also do not try to read blob fields when they are not expanded, this will cause an exception.

The default value is False.


TCustomSmartQuery.Options Property

TCustomSmartQuery.Options Property

Used to specify the behaviour of TCustomSmartQuery object.

Class

TCustomSmartQuery

Syntax

property Options: TSmartQueryOptions;

Remarks

Set properties of Options to specify the behaviour of a TCustomSmartQuery object.

Descriptions of all options are in the table below.

Option Name | Description
QuoteNames | Used for TCustomSmartQuery to quote all database object names in autogenerated SQL statements.

See Also

  • TCustomDADataSet.Options
  • TOraDataSet.Options


TCustomSmartQuery.RefreshEvent Property

TCustomSmartQuery.RefreshEvent Property

Used to get or set the name of the event that dataset will be waiting for in SmartRefresh mode.

Class

TCustomSmartQuery

Syntax

property RefreshEvent: string;

Remarks

Use RefreshEvent property to get or set the name of the event that dataset will be waiting for in the SmartRefresh mode. When this event occures, dataset performs the Refresh procedure.

See Also

  • SmartRefresh
  • DependEvents


TCustomSmartQuery.SmartRefresh Property

TCustomSmartQuery.SmartRefresh Property

Let TCustomSmartQuery components work in a concurrent environment.

Class

TCustomSmartQuery

Syntax

property SmartRefresh: boolean default False;

Remarks

Set SmartRefresh property to True to let TCustomSmartQuery components work in a concurrent environment. Applications which instantiate TCustomSmartQuery descendants may notify each other about their activity on a shared database and be updated each time the database gets modified.

Setting SmartRefresh property to False indicates that concurrent sessions will refresh their datasets on their own.


TCustomSmartQuery.SmartState Property

TCustomSmartQuery.SmartState Property

Defines if TCustomSmartQuery is in view mode.

Class

TCustomSmartQuery

Syntax

property SmartState: TSmartState;

Remarks

Check SmartState property to learn whether TCustomSmartQuery is in view mode.

TCustomSmartQuery is in view mode (SmartState is dsView) after calling View method.

See Also

  • View


TCustomSmartQuery Methods

TCustomSmartQuery Methods

Methods of the TCustomSmartQuery class.

For a complete list of the TCustomSmartQuery class members, see the TCustomSmartQuery Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.
View | Allows viewing all fields of the updating table.

See Also

  • TCustomSmartQuery Class
  • TCustomSmartQuery Class Members


TCustomSmartQuery.View Method

TCustomSmartQuery.View Method

Allows viewing all fields of the updating table.

Class

TCustomSmartQuery

Syntax

procedure View;

Remarks

Useful when Expand is True. Lets view all fields of the updating table. Call Cancel method to return dataset to dsBrowse mode. To indicate view mode check SmartState. After calling View method SmartState is dsView.

See Also

  • SmartState


TCustomSmartQuery Events

TCustomSmartQuery Events

Events of the TCustomSmartQuery class.

For a complete list of the TCustomSmartQuery class members, see the TCustomSmartQuery Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterSmartRefresh | Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshFields | Occures before an application posts changes for the current record to the database or cache.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TCustomSmartQuery Class
  • TCustomSmartQuery Class Members


TCustomSmartQuery.AfterSmartRefresh Event

TCustomSmartQuery.AfterSmartRefresh Event

Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.

Class

TCustomSmartQuery

Syntax

property AfterSmartRefresh: TDataSetNotifyEvent;

Remarks

Occurs every time after TCustomOraQuery performes Smart Refresh procedure.

See Also

  • SmartRefresh


TCustomSmartQuery.RefreshFields Event

TCustomSmartQuery.RefreshFields Event

Occures before an application posts changes for the current record to the database or cache.

Class

TCustomSmartQuery

Syntax

property RefreshFields: TDataSetNotifyEvent;

Remarks

Occurs before an application posts changes for the current record to the database or cache.

When Expand is True, write RefreshFields event handler to assign a value to the nonupdating fields.

Example

procedure quEmpRefreshFields(DataSet: TDataSet);
begin
   DataSet.FieldByName('DNAME').AsString:=
      quDept.FieldByName('DNAME').AsString;
end;


TOraTable Class

TOraTable Class

A component for retrieving and updating data in a single table without writing SQL statements.

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

Unit

OraSmart

Syntax

TOraTable = class(TCustomSmartQuery);

Remarks

The TOraTable component allows retrieving and updating data in a single table without writing SQL statements. Use TOraTable to access data in a table . Use the TableName property to specify table name. TOraTable uses the KeyFields property to build SQL statements for updating table data. KeyFields is a string containing a semicolon-delimited list of the field names. If KeyFields is not defined before opening, TOraTable uses primary or unique key or ROWID pseudo field.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TCustomSmartQuery
TOraTable

See Also

  • TSmartQuery
  • Updating Data with ODAC Dataset Components
  • Working with Master/Detail Relationships


TOraTable Members

TOraTable Members

TOraTable class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DependEvents (inherited from TCustomSmartQuery) | Used to get or set the names of the events that dataset will depend on in TCustomSmartQuery.SmartRefresh mode.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
Expand (inherited from TCustomSmartQuery) | Lets all data controls be aware of all the fields belonging to updating table.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode | Used to specify what kind of lock will be performed when editing a record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
Options (inherited from TCustomSmartQuery) | Used to specify the behaviour of TCustomSmartQuery object.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
OrderFields | Used to build ORDER BY clause of SQL statements.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshEvent (inherited from TCustomSmartQuery) | Used to get or set the name of the event that dataset will be waiting for in TCustomSmartQuery.SmartRefresh mode.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SmartRefresh (inherited from TCustomSmartQuery) | Let TCustomSmartQuery components work in a concurrent environment.
SmartState (inherited from TCustomSmartQuery) | Defines if TCustomSmartQuery is in view mode.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
TableName | Used to specify the name of the database table this component encapsulates.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
EmptyTable | Truncates the current table content on the server.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
PrepareSQL | Determines KeyFields and builds query of TOraTable.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.
View (inherited from TCustomSmartQuery) | Allows viewing all fields of the updating table.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterSmartRefresh (inherited from TCustomSmartQuery) | Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
RefreshFields (inherited from TCustomSmartQuery) | Occures before an application posts changes for the current record to the database or cache.


TOraTable Properties

TOraTable Properties

Properties of the TOraTable class.

For a complete list of the TOraTable class members, see the TOraTable Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterSmartRefresh (inherited from TCustomSmartQuery) | Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DependEvents (inherited from TCustomSmartQuery) | Used to get or set the names of the events that dataset will depend on in TCustomSmartQuery.SmartRefresh mode.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Expand (inherited from TCustomSmartQuery) | Lets all data controls be aware of all the fields belonging to updating table.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TCustomSmartQuery) | Used to specify the behaviour of TCustomSmartQuery object.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshEvent (inherited from TCustomSmartQuery) | Used to get or set the name of the event that dataset will be waiting for in TCustomSmartQuery.SmartRefresh mode.
RefreshFields (inherited from TCustomSmartQuery) | Occures before an application posts changes for the current record to the database or cache.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SmartRefresh (inherited from TCustomSmartQuery) | Let TCustomSmartQuery components work in a concurrent environment.
SmartState (inherited from TCustomSmartQuery) | Defines if TCustomSmartQuery is in view mode.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.
View (inherited from TCustomSmartQuery) | Allows viewing all fields of the updating table.

Published

Name | Description
LockMode | Used to specify what kind of lock will be performed when editing a record.
OrderFields | Used to build ORDER BY clause of SQL statements.
TableName | Used to specify the name of the database table this component encapsulates.

See Also

  • TOraTable Class
  • TOraTable Class Members


TOraTable.LockMode Property

TOraTable.LockMode Property

Used to specify what kind of lock will be performed when editing a record.

Class

TOraTable

Syntax

property LockMode: TLockMode default lmLockImmediate;

Remarks

Use the LockMode property to define what kind of lock will be performed when editing a record. Locking a record is useful in creating multi-user applications. It prevents modification of a record by several users at the same time.

Locking is performed by the RefreshRecord method.

The default value is lmNone.

To set pessimistic locking use LockMode = lmLockImmediate, TOraDataSet.CheckMode = cmException. To set optimistic locking use LockMode = lmLockDelayed, CheckMode = cmException.

See Also

  • TOraStoredProc.LockMode
  • TOraQuery.LockMode


TOraTable.OrderFields Property

TOraTable.OrderFields Property

Used to build ORDER BY clause of SQL statements.

Class

TOraTable

Syntax

property OrderFields: string;

Remarks

TOraTable uses the OrderFields property to build ORDER BY clause of SQL statements. To set several field names to this property separate them with commas.

TOraTable is reopened when OrderFields is being changed.

See Also

  • TOraTable


TOraTable.TableName Property

TOraTable.TableName Property

Used to specify the name of the database table this component encapsulates.

Class

TOraTable

Syntax

property TableName: string;

Remarks

Use the TableName property to specify the name of the database table this component encapsulates. If TCustomDADataSet.Connection is assigned If Session is set at design time,select a valid table name from the TableName drop-down list in Object Inspector.

See Also

  • TOraTable


TOraTable Methods

TOraTable Methods

Methods of the TOraTable class.

For a complete list of the TOraTable class members, see the TOraTable Members topic.

Public

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterSmartRefresh (inherited from TCustomSmartQuery) | Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
DependEvents (inherited from TCustomSmartQuery) | Used to get or set the names of the events that dataset will depend on in TCustomSmartQuery.SmartRefresh mode.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
EmptyTable | Truncates the current table content on the server.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Expand (inherited from TCustomSmartQuery) | Lets all data controls be aware of all the fields belonging to updating table.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Options (inherited from TCustomSmartQuery) | Used to specify the behaviour of TCustomSmartQuery object.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
PrepareSQL | Determines KeyFields and builds query of TOraTable.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshEvent (inherited from TCustomSmartQuery) | Used to get or set the name of the event that dataset will be waiting for in TCustomSmartQuery.SmartRefresh mode.
RefreshFields (inherited from TCustomSmartQuery) | Occures before an application posts changes for the current record to the database or cache.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SmartRefresh (inherited from TCustomSmartQuery) | Let TCustomSmartQuery components work in a concurrent environment.
SmartState (inherited from TCustomSmartQuery) | Defines if TCustomSmartQuery is in view mode.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.
View (inherited from TCustomSmartQuery) | Allows viewing all fields of the updating table.

See Also

  • TOraTable Class
  • TOraTable Class Members


TOraTable.EmptyTable Method

TOraTable.EmptyTable Method

Truncates the current table content on the server.

Class

TOraTable

Syntax

procedure EmptyTable;

Remarks

Call the EmptyTable method to truncate the current table content on the server.


TOraTable.PrepareSQL Method

TOraTable.PrepareSQL Method

Determines KeyFields and builds query of TOraTable.

Class

TOraTable

Syntax

procedure PrepareSQL;

Remarks

Call the PrepareSQL method to determine KeyFields and build query of TOraTable. PrepareSQL is called implicitly when TOraTable is being opened.


TSmartQuery Class

TSmartQuery Class

A component providing TCustomSmartQuery.Expand fields feature, that lets all data controls be aware of all the fields belonging to updating table an not only those requested in SELECT clause, and TCustomSmartQuery.SmartRefresh feature (in Professional and Developer editions only).

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

Unit

OraSmart

Syntax

TSmartQuery = class(TCustomSmartQuery);

Remarks

TSmartQuery component is a direct descendant of the TOraDataSet class.

TSmartQuery is an alternative to TOraQuery. It provides TCustomSmartQuery.Expand fields feature, that lets all data controls be aware of all the fields belonging to updating table an not only those requested in SELECT clause, and TCustomSmartQuery.SmartRefresh feature (in Professional and Developer editions only).

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TCustomDADataSet
TOraDataSet
TCustomOraQuery
TCustomSmartQuery
TSmartQuery

See Also

  • TOraQuery
  • TOraTable
  • Updating Data with ODAC Dataset Components


TSmartQuery Members

TSmartQuery Members

TSmartQuery class overview.

Properties

Name | Description
BaseSQL (inherited from TCustomDADataSet) | Used to return SQL text without any changes performed by AddWhere, SetOrderBy, and FilterSQL.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
ChangeNotification (inherited from TOraDataSet) | Used to receive database change notification messages to refresh dataset when required.
CheckMode (inherited from TOraDataSet) | Used to define the check mode before editing a record.
Connection (inherited from TCustomDADataSet) | Used to specify a connection object to use to connect to a data store.
Cursor (inherited from TOraDataSet) | Used to fetch data from the cursor parameter and cursor field in Oracle 8.
Debug (inherited from TCustomDADataSet) | Used to display executing statement, all its parameters' values, and the type of parameters.
DependEvents (inherited from TCustomSmartQuery) | Used to get or set the names of the events that dataset will depend on in TCustomSmartQuery.SmartRefresh mode.
DetailFields (inherited from TCustomDADataSet) | Used to specify the fields that correspond to the foreign key fields from MasterFields when building master/detail relationship.
DMLRefresh (inherited from TOraDataSet) | Used to refresh record by RETURNING clause when insert or update is performed.
Expand (inherited from TCustomSmartQuery) | Lets all data controls be aware of all the fields belonging to updating table.
FetchAll (inherited from TOraDataSet) | Used to request all records of the query from database server when a dataset is being opened.
FetchRows (inherited from TCustomDADataSet) | Used to define the number of rows to be transferred across the network at the same time.
FilterSQL (inherited from TCustomDADataSet) | Used to change the WHERE clause of SELECT statement and reopen a query.
FinalSQL (inherited from TCustomDADataSet) | Used to return SQL text with all changes performed by AddWhere, SetOrderBy, and FilterSQL, and with expanded macros.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
IsPLSQL (inherited from TOraDataSet) | Indicates whether a SQL statement is a PL/SQL block.
IsQuery (inherited from TOraDataSet) | Indicates whether SQL statement returns rows or not.
KeyFields (inherited from TOraDataSet) | Used to build SQL statements for the SQLDelete, SQLInsert, and SQLUpdate properties if they were empty before updating a database.
KeySequence (inherited from TOraDataSet) | Used to specify the name of a sequence that will be used to fill in a key field after a new record is inserted or posted to a database.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
LockMode (inherited from TOraDataSet) | Used to define when to perform the locking of an editing record.
MacroCount (inherited from TCustomDADataSet) | Used to get the number of macros associated with the Macros property.
Macros (inherited from TCustomDADataSet) | Makes it possible to change SQL queries easily.
MasterFields (inherited from TCustomDADataSet) | Used to specify the names of one or more fields that are used as foreign keys for dataset when establishing detail/master relationship between it and the dataset specified in MasterSource.
MasterSource (inherited from TCustomDADataSet) | Used to specify the data source component which binds current dataset to the master one.
NonBlocking (inherited from TOraDataSet) | Used to execute a SQL statement and fetch rows by a separate thread.
Options (inherited from TCustomSmartQuery) | Used to specify the behaviour of TCustomSmartQuery object.
OptionsDS (inherited from TOraDataSet) | Used to specify the behaviour of TOraDataSetObject.
ParamCheck (inherited from TCustomDADataSet) | Used to specify whether parameters for the Params property are generated automatically after the SQL property was changed.
ParamCount (inherited from TCustomDADataSet) | Used to indicate how many parameters are there in the Params property.
Params (inherited from TOraDataSet) | Contains the parameters for a query's SQL statement.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
ReadOnly (inherited from TCustomDADataSet) | Used to prevent users from updating, inserting, or deleting data in the dataset.
RefreshEvent (inherited from TCustomSmartQuery) | Used to get or set the name of the event that dataset will be waiting for in TCustomSmartQuery.SmartRefresh mode.
RefreshMode (inherited from TOraDataSet) | Used to specify when to refresh an editing record.
RefreshOptions (inherited from TCustomDADataSet) | Used to indicate when the editing record is refreshed.
ReturnParams (inherited from TOraDataSet) | Used to return a new fields value to dataset after insert or update.
RowsAffected (inherited from TCustomDADataSet) | Used to indicate the number of rows which were inserted, updated, or deleted during the last query operation.
RowsProcessed (inherited from TOraDataSet) | Returns the number of rows processed by a query.
SequenceMode (inherited from TOraDataSet) | Used to specify the methods used internally to generate a sequenced field.
Session (inherited from TOraDataSet) | Used to specify the session in which dataset will be executed.
SmartRefresh (inherited from TCustomSmartQuery) | Let TCustomSmartQuery components work in a concurrent environment.
SmartState (inherited from TCustomSmartQuery) | Defines if TCustomSmartQuery is in view mode.
SQL (inherited from TCustomDADataSet) | Used to provide a SQL statement that a query component executes when its Open method is called.
SQLDelete (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying a deletion to a record.
SQLInsert (inherited from TCustomDADataSet) | Used to specify the SQL statement that will be used when applying an insertion to a dataset.
SQLRefresh (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used to refresh current record by calling the TCustomDADataSet.RefreshRecord procedure.
SQLType (inherited from TOraDataSet) | Used to get the typecode of the SQL statement being processed by Oracle database server.
SQLUpdate (inherited from TCustomDADataSet) | Used to specify a SQL statement that will be used when applying an update to a dataset.
StrictUpdate (inherited from TOraDataSet) | Used for TOraDataSet to raise the 'Update failed' exception when the number of updated or deleted records are not equal to 1.
UniDirectional (inherited from TCustomDADataSet) | Used if an application does not need bidirectional access to records in the result set.
UpdateObject (inherited from TOraDataSet) | Used to point to an update object component which provides SQL statements that perform updates of the read-only datasets.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddWhere (inherited from TCustomDADataSet) | Adds condition to the WHERE clause of SELECT statement in the SQL property.
ApplyUpdates (inherited from TCustomDADataSet) | Writes updated, inserted, and deleted records from the client dataset to the database or source dataset.
BreakExec (inherited from TOraDataSet) | Breaks execution of a SQL statement on the server.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
CreateBlobStream (inherited from TCustomDADataSet) | Used to obtain a stream for reading data from or writing data to a BLOB field, specified by the Field parameter.
CreateProcCall (inherited from TOraDataSet) | Generates the stored procedure call.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteWhere (inherited from TCustomDADataSet) | Removes WHERE clause from the SQL property and assigns the BaseSQL property.
ErrorOffset (inherited from TOraDataSet) | Returns the parse error offset.
ExecSQL (inherited from TCustomOraQuery) | Executes a SQL statement on the server.
Execute (inherited from TCustomDADataSet) | Executes a SQL statement on the server.
Executing (inherited from TCustomDADataSet) | Indicates whether SQL statement is still being executed.
Fetched (inherited from TOraDataSet) | Indicates if TCustomDADataSet has already fetched all rows.
Fetching (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is still fetching rows.
FetchingAll (inherited from TCustomDADataSet) | Used to learn whether TCustomDADataSet is fetching all rows to the end.
FindKey (inherited from TCustomDADataSet) | Searches for a record which contains specified field values.
FindMacro (inherited from TCustomDADataSet) | Indicates whether a specified macro exists in a dataset.
FindNearest (inherited from TCustomDADataSet) | Moves the cursor to a specific record or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.
FindParam (inherited from TOraDataSet) | Determines whether a parameter with the specified name exists in a dataset.
GetArray (inherited from TOraDataSet) | Retrieves a TOraArray object for a field when only its name is known.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
GetDataType (inherited from TCustomDADataSet) | Returns internal field types defined in the MemData and accompanying modules.
GetErrorPos (inherited from TOraDataSet) | Returns a row and column of parse error for a SQL statement.
GetFieldObject (inherited from TCustomDADataSet) | Returns a multireference shared object from field.
GetFieldPrecision (inherited from TCustomDADataSet) | Retrieves the precision of a number field.
GetFieldScale (inherited from TCustomDADataSet) | Retrieves the scale of a number field.
GetFile (inherited from TOraDataSet) | Retrieves a TOraFile object for a field with known name.
GetInterval (inherited from TOraDataSet) | Retrieves a TOraInterval object for a field with known name.
GetKeyList (inherited from TOraDataSet) | Returns the list of table primary key fields.
GetLob (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetLobLocator (inherited from TOraDataSet) | Retrieves a TOraLob object for a field with known name.
GetObject (inherited from TOraDataSet) | Retrieves a TOraObject object for a field with known name.
GetOrderBy (inherited from TCustomDADataSet) | Retrieves an ORDER BY clause from a SQL statement.
GetRef (inherited from TOraDataSet) | Retrieves a TOraRef object for a field with known name.
GetTable (inherited from TOraDataSet) | Retrieve a TOraNestTable object for a field with known name.
GetTimeStamp (inherited from TOraDataSet) | Retrieves a TOraTimeStamp object for a field with known name.
GotoCurrent (inherited from TCustomDADataSet) | Sets the current record in this dataset similar to the current record in another dataset.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Lock (inherited from TCustomDADataSet) | Locks the current record.
MacroByName (inherited from TCustomDADataSet) | Finds a Macro with the name passed in Name.
ParamByName (inherited from TOraDataSet) | Sets or uses parameter information for a specific parameter based on its name.
Prepare (inherited from TCustomDADataSet) | Allocates, opens, and parses cursor for a query.
RefreshRecord (inherited from TCustomDADataSet) | Actualizes field values for the current record.
RestoreSQL (inherited from TCustomDADataSet) | Restores the SQL property modified by AddWhere and SetOrderBy.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
Resync (inherited from TCustomDADataSet) | Resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveSQL (inherited from TCustomDADataSet) | Saves the SQL property value to BaseSQL.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
SetOrderBy (inherited from TCustomDADataSet) | Builds an ORDER BY clause of a SELECT statement.
SQLSaved (inherited from TCustomDADataSet) | Determines if the SQL property value was saved to the BaseSQL property.
UnLock (inherited from TCustomDADataSet) | Releases a record lock.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.
View (inherited from TCustomSmartQuery) | Allows viewing all fields of the updating table.

Events

Name | Description
AfterExecute (inherited from TCustomDADataSet) | Occurs after a component has executed a query to database.
AfterFetch (inherited from TCustomDADataSet) | Occurs after dataset finishes fetching data from server.
AfterSmartRefresh (inherited from TCustomSmartQuery) | Occurs after the Smart Refresh procedure was performed by TCustomOraQuery.
AfterUpdateExecute (inherited from TCustomDADataSet) | Occurs after executing insert, delete, update, lock and refresh operations.
BeforeFetch (inherited from TCustomDADataSet) | Occurs before dataset is going to fetch block of records from the server.
BeforeUpdateExecute (inherited from TCustomDADataSet) | Occurs before executing insert, delete, update, lock, and refresh operations.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
RefreshFields (inherited from TCustomSmartQuery) | Occures before an application posts changes for the current record to the database or cache.


TSmartQueryOptions Class

TSmartQueryOptions Class

This class allows setting up the behaviour of the TSmartQuery class.

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

Unit

OraSmart

Syntax

TSmartQueryOptions = class(TOraDataSetOptions);

Inheritance Hierarchy

TObject
TPersistent
TDADataSetOptions
TOraDataSetOptionsDS
TOraDataSetOptions
TSmartQueryOptions


TSmartQueryOptions Members

TSmartQueryOptions Members

TSmartQueryOptions class overview.

Properties

Name | Description
AutoClose (inherited from TOraDataSetOptions) | Used to close OCI cursor after fetching all rows.
AutoPrepare (inherited from TDADataSetOptions) | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields (inherited from TDADataSetOptions) | Used to enable caching of the TField.Calculated and TField.Lookup fields.
CacheLobs (inherited from TOraDataSetOptions) | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues (inherited from TOraDataSetOptions) | Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate value.
DeferredLobRead (inherited from TOraDataSetOptions) | Used to fetch all Oracle 8 Lob values when they are explicitly requested.
DetailDelay (inherited from TDADataSetOptions) | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
ExtendedFieldsInfo (inherited from TOraDataSetOptions) | Used to perform an additional query to get information about returned fields and the tables they belong to.
FieldsAsString (inherited from TOraDataSetOptions) | Used to treat all non-BLOB fields as being of string datatype.
FieldsOrigin (inherited from TDADataSetOptions) | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers (inherited from TDADataSetOptions) | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
FullRefresh (inherited from TOraDataSetOptions) | Used to refresh fields of all tables by the RefreshRecord method.
KeepPrepared (inherited from TOraDataSetOptionsDS) | Used to keep TOraDataSet prepared after closing.
LocalMasterDetail (inherited from TDADataSetOptions) | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings (inherited from TDADataSetOptions) | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange (inherited from TDADataSetOptions) | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
PrefetchRows (inherited from TOraDataSetOptions) | Used to get or set the number of rows that OCI prefetches when executing a query.
PrepareUpdateSQL (inherited from TOraDataSetOptions) | Used to automatically prepare update queries before execution.
QueryRecCount (inherited from TDADataSetOptions) | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
QuoteNames | Used for TCustomSmartQuery to quote all database object names in autogenerated SQL statements.
RawAsString (inherited from TOraDataSetOptions) | Used to treat all RAW fields as being of string datatype.
ReflectChangeNotify (inherited from TOraDataSetOptions) | Used for a dataset component to refresh its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.
RemoveOnRefresh (inherited from TDADataSetOptions) | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields (inherited from TDADataSetOptions) | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams (inherited from TDADataSetOptions) | Used to return the new value of fields to dataset after insert or update.
ScrollableCursor (inherited from TOraDataSetOptions) | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.
SetFieldsReadOnly (inherited from TDADataSetOptions) | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate (inherited from TDADataSetOptions) | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TemporaryLobUpdate (inherited from TOraDataSetOptions) | Temporary LOBs are used to write input and input/output LOB parameters into database when executing dataset's SQL statements.
TrimFixedChar (inherited from TDADataSetOptions) | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields (inherited from TDADataSetOptions) | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize (inherited from TDADataSetOptions) | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.


TSmartQueryOptions Properties

TSmartQueryOptions Properties

Properties of the TSmartQueryOptions class.

For a complete list of the TSmartQueryOptions class members, see the TSmartQueryOptions Members topic.

Public

Name | Description
AutoPrepare (inherited from TDADataSetOptions) | Used to execute automatic TCustomDADataSet.Prepare on the query execution.
CacheCalcFields (inherited from TDADataSetOptions) | Used to enable caching of the TField.Calculated and TField.Lookup fields.
DetailDelay (inherited from TDADataSetOptions) | Used to get or set a delay in milliseconds before refreshing detail dataset while navigating master dataset.
FieldsOrigin (inherited from TDADataSetOptions) | Used for TCustomDADataSet to fill the Origin property of the TField objects by appropriate value when opening a dataset.
FlatBuffers (inherited from TDADataSetOptions) | Used to control how a dataset treats data of the ftString and ftVarBytes fields.
LocalMasterDetail (inherited from TDADataSetOptions) | Used for TCustomDADataSet to use local filtering to establish master/detail relationship for detail dataset and does not refer to the server.
LongStrings (inherited from TDADataSetOptions) | Used to represent string fields with the length that is greater than 255 as TStringField.
NumberRange (inherited from TDADataSetOptions) | Used to set the MaxValue and MinValue properties of TIntegerField and TFloatField to appropriate values.
QueryRecCount (inherited from TDADataSetOptions) | Used for TCustomDADataSet to perform additional query to get the record count for this SELECT, so the RecordCount property reflects the actual number of records.
RemoveOnRefresh (inherited from TDADataSetOptions) | Used for a dataset to locally remove a record that can not be found on the server.
RequiredFields (inherited from TDADataSetOptions) | Used for TCustomDADataSet to set the Required property of the TField objects for the NOT NULL fields.
ReturnParams (inherited from TDADataSetOptions) | Used to return the new value of fields to dataset after insert or update.
SetFieldsReadOnly (inherited from TDADataSetOptions) | Used for a dataset to set the ReadOnly property to True for all fields that do not belong to UpdatingTable or can not be updated.
StrictUpdate (inherited from TDADataSetOptions) | Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.
TrimFixedChar (inherited from TDADataSetOptions) | Specifies whether to discard all trailing spaces in the string fields of a dataset.
UpdateAllFields (inherited from TDADataSetOptions) | Used to iclude all dataset fields in the generated UPDATE and INSERT statements.
UpdateBatchSize (inherited from TDADataSetOptions) | Used to get or set a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

Published

Name | Description
AutoClose (inherited from TOraDataSetOptions) | Used to close OCI cursor after fetching all rows.
CacheLobs (inherited from TOraDataSetOptions) | Used to allocate local memory buffer to hold a copy of the Lob content.
DefaultValues (inherited from TOraDataSetOptions) | Used for TOraDataSet to fill the DefaultExpression property of TField objects by appropriate value.
DeferredLobRead (inherited from TOraDataSetOptions) | Used to fetch all Oracle 8 Lob values when they are explicitly requested.
ExtendedFieldsInfo (inherited from TOraDataSetOptions) | Used to perform an additional query to get information about returned fields and the tables they belong to.
FieldsAsString (inherited from TOraDataSetOptions) | Used to treat all non-BLOB fields as being of string datatype.
FullRefresh (inherited from TOraDataSetOptions) | Used to refresh fields of all tables by the RefreshRecord method.
KeepPrepared (inherited from TOraDataSetOptionsDS) | Used to keep TOraDataSet prepared after closing.
PrefetchRows (inherited from TOraDataSetOptions) | Used to get or set the number of rows that OCI prefetches when executing a query.
PrepareUpdateSQL (inherited from TOraDataSetOptions) | Used to automatically prepare update queries before execution.
QuoteNames | Used for TCustomSmartQuery to quote all database object names in autogenerated SQL statements.
RawAsString (inherited from TOraDataSetOptions) | Used to treat all RAW fields as being of string datatype.
ReflectChangeNotify (inherited from TOraDataSetOptions) | Used for a dataset component to refresh its data when it gets database change notification messages in response to DML or DDL changes on the objects associated with the dataset query.
ScrollableCursor (inherited from TOraDataSetOptions) | Used for TOraDataSet to use scrollable server cursor (available since Oracle 9 only) instead of caching data on the client side.
TemporaryLobUpdate (inherited from TOraDataSetOptions) | Temporary LOBs are used to write input and input/output LOB parameters into database when executing dataset's SQL statements.

See Also

  • TSmartQueryOptions Class
  • TSmartQueryOptions Class Members


TSmartQueryOptions.QuoteNames Property

TSmartQueryOptions.QuoteNames Property

Used for TCustomSmartQuery to quote all database object names in autogenerated SQL statements.

Class

TSmartQueryOptions

Syntax

property QuoteNames: boolean;

Remarks

If the QuoteNames property is set to True, TCustomSmartQuery quotes all database object names in autogenerated SQL statements such as update SQL.


Enumerations in OraSmart

Enumerations in OraSmart

Enumerations in the OraSmart unit.

Enumerations

Name | Description
TSmartState | Specifies if TCustomSmartQuery is in view mode.


TSmartState Enumeration

TSmartState Enumeration

Specifies if TCustomSmartQuery is in view mode.

Unit

OraSmart

Syntax

TSmartState = (dsView);

Values

Value | Meaning
dsView | TCustomSmartQuery is in view mode.

Remarks

Check the SmartState property to learn whether TCustomSmartQuery is in view mode.

TCustomSmartQuery is in view mode (SmartState is dsView) after calling View method.


OraSQLMonitor Unit Members

OraSQLMonitor Unit Members

This unit contains implementation of the TOraSQLMonitor component.

Classes

Name | Description
TOraSQLMonitor | This component serves for monitoring dynamic SQL execution in ODAC-based applications.


Classes in OraSQLMonitor

Classes in OraSQLMonitor

Classes in the OraSQLMonitor unit.

Classes

Name | Description
TOraSQLMonitor | This component serves for monitoring dynamic SQL execution in ODAC-based applications.


TOraSQLMonitor Class

TOraSQLMonitor Class

This component serves for monitoring dynamic SQL execution in ODAC-based applications.

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

Unit

OraSQLMonitor

Syntax

TOraSQLMonitor = class(TCustomDASQLMonitor);

Remarks

Use TOraSQLMonitor to monitor dynamic SQL execution in ODAC-based applications. TOraSQLMonitor provides two ways of displaying debug information: with dialog window, Using DBMonitor or Borland SQL Monitor. Furthermore to receive debug information the TCustomDASQLMonitor.OnSQL event can be used. Also it is possible to use all these ways at the same time, though an application may have only one TOraSQLMonitor object. If an application has no TOraSQLMonitor instance, the Debug window is available to display SQL statements to be sent.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TCustomDASQLMonitor
TOraSQLMonitor

See Also

  • TCustomDADataSet.Debug
  • TCustomDASQL.Debug
  • Using DBMonitor


TOraSQLMonitor Members

TOraSQLMonitor Members

TOraSQLMonitor class overview.

Properties

Name | Description
Active (inherited from TCustomDASQLMonitor) | Used to activate monitoring of SQL.
Options (inherited from TCustomDASQLMonitor) | Used to include the desired properties for TCustomDASQLMonitor.
TraceFlags (inherited from TCustomDASQLMonitor) | Used to specify which database operations the monitor should track in an application at runtime.

Events

Name | Description
OnSQL (inherited from TCustomDASQLMonitor) | Occurs when tracing of SQL activity on database components is needed.


OraTransaction Unit Members

OraTransaction Unit Members

This unit contains implementation of the TOraTransaction component.

Classes

Name | Description
TOraTransaction | A component for managing transactions in an application.

Enumerations

Name | Description
TGlobalCoordinator | Specifies with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.


Classes in OraTransaction

Classes in OraTransaction

Classes in the OraTransaction unit.

Classes

Name | Description
TOraTransaction | A component for managing transactions in an application.


TOraTransaction Class

TOraTransaction Class

A component for managing transactions in an application.

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

Unit

OraTransaction

Syntax

TOraTransaction = class(TDATransaction);

Remarks

The TOraTransaction component is used to provide discrete transaction control over connection. It can be used for manipulating simple local and global transactions.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDATransaction
TOraTransaction

See Also

  • Transaction demo project
  • Working with TOraTransaction Component
  • TCustomDAConnection.StartTransaction
  • TCustomDAConnection.Commit
  • TCustomDAConnection.Rollback
  • Working with TOraTransaction Component


TOraTransaction Members

TOraTransaction Members

TOraTransaction class overview.

Properties

Name | Description
Active | Used to indicate whether the transaction is active or not.
BranchQualifiers | Used to represent branch qualifier part of XID for transaction branches.
DefaultCloseAction (inherited from TDATransaction) | Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.
DefaultSession | Used to specify the session for performing the transaction.
GlobalCoordinator | Used to determine with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.
InactiveTimeOut | Used to specify the waiting time before deleting inactive transaction branch.
IsolationLevel | Used to specify how the transactions containing database modifications are handled.
ResumeTimeOut | Used to set the wait time to resume the transaction branch if it is used by another session.
Sessions | Used to specify a session for the given index.
SessionsCount | Used to provide the number of sessions associated with the transaction component.
TransactionId | Used to represent global transaction identifier.
TransactionName | Used to assign a name to the current transaction.

Methods

Name | Description
AddSession | Overloaded. Associates a TOraSession component with the transaction component.
ClearSessions | Disassociates the transaction component from all its session components.
Commit (inherited from TDATransaction) | Commits the current transaction.
Detach | Deactivates a transaction.
RemoveSession | Disassociates the specified session from the transaction.
Resume | Resumes a detached transaction.
Rollback (inherited from TDATransaction) | Discards all modifications of data associated with the current transaction and ends the transaction.
RollbackToSavepoint | Discards all modifications made during the current transaction and restores its state to the moment of the savepoint.
Savepoint | Defines a savepoint in the transaction.
StartTransaction | Overloaded. Begins a new user transaction against the database server.

Events

Name | Description
OnError | Occurs for processing errors that can be arised during executing transaction and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT and others.


TOraTransaction Properties

TOraTransaction Properties

Properties of the TOraTransaction class.

For a complete list of the TOraTransaction class members, see the TOraTransaction Members topic.

Public

Name | Description
Active | Used to indicate whether the transaction is active or not.
BranchQualifiers | Used to represent branch qualifier part of XID for transaction branches.
Commit (inherited from TDATransaction) | Commits the current transaction.
DefaultCloseAction (inherited from TDATransaction) | Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.
OnError (inherited from TDATransaction) | Used to process errors that occur during executing a transaction.
Rollback (inherited from TDATransaction) | Discards all modifications of data associated with the current transaction and ends the transaction.
Sessions | Used to specify a session for the given index.
SessionsCount | Used to provide the number of sessions associated with the transaction component.
StartTransaction (inherited from TDATransaction) | Begins a new transaction.
TransactionId | Used to represent global transaction identifier.

Published

Name | Description
DefaultSession | Used to specify the session for performing the transaction.
GlobalCoordinator | Used to determine with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.
InactiveTimeOut | Used to specify the waiting time before deleting inactive transaction branch.
IsolationLevel | Used to specify how the transactions containing database modifications are handled.
ResumeTimeOut | Used to set the wait time to resume the transaction branch if it is used by another session.
TransactionName | Used to assign a name to the current transaction.

See Also

  • TOraTransaction Class
  • TOraTransaction Class Members


TOraTransaction.Active Property

TOraTransaction.Active Property

Used to indicate whether the transaction is active or not.

Class

TOraTransaction

Syntax

property Active: boolean;

Remarks

Use the Active property to indicate whether the transaction is active or not.


TOraTransaction.BranchQualifiers Property(Indexer)

TOraTransaction.BranchQualifiers Property(Indexer)

Used to represent branch qualifier part of XID for transaction branches.

Class

TOraTransaction

Syntax

property BranchQualifiers[Index: integer]: TBytes;

Parameters
Index
Holds a branch qualifier index.

Remarks

Use the BranchQualifiers property to represent a branch qualifier part of XID for transaction branches.


TOraTransaction.DefaultSession Property

TOraTransaction.DefaultSession Property

Used to specify the session for performing the transaction.

Class

TOraTransaction

Syntax

property DefaultSession: TOraSession;

Remarks

Use the DefaultSession property to specify the session which is used to perform the transaction. For distributed transactions use the TOraTransaction.AddSession method instead.

See Also

  • TOraTransaction.AddSession


TOraTransaction.GlobalCoordinator Property

TOraTransaction.GlobalCoordinator Property

Used to determine with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.

Class

TOraTransaction

Syntax

property GlobalCoordinator: TGlobalCoordinator default gcInternal;

Remarks

Use the GlobalCoordinator property to determine with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.


TOraTransaction.InactiveTimeOut Property

TOraTransaction.InactiveTimeOut Property

Used to specify the waiting time before deleting inactive transaction branch.

Class

TOraTransaction

Syntax

property InactiveTimeOut: integer default 0;

Remarks

Use the InactiveTimeOut property to set for server the time to wait before deleting inactive transaction branch.


TOraTransaction.IsolationLevel Property

TOraTransaction.IsolationLevel Property

Used to specify how the transactions containing database modifications are handled.

Class

TOraTransaction

Syntax

property IsolationLevel: TOraIsolationLevel default ilReadCommitted;

Remarks

Use the IsolationLevel property to specify how the transactions containing database modifications are handled.


TOraTransaction.ResumeTimeOut Property

TOraTransaction.ResumeTimeOut Property

Used to set the wait time to resume the transaction branch if it is used by another session.

Class

TOraTransaction

Syntax

property ResumeTimeOut: integer default 0;

Remarks

Use the ResumeTimeOut property for setting the wait time to resume the transaction branch if it is used by another session.

See Also

  • Resume


TOraTransaction.Sessions Property(Indexer)

TOraTransaction.Sessions Property(Indexer)

Used to specify a session for the given index.

Class

TOraTransaction

Syntax

property Sessions[Index: integer]: TOraSession;

Parameters
Index
Holds the index to specify a session for.

Remarks

Use the Sessions property to specify a session for the given index.

See Also

  • SessionsCount
  • RemoveSession
  • TOraTransaction.AddSession


TOraTransaction.SessionsCount Property

TOraTransaction.SessionsCount Property

Used to provide the number of sessions associated with the transaction component.

Class

TOraTransaction

Syntax

property SessionsCount: integer;

Remarks

Use the SessionsCount property to get the number of sessions associated with the transaction component.

See Also

  • Sessions
  • RemoveSession
  • TOraTransaction.AddSession


TOraTransaction.TransactionId Property

TOraTransaction.TransactionId Property

Used to represent global transaction identifier.

Class

TOraTransaction

Syntax

property TransactionId: TBytes;

Remarks

Use the TransactionId property to represent global transaction identifier which is the part of XID. Server associates it with local transaction.


TOraTransaction.TransactionName Property

TOraTransaction.TransactionName Property

Used to assign a name to the current transaction.

Class

TOraTransaction

Syntax

property TransactionName: string;

Remarks

Use the TransactionName property to assign a name to the current transaction. This parameter is useful in distributed database environments when you have to identify and resolve in-doubt transactions. The text string is limited to 255 bytes.


TOraTransaction Methods

TOraTransaction Methods

Methods of the TOraTransaction class.

For a complete list of the TOraTransaction class members, see the TOraTransaction Members topic.

Public

Name | Description
Active (inherited from TDATransaction) | Used to determine if the transaction is active.
AddSession | Overloaded. Associates a TOraSession component with the transaction component.
ClearSessions | Disassociates the transaction component from all its session components.
Commit (inherited from TDATransaction) | Commits the current transaction.
DefaultCloseAction (inherited from TDATransaction) | Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.
Detach | Deactivates a transaction.
OnError (inherited from TDATransaction) | Used to process errors that occur during executing a transaction.
RemoveSession | Disassociates the specified session from the transaction.
Resume | Resumes a detached transaction.
Rollback (inherited from TDATransaction) | Discards all modifications of data associated with the current transaction and ends the transaction.
RollbackToSavepoint | Discards all modifications made during the current transaction and restores its state to the moment of the savepoint.
Savepoint | Defines a savepoint in the transaction.
StartTransaction | Overloaded. Begins a new user transaction against the database server.

See Also

  • TOraTransaction Class
  • TOraTransaction Class Members


TOraTransaction.AddSession Overload

TOraTransaction.AddSession Overload

Associates a TOraSession component with the transaction component.

Class

TOraTransaction

Overload List

Name | Description
AddSession(Session: TOraSession) | Associates a TOraSession component with the transaction component.
AddSession(Session: TOraSession; BranchQualifier: TBytes) | Associates a TOraSession component with the transaction component.


TOraTransaction.AddSession Method

TOraTransaction.AddSession Method

Associates a TOraSession component with the transaction component.

Class

TOraTransaction

Syntax

procedure AddSession(Session: TOraSession); overload

Parameters
Session
Holds a TOraSession component

Remarks

Call the AddSession method to associate a TOraSession component with the transaction component.


TOraTransaction.AddSession Method

TOraTransaction.AddSession Method

Associates a TOraSession component with the transaction component.

Class

TOraTransaction

Syntax

procedure AddSession(Session: TOraSession; BranchQualifier: TBytes); overload

Parameters
Session
Holds a TOraSession component
BranchQualifier
Holds a branch qualifier.

See Also

  • TOraTransaction.Sessions
  • TOraTransaction.RemoveSession
  • TOraTransaction.ClearSessions


TOraTransaction.ClearSessions Method

TOraTransaction.ClearSessions Method

Disassociates the transaction component from all its session components.

Class

TOraTransaction

Syntax

procedure ClearSessions;

Remarks

Call the ClearSessions method to disassociate the transaction component from all its session components.

See Also

  • Sessions
  • AddSession
  • RemoveSession


TOraTransaction.Detach Method

TOraTransaction.Detach Method

Deactivates a transaction.

Class

TOraTransaction

Syntax

procedure Detach;

Remarks

Call the Detach method to make a transaction inactive.

See Also

  • Resume


TOraTransaction.RemoveSession Method

TOraTransaction.RemoveSession Method

Disassociates the specified session from the transaction.

Class

TOraTransaction

Syntax

procedure RemoveSession(Session: TOraSession);

Parameters
Session
Holds a TOraSession object.

Remarks

Call the RemoveSession method to disassociate the specified session from the transaction.

See Also

  • Sessions
  • TOraTransaction.AddSession
  • ClearSessions


TOraTransaction.Resume Method

TOraTransaction.Resume Method

Resumes a detached transaction.

Class

TOraTransaction

Syntax

procedure Resume;

Remarks

Call the Resume method to resume a detached transaction.

See Also

  • ResumeTimeOut
  • Detach


TOraTransaction.RollbackToSavepoint Method

TOraTransaction.RollbackToSavepoint Method

Discards all modifications made during the current transaction and restores its state to the moment of the savepoint.

Class

TOraTransaction

Syntax

procedure RollbackToSavepoint(const Savepoint: string);

Parameters
Savepoint
Holds the name of the savepoint.

Remarks

Call the RollbackToSavepoint method to cancel all updates for the current transaction and restore its state up to the moment of the last defined savepoint.

See Also

  • Savepoint
  • TDATransaction.Rollback


TOraTransaction.Savepoint Method

TOraTransaction.Savepoint Method

Defines a savepoint in the transaction.

Class

TOraTransaction

Syntax

procedure Savepoint(const Savepoint: string);

Parameters
Savepoint
Holds the savepoint name that identifies the savepoint.

Remarks

Call the Savepoint method to define a point in the transaction to which you can roll back later. As the parameter, you can pass any valid name to identify the savepoint.

To roll back to the last savepoint call RollbackToSavepoint.

See Also

  • RollbackToSavepoint


TOraTransaction.StartTransaction Overload

TOraTransaction.StartTransaction Overload

Begins a new user transaction against the database server.

Class

TOraTransaction

Overload List

Name | Description
StartTransaction | Begins a new user transaction against the database server.
StartTransaction(Resume: boolean) | Begins a new user transaction against the database server.


TOraTransaction.StartTransaction Method

TOraTransaction.StartTransaction Method

Begins a new user transaction against the database server.

Class

TOraTransaction

Syntax

procedure StartTransaction; overload; override


TOraTransaction.StartTransaction Method

TOraTransaction.StartTransaction Method

Begins a new user transaction against the database server.

Class

TOraTransaction

Syntax

procedure StartTransaction(Resume: boolean); reintroduce; overload

Parameters
Resume
True, if detached transaction branches will be resumed on sessions. False otherwise.

Remarks

Call the StartTransaction method to begin a new user transaction against the database server. Before calling StartTransaction, an application should check the status of the TOraTransaction.Active property. If TOraTransaction.Active is True, it indicates that a transaction is already in progress, a subsequent call to StartTransaction without first calling TDATransaction.Commit or TDATransaction.Rollback to end the current transaction raises EDatabaseError. Calling StartTransaction when connection is closed also raises EDatabaseError.

Updates, insertions, and deletions that take place after a call to StartTransaction are held by the server until an application calls Commit to save the changes or Rollback to cancel them.

Setting the Resume parameter to True means detached transaction branches will be resumed on sessions.


TOraTransaction Events

TOraTransaction Events

Events of the TOraTransaction class.

For a complete list of the TOraTransaction class members, see the TOraTransaction Members topic.

Public

Name | Description
Active (inherited from TDATransaction) | Used to determine if the transaction is active.
Commit (inherited from TDATransaction) | Commits the current transaction.
DefaultCloseAction (inherited from TDATransaction) | Used to specify the transaction behaviour when it is destroyed while being active, or when one of its connections is closed with the active transaction.
Rollback (inherited from TDATransaction) | Discards all modifications of data associated with the current transaction and ends the transaction.
StartTransaction (inherited from TDATransaction) | Begins a new transaction.

Published

Name | Description
OnError | Occurs for processing errors that can be arised during executing transaction and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT and others.

See Also

  • TOraTransaction Class
  • TOraTransaction Class Members


TOraTransaction.OnError Event

TOraTransaction.OnError Event

Occurs for processing errors that can be arised during executing transaction and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT and others.

Class

TOraTransaction

Syntax

property OnError: TDATransactionErrorEvent;

Remarks

Write the OnError event handler to process errors that occur during executing transaction and savepoint control statements such as COMMIT, ROLLBACK, SAVEPOINT, RELEASE SAVEPOINT and others. Check the E parameter to get an error code.


Enumerations in OraTransaction

Enumerations in OraTransaction

Enumerations in the OraTransaction unit.

Enumerations

Name | Description
TGlobalCoordinator | Specifies with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.


TGlobalCoordinator Enumeration

TGlobalCoordinator Enumeration

Specifies with what distributed transaction, perform two-phase commit or rollback on all sessions will be coordinated.

Unit

OraTransaction

Syntax

TGlobalCoordinator = (gcInternal, gcMTS);

Values

Value | Meaning
gcInternal | Transaction will be coordinated by the transaction component internally.
gcMTS | Transaction will be coordinated by Microsoft Transaction Server DTC.


VirtualTable Unit Members

VirtualTable Unit Members

This unit contains implementation of the TVirtualTable component.

Classes

Name | Description
TVirtualTable | A base class for storing data in memory.

Types

Name | Description
TVirtualTableOptions | Represents the set of TVirtualTableOption.

Enumerations

Name | Description
TVirtualTableOption | Specifies the actions to take on fields data at the time of opening or closing TVirtualTable dataset.


Classes in VirtualTable

Classes in VirtualTable

Classes in the VirtualTable unit.

Classes

Name | Description
TVirtualTable | A base class for storing data in memory.


TVirtualTable Class

TVirtualTable Class

A base class for storing data in memory.

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

Unit

VirtualTable

Syntax

TVirtualTable = class(TMemDataSet);

Remarks

TVirtualTable is inherited from the TMemDataSet component. TVirtualTable stores data in memory and does not have linked data files. To add fields to virtual table at design time use Fields Editor. Call the TVirtualTable.AddField method to add fields at run time.

Immediately after creating, virtual table will be empty. Then you define new fields or load existing table files so that the virtual table object becomes initialized and ready to be opened.

When you close virtual table it will discard its record set. To keep the data you entered at design-time for later use you may wish to include the voStored option in the TVirtualTable.Options property. At run time you will need to call the TVirtualTable.SaveToFile method explicitly to store modifications to the file that may be retrieved back into the virtual table by calling the TVirtualTable.LoadFromFile method later.

Note: TVirtualTable component is added to the Data Access page of the component palette, not to the Oracle Access page.

Inheritance Hierarchy

TObject
TPersistent
TComponent
TDataSet
TMemDataSet
TVirtualTable


TVirtualTable Members

TVirtualTable Members

TVirtualTable class overview.

Properties

Name | Description
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Options | Used to specify actions to take on the fields data at the time of opening or closing TVirtualTable dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.

Methods

Name | Description
AddField | Adds a new TFieldDef object with the name determined by Name.
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
Assign | Copies fields and data from another TDataSet component.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
Clear | Removes all records from TVirtualTable.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteField | Deletes a field specified by name.
DeleteFields | Deletes all fields.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
LoadFromFile | Loads data from file into a TVirtualTable component.
LoadFromStream | Copies data of a stream into a TVirtualTable component.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToFile | Saves data of a TVirtualTable component to a file.
SaveToStream | Copies data from a TVirtualTable component to a stream.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Events

Name | Description
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.


TVirtualTable Properties

TVirtualTable Properties

Properties of the TVirtualTable class.

For a complete list of the TVirtualTable class members, see the TVirtualTable Members topic.

Public

Name | Description
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

Published

Name | Description
Options | Used to specify actions to take on the fields data at the time of opening or closing TVirtualTable dataset.

See Also

  • TVirtualTable Class
  • TVirtualTable Class Members


TVirtualTable.Options Property

TVirtualTable.Options Property

Used to specify actions to take on the fields data at the time of opening or closing TVirtualTable dataset.

Class

TVirtualTable

Syntax

property Options: TVirtualTableOptions default [voPersistentData, voStored];

Remarks

The Options property specifies what actions to take on the fields data at the time of opening or closing TVirtualTable dataset.


TVirtualTable Methods

TVirtualTable Methods

Methods of the TVirtualTable class.

For a complete list of the TVirtualTable class members, see the TVirtualTable Members topic.

Public

Name | Description
AddField | Adds a new TFieldDef object with the name determined by Name.
ApplyUpdates (inherited from TMemDataSet) | Writes dataset's pending cached updates to a database.
Assign | Copies fields and data from another TDataSet component.
CachedUpdates (inherited from TMemDataSet) | Used to enable or disable the use of cached updates for a dataset.
CancelUpdates (inherited from TMemDataSet) | Clears all pending cached updates from cache and restores dataset in its prior state.
Clear | Removes all records from TVirtualTable.
CommitUpdates (inherited from TMemDataSet) | Clears the cached updates buffer.
DeferredPost (inherited from TMemDataSet) | Makes permanent changes to the database server.
DeleteField | Deletes a field specified by name.
DeleteFields | Deletes all fields.
GetBlob (inherited from TMemDataSet) | Overloaded. Retrieves TBlob object for a field or current record when only its name or the field itself is known.
IndexFieldNames (inherited from TMemDataSet) | Used to get or set the list of fields on which the recordset is sorted.
LoadFromFile | Loads data from file into a TVirtualTable component.
LoadFromStream | Copies data of a stream into a TVirtualTable component.
LocalConstraints (inherited from TMemDataSet) | Used to avoid setting the Required property of a TField component for NOT NULL fields at the time of opening TMemDataSet.
LocalUpdate (inherited from TMemDataSet) | Used to prevent implicit update of rows on database server.
Locate (inherited from TMemDataSet) | Overloaded. Searches a dataset for a specific record and positions the cursor on it.
LocateEx (inherited from TMemDataSet) | Overloaded. Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet.
OnUpdateError (inherited from TMemDataSet) | Occurs when an exception is generated while cached updates are applied to a database.
OnUpdateRecord (inherited from TMemDataSet) | Occurs when a single update component can not handle the updates.
Prepare (inherited from TMemDataSet) | Allocates resources and creates field components for a dataset.
Prepared (inherited from TMemDataSet) | Determines whether a query is prepared for execution or not.
RestoreUpdates (inherited from TMemDataSet) | Marks all records in the cache of updates as unapplied.
RevertRecord (inherited from TMemDataSet) | Cancels changes made to the current record when cached updates are enabled.
SaveToFile | Saves data of a TVirtualTable component to a file.
SaveToStream | Copies data from a TVirtualTable component to a stream.
SaveToXML (inherited from TMemDataSet) | Overloaded. Saves the current dataset data to a file or a stream in the XML format compatible with ADO format.
UnPrepare (inherited from TMemDataSet) | Frees the resources allocated for a previously prepared query on the server and client sides.
UpdateRecordTypes (inherited from TMemDataSet) | Used to indicate the update status for the current record when cached updates are enabled.
UpdateResult (inherited from TMemDataSet) | Reads the status of the latest call to the ApplyUpdates method while cached updates are enabled.
UpdatesPending (inherited from TMemDataSet) | Used to check the status of the cached updates buffer.
UpdateStatus (inherited from TMemDataSet) | Indicates the current update status for the dataset when cached updates are enabled.

See Also

  • TVirtualTable Class
  • TVirtualTable Class Members


TVirtualTable.AddField Method

TVirtualTable.AddField Method

Adds a new TFieldDef object with the name determined by Name.

Class

TVirtualTable

Syntax

procedure AddField(Name: string; FieldType: TFieldType; Size: integer = 0; Required: boolean = False);

Parameters
Name
Holds the name of the TFieldDef object to add.
FieldType
Holds the type of the TFieldDef object to add.
Size
Holds the size of the string (if the type of TFieldDef object was specifiad as ftString or ftWideString).
Required
Holds an indicator that determines whether filling the Size parameter is required.

Remarks

Call the AddField method to add a new TFieldDef object with the name determined by Name. FieldType can be ftString, ftWideString, ftSmallint, ftInteger, ftAutoInc, ftWord, ftBoolean, ftLargeint, ftFloat, ftCurrency, ftDate, ftTime, ftDateTime, ftBlob, or ftMemo. When you add ftString or ftWideString field you should specify Size of the string.

Example

VirtualTable1.AddField('CODE', ftInteger, 0);
VirtualTable1.AddField('NAME', ftString, 30);

See Also

  • DeleteField
  • DeleteFields


TVirtualTable.Assign Method

TVirtualTable.Assign Method

Copies fields and data from another TDataSet component.

Class

TVirtualTable

Syntax

procedure Assign(Source: TPersistent); override;

Parameters
Source
Holds the TDataSet component to copy fields and data from.

Remarks

Call the Assign method to copy fields and data from another TDataSet component.

Note: Unsupported field types are skipped (i.e. destination dataset will contain less fields than the source one). This may happen when Source is not a TVirtualTable component but some SQL server oriented dataset.

Example

OraQuery1.SQL.Text := 'SELECT * FROM DEPT';
OraQuery1.Active := True;
VirtualTable1.Assign(OraQuery1);
VirtualTable1.Active := True;

See Also

  • TVirtualTable


TVirtualTable.Clear Method

TVirtualTable.Clear Method

Removes all records from TVirtualTable.

Class

TVirtualTable

Syntax

procedure Clear;

Remarks

Call the Clear method to remove all records from TVirtualTable.


TVirtualTable.DeleteField Method

TVirtualTable.DeleteField Method

Deletes a field specified by name.

Class

TVirtualTable

Syntax

procedure DeleteField(Name: string);

Parameters
Name
Holds the name of the field to delete.

Remarks

Call the DeleteField method to delete a field specified by Name.

See Also

  • AddField
  • DeleteFields


TVirtualTable.DeleteFields Method

TVirtualTable.DeleteFields Method

Deletes all fields.

Class

TVirtualTable

Syntax

procedure DeleteFields;

Remarks

Call the DeleteFields method to delete all fields.

See Also

  • DeleteField


TVirtualTable.LoadFromFile Method

TVirtualTable.LoadFromFile Method

Loads data from file into a TVirtualTable component.

Class

TVirtualTable

Syntax

procedure LoadFromFile(const FileName: string);

Parameters
FileName
Holds the name of the file to load data from.

Remarks

Call the LoadFromFile method to load data from file into a TVirtualTable component. Specify the name of the file to load into the field as the value of the FileName parameter.This file may be an XML document in ADO-compatible format or in virtual table data format. File format will be detected automatically.


TVirtualTable.LoadFromStream Method

TVirtualTable.LoadFromStream Method

Copies data of a stream into a TVirtualTable component.

Class

TVirtualTable

Syntax

procedure LoadFromStream(Stream: TStream; LoadFields: boolean = True);

Parameters
Stream
Holds the stream from which the field's value is copied.
LoadFields
Indicates whether to load fields from the stream.

Remarks

Call the LoadFromStream method to copy data of a stream into a TVirtualTable component. Specify the stream from which the field's value is copied as the value of the Stream parameter. Data in the stream may be in ADO-compatible format or in virtual table data format. Data format will be detected automatically.


TVirtualTable.SaveToFile Method

TVirtualTable.SaveToFile Method

Saves data of a TVirtualTable component to a file.

Class

TVirtualTable

Syntax

procedure SaveToFile(const FileName: string);

Parameters
FileName
Holds the name of the file to save data to.

Remarks

Call the SaveToFile method to save data of a TVirtualTable component to a file. Specify the name of the file as the value of the FileName parameter.


TVirtualTable.SaveToStream Method

TVirtualTable.SaveToStream Method

Copies data from a TVirtualTable component to a stream.

Class

TVirtualTable

Syntax

procedure SaveToStream(Stream: TStream; StoreFields: boolean = True);

Parameters
Stream
Holds the name of the stream to which the field's value is saved.
StoreFields
Indicates whether to save the fields names to a file.

Remarks

Call the SaveToStream method to copy data from a TVirtualTable component to a stream. Specify the name of the stream to which the field's value is saved as the value of the Stream parameter.


Types in VirtualTable

Types in VirtualTable

Types in the VirtualTable unit.

Types

Name | Description
TVirtualTableOptions | Represents the set of TVirtualTableOption.


TVirtualTableOptions Set

TVirtualTableOptions Set

Represents the set of TVirtualTableOption.

Unit

VirtualTable

Syntax

TVirtualTableOptions = set of TVirtualTableOption;


Enumerations in VirtualTable

Enumerations in VirtualTable

Enumerations in the VirtualTable unit.

Enumerations

Name | Description
TVirtualTableOption | Specifies the actions to take on fields data at the time of opening or closing TVirtualTable dataset.


TVirtualTableOption Enumeration

TVirtualTableOption Enumeration

Specifies the actions to take on fields data at the time of opening or closing TVirtualTable dataset.

Unit

VirtualTable

Syntax

TVirtualTableOption = (voPersistentData, voStored);

Values

Value | Meaning
voPersistentData | Dataset will not dispose of its data at the time of dataset closing.
voStored | Dataset will keep its data set at design-time in DFM file along with other form's stored properties.


MemUtils Unit Members

MemUtils Unit Members

This unit contains auxiliary procedures and functions used in the DAC code.

Unit

Syntax

© 1997-2009 Devart. All Rights Reserved.


TCustomOraQuery.SQLLock

TCustomOraQuery.SQLLock

Used to specify a SQL statement to be used for blocking record by the TCustomDADataSet.Lock procedure.

Unit

Syntax

Remarks

Use the SQLLock property to specify a SQL statement that will be used for blocking record by the TCustomDADataSet.Lock procedure.

To create a SQLLock statement at the design time, use the query statements editor.

Example

SELECT * FROM Scott.Dept
   WHERE
      DEPTNO = :OLD_DEPTNO
   for UPDATE NOWAIT

See Also

  • TCustomDADataSet.Lock
  • TOraDataSet.LockMode
  • TCustomDADataSet.SQLInsert
  • TCustomDADataSet.SQLUpdate
  • TCustomDADataSet.SQLDelete


[%Title%]

[!-MySQL,UniDAC:[!DBMS] Data Access Components][!MySQL:Data Access Components for MySQL][!UniDAC:Universal Data Access Components] Send comments on this topic
[%Title%]
© [%CopyrightYears%] Devart. All Rights Reserved.