UniDAC includes a number of demo projects that show off the main UniDAC functionality and development patterns.
UniDAC demo projects consist of one large project called UniDACDemo with demos for all main UniDAC components, use cases, and data access technologies, and a number of smaller projects on how to use UniDAC in different IDEs and how to integrate UniDAC with third-party components.
Most demo projects are built for Delphi. There are only two UniDAC demos for C++Builder. However, the C++Builder distribution includes source code for all other demo projects as well.
In most cases all UniDAC demo projects are located in "%UniDAC%\Demos\".
In Delphi 2007 for Win32 under Windows Vista all UniDAC demo projects are located in "My Documents\Devart\UniDAC for Delphi 2007\Demos", for example, "C:\Documents and Settings\All Users\Documents\Devart\UniDAC 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 follows.
|—UniDACDemo [The main UniDAC demo project]
|—Performance [Demo project, that compares performance of UniDAC with another components (BDE, ADO, dbExpress)]
| |— [A collection of demo projects on integration with third-party components]
|— [Some other demo projects on design technologies]
UniDACDemo is the main demo project that shows off all the UniDAC functionality. The other directories contain a number of supplementary demo projects that describe special use cases. A list of all samples in the UniDAC demo project and a description for the supplementary projects is provided in the following section.
Note: This documentation describes ALL UniDAC demo projects. The actual demo projects you will have installed on your computer depend on your UniDAC version, UniDAC edition, and the IDE version you are using. The integration demos may require installation of third-party components to compile and work properly.
To explore a UniDAC demo project,
The executed version of the demo will contain a sample application written with UniDAC or a navigable list of samples and sample descriptions. To properly use each sample, you will need to connect to a working server.
The included sample applications are fully functional. To use the demos, you have to first set up a connection to a server. You can do so 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 a demo, click "Drop" to remove all objects used for the demo from your database.
Note: The UniDAC demo directory includes two sample SQL scripts for creating and dropping all test schema objects used in the UniDAC demos. You can modify and execute this script manually, if you like. This will not change the behavior of the demos.
You can find a complete walkthrough for the main UniDAC demo project in the Getting Started topic. Other UniDAC demo projects include a ReadMe file with individual building and launching instructions.
UniDACDemo is one large project which includes two collections of demos.
Working with components
A collection of samples that show how to work with the basic UniDAC components.
A collection of samples that show off the UniDAC technology and demonstrate some ways to work with data.
UniDACDemo can be opened from %UniDAC%\Demos\UniDACDemo\unidacdemo.dpr (.bdsproj, or .dproj). The following table describes all demos contained in this project.
|ConnectDialog||Demonstrates how to customize the UniDAC connect dialog . Changes the standard UniDAC 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 UniDAC connect dialog class.|
|CRDBGrid||Demonstrates how to work with the TCRDBGrid component. Shows off the main TCRDBGrid features, like filtering, searching, stretching, using compound headers, and more.|
|Query||Demonstrates working with
, which is one of the most useful UniDAC components. Includes many TUniQuery usage scenarios. Demonstrates how to execute queries, edit data, and export it to XML files, shows how to perform local filtering, demonstrates several different kinds of record locking and refreshing, and working with FetchAll mode.
Note: This is a very good introductory demo. We recommend starting here when first becoming familiar with UniDAC.
|Sql||Uses TUniSQL to execute SQL statements. Demonstrates how to work with parameters in SQL, prepare SQL statements, and create stored procedures calls by UniDAC means.|
|StoredProc||Uses TUniStoredProc to access editable recordsets in the client application returned from a stored procedure.|
|Table||Demonstrates how to use TUniTable to work with data from a single table on the server without manually writing any SQL queries. Performs server-side data sorting and filtering and retrieves results for browsing and editing.|
|Transaction||Demonstrates the main approaches for setting up distributed transactions with the TUniTransaction component. Shows how to manage transactions, tune the transaction isolation level, and select the coordinator for a distributed transaction.|
|UpdateSQL||Demonstrates using the TUniUpdateSQL component to customize update commands. Lets you optionally use TUniSQL and TUniQuery 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.|
|CachedUpdates||Demonstrates how to perform the most important tasks of working with data in the CachedUpdates mode, including highlighting uncommitted changes, managing transactions, and committing changes in a batch.|
|FilterAndIndex||Demonstrates UniDAC'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 UniDAC 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, by simple fields, and by calculated fields.|
|Pictures||Uses UniDAC functionality to work with BLOB fields and graphics. The sample demonstrates how to retrieve binary data from database and display it on visual components. Sample also shows how to load and save pictures to files and to the database.|
|Text||Uses UniDAC functionality to work with text. The sample demonstrates how to retrieve text data from database and display it on visual components. Sample also shows how to load and save text to files and to the database.|
UniDAC also includes a number of additional demo projects that describe some special use cases, show how to use UniDAC in different IDEs and give examples of how to integrate it with third-party components. These supplementary UniDAC demo projects are sorted into subfolders in the %UniDAC%\Demos\ directory.
|ThirdParty||FastReport||Demonstrates how UniDAC can be used with FastReport components. This project consists of two parts. The first part is several packages that integrate UniDAC components into the FastReport editor. The second part is a demo application that lets you design and preview reports with UniDAC technology in the FastReport editor.|
|InfoPower||Uses InfoPower components to display recordsets retrieved with UniDAC. This demo project displays an InfoPower grid component and fills it with the result of a UniDAC query. Shows how to link UniDAC data sources to InfoPower components.|
|IntraWeb||A collection of sample projects that show how to use UniDAC 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.|
|QuickReport||Lets you launch and view a QuickReport application based on UniDAC. This demo project lets you modify the application in design-time.|
|ReportBuilder||Uses UniDAC data sources to create a ReportBuilder report that takes data from a database. Shows how to set up a ReportBuilder document in design-time and how to integrate UniDAC components into the Report Builder editor to perform document design in run-time.|
|Miscellaneous||CBuilder||A general demo project about how to create UniDAC-based applications with C++Builder. Lets you execute SQL scripts and work with result sets in a grid. This is one of the two UniDAC demos for C++Builder.|
|Dll||Demonstrates creating and loading DLLs for UniDAC-based projects. This demo project consists of two parts - a UniDll project that creates a DLL of a form that sends a query to the server and displays its results, and a UniExe project that can be executed to display a form for loading and running this DLL. Allows you to build a dll for one UniDAC-based project and load and test it from a separate application.|
|FailOver||Demonstrates the recommended approach to working with unstable networks. This sample lets you perform transactions and updates in several different modes, simulate a 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.|
|Midas||Demonstrates using MIDAS technology with UniDAC. 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 interaction to a server application for processing.|
|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.|