LiteDAC

Demo Projects

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

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

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

Where are the LiteDAC demo projects located?

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

In Delphi 2007 for Win32 under Windows Vista all the LiteDAC demo projects are located in "My Documents\Devart\LiteDAC for Delphi 2007\Demos", for example "C:\Documents and Settings\All Users\Documents\Devart\LiteDAC 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.

Demos

|—LiteDACDemo [The main LiteDAC demo project]

|—ThirdParty

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

|—Miscellaneous

   |— [Some other demo projects on design technologies]

 

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

Note: This documentation describes ALL the LiteDAC demo projects. The actual demo projects you will have installed on your computer depends on your LiteDAC version, LiteDAC 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 LiteDAC demo projects

To explore a LiteDAC demo project,

  1. Launch your IDE.
  2. In your IDE, choose File | Open Project from the menu bar.
  3. Find the directory you installed LiteDAC 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 included sample applications are fully functional. To use the demos, you have to first set up a connection to SQLite. 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 the necessary database objects. When you are done with a demo, click "Drop" to remove all the objects used for the demo from your database.

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

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

Demo project descriptions

LiteDACDemo

LiteDACDemo is one large project which includes three collections of demos.

Working with components

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

General demos

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

SQLite-specific demos

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

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

Working with Components

Name Description
ConnectDialog Demonstrates how to customize the LiteDAC connect dialog. Changes the standard LiteDAC connect dialog to a custom connect dialog. The customized sample dialog is inherited from the TForm 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.
CRDBGrid Demonstrates how to work with the TCRDBGrid component. Shows off the main TCRDBGrid features, like filtering, searching, stretching, using compound headers, and more.
Dump Demonstrates how to backup data from tables with the TLiteDump component. Shows how to use scripts created during back up to restore table data. This demo lets you back up a table either by specifying the table name or by writing a SELECT query.
Loader Uses the TLiteLoader component to quickly load data into a server table. This demo also compares the two TLiteLoader data loading handlers: GetColumnData and PutData.
Query Demonstrates working with TLiteQuery, which is one of the most useful LiteDAC components. Includes many TLiteQuery 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 here when first becoming familiar with LiteDAC.

Sql Uses TLiteSQL to execute SQL statements. Demonstrates how to work in a separate thread, in standard mode, in NonBlocking mode, and how to break long-duration query execution.
Table Demonstrates how to use TLiteTable 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.
UpdateSQL Demonstrates using the TLiteUpdateSQL component to customize update commands. Lets you optionally use T:Devart.SQLiteDAC.TLiteCommand and TLiteQuery 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 LiteDAC'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 LiteDAC 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.
Lock Demonstrates the recommended approach for managing transactions with the TLiteConnection component. The TLiteConnection interface provides a wrapper for SQLite server commands like START TRANSACTION, COMMIT, ROLLBACK.

SQLite-specific Demos

Name Description
Pictures Uses LiteDAC functionality to work with graphics. The sample demonstrates how to retrieve binary data from PgSQL server database and display it on visual components. Sample also shows how to load and save pictures to files and to the database.
Text Uses LiteDAC functionality to work with text. The sample demonstrates how to retrieve text data from SQL Server database and display it on visual components. Sample also shows how to load and save text to files and to the database.
Functions Functions Uses LiteDAC functionality to work with SQLite functions. The sample demonstrates how to define custom functions for future use in SQL-statements, how to overload user-defined functions and how to override built-in SQLite functions.

Supplementary Demo Projects

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

Location Name Description
Miscellaneous Dll Demonstrates creating and loading DLLs for LiteDAC-based projects. This demo project consists of two parts - an Pg_Dll project that creates a DLL of a form that sends a query to the server and displays its results, and an Pg_Exe project that can be executed to display a form for loading and running this DLL. Allows you to build a dll for one LiteDAC-based project and load and test it from a separate application.
LiteDACDemo LiteDACDemo [Win32 version of the main LiteDAC demo project - see above]
© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback