UniDAC

Getting Started

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

What is UniDAC?

Universal Data Access Components (UniDAC) is a component library that provides connectivity to Oracle, SQL Server, MySQL, InterBase, Firebird, PostgreSQL, SQLite, DB2, Microsoft Access, Advantage Database Server, Adaptive Server Enterprise, DBF, NexusDB, and other databases (using ODBC provider) for Delphi, C++Builder and Lazarus (FPC), and helps you develop fast cross-database applications with these environments.

Many UniDAC classes are based on VCL, LCL and FMX classes and interfaces. UniDAC is a complete replacement for Borland Database Engine, provides native database connectivity, and is specifically designed as a universal interface to access different kinds of databases.

An introduction to UniDAC is provided in the Overview section.

A list of the UniDAC features you may find useful is listed in the Features section.

An overview of the UniDAC component classes is provided in the Components List section.

Installing UniDAC

To install UniDAC, complete the following steps.

  1. Choose and download the version of the UniDAC installation program that is compatible with your IDE. For instance, if you are installing UniDAC 1.00, you should use the following files:
  2. For BDS 2006 and Turbo - unidac100d10*.exe
    For Delphi 7 - unid100d7*.exe

    For more information, visit the the UniDAC download page.

  3. Close all running IDEs.
  4. Launch the UniDAC installation program you downloaded in the first step and follow the instructions to install UniDAC.

By default, the UniDAC installation program should install compiled UniDAC libraries automatically on all IDEs.

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

If you have bought UniDAC Standard Edition with Source Code or UniDAC Professional Edition with Source Code, you will be able to download both the compiled version of UniDAC and the UniDAC source code. The installation process for the compiled version is standard, as described above.The UniDAC source code must be compiled and installed manually. Consult the supplied ReadmeSrc.html file for more details.

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

Working with the UniDAC demo projects

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

To quickly get started working with UniDAC, launch and explore the introductory UniDAC demo project, UniDACDemo, from your IDE. This demo project is a collection of demos that show how UniDAC 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.

UniDACDemo Walkthrough

  1. Launch your IDE.
  2. Choose File | Open Project from the menu bar
  3. Find the UniDAC directory and open the UniDACDemo project. This project should be located in the Demos\UniDACDemo folder.

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

    \Program Files\Devart\UniDAC for Delphi 2006\Demos\Win32\UniDACDemo\UniDACDemo.bdsproj

  4. Select Run | Run or press F9 to compile and launch the demo project. UniDACDemo should start, and a full-screen UniDAC Demo window with a toolbar, an explorer panel, and a view panel will open. The explorer panel will contain a list of all demo sub-projects included in UniDACDemo, 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 a server. However, you will not be able to actually retrieve data from a server or execute commands until you connect to the database.

  5. Click on the "Connect" button in the UniDACDemo toolbar. A Connect dialog box will open. Select the required provider from the list, and enter the connection parameters to connect to your server, and click "Connect" in the dialog box. Set of connection parameters depends on the selected provider.

    Now you have a fully functional interface to your server. You will be able to go through the different demos, to browse tables, create and drop objects, and execute 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 you specify a test database in the connection step.

  6. Click on the "Create" button to create all objects that will be used by UniDACDemo. If some of these objects already exist in the database you have connected to, an error with the error message like the following 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. UniDACDemo will create the UniDACDemo objects on the server you have connected to.

  7. Choose a demo that demonstrates an aspect of working with UniDAC 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 how to work with TUniTable component, select the Table demo from the "Working with Components" folder. A simple table browser will open in the view panel which will let you open a table in your database by specifying its name and clicking on the "Open" button.
  8. Click on the "Demo source" button in the UniDACDemo toolbar to find out how the demo you have selected was implemented. The source code behind the demo project will appear in the view panel. Try to find the places where UniDAC components are used to connect to the database.
  9. Click on the "Form as text" button in the UniDACDemo toolbar to view the code behind the interface to the demo. Try to find the places where  UniDAC components are created on the demo form.
  10. Repeat these steps for other demos listed in the explorer window. The available demos are organized in three folders.

    Working with components

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

    General demos

    A collection of projects that show off the UniDAC technology and demonstrate some ways of working with data.

    Server-specific demos

    A collection of projects that demonstrate how to incorporate features of specific database servers.

  11. When you are finished working with the project, click on the "Drop" button in the UniDACDemo toolbar to remove all schema objects added in Step 6.

Other UniDAC demo projects

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

Compiling and deploying your UniDAC project

Compiling UniDAC-based projects

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

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

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

Deploying UniDAC-based projects

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

If you are evaluating deploying projects with UniDAC 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 UniDAC Trial Edition for C++Builder will only work if the C++Builder IDE is launched. More information about UniDAC Trial Edition limitations is provided here.

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

Using the UniDAC documentation

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

The UniDAC documentation includes a detailed reference of all UniDAC components and classes. Many of the UniDAC components and classes inherit or implement members from other VCL and LCL classes and interfaces. The product documentation also includes a 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 a specific standard VCL or LCL class a UniDAC component is inherited from, see the corresponding topic in your IDE documentation.

At install time, the UniDAC documentation is integrated into your IDE. It can be invoked from the UniDAC menu added to the Menu Bar, or by pressing F1 in Object Inspector or on a selected code segment.

How to get help with UniDAC

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

For more information, consult the Getting Support topic.

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