ODAC

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 and Embarcadero RAD Studio. 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 the structure will be as following.

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.
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
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]
© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback