Unit rDBComponents_UDB

Description

rDBComponents_UDB (UDB= Universal DataBase) is set of enhanced DB components which can be used instead of standard db components and provide the same properties and functions for different types of databases. It allows to convert application very easilly from one database type to another.

Now it supports following type of database connections and queries: ADO = dbGo (used for MSAccess, MSSQLServer nad other db via ODBC or JET) ZEOS (used for MySQL, Firebird and other supported databases) DBX = dbExpress (used for MySQL, Interbase, Firebird and other supported databases) IB = Interbase (used for Interbase or Firebird) FIB = FIBBlus (used for Interbase or Firebird) FireDac

Usage of particular DB type is set by compiler conditional defines: DEFINE USEADO for ADO DEFINE USEZEOS for Zeos DEFINE USEDBX for DBX DEFINE USEIB for Interbase DEFINE USEFIB for FIBBlus DEFINE USEFD for FireDac

Unit contains new data connection components: TConnectionUDB - descendant of TADOConnection/TZConnection/TSQLConnection/TIBDataBase/TpFIBDatabase/TFDConnection TQueryUDB - descendant of TADOQuery/TZQuery/TSimpleDataSet/TIBQuery/TpFIBDataSet/TFDQuery

TQueryUDB provides many new functions and properties usefull for any db application for centralization of all db tasks: - new props (TableName, IdFieldName, FieldTagToDuplic, FieldTagToReadOnly...) - new function (DuplicateRecord, SetFieldsReadOnly - according of fields tag value) - new events for centralized setting of fields captions and properties in application - many new function for setting of SQL commands in runtime

Unit contain set of visible DB components. All of them contain internal TQueryUDB dataset with definable SQL command for loading of list values and events for setting of SQL in run time, so no other auxilary dataset is needed on the form. It can show bounded buttons used for enhanced selection of value or showing details of selected record dependently on application.

TEditUDB - TEdit descendant loads and display text from any SQL command TComboBoxUDB - TrComboBoxEx descendant load list of items from any SQL command TrDBComboBoxUDB - TrDBComboBox descendant load list of items from any SQL command TrDBLookupComboBoxUDB - TrDBLookupComboBox descendant load list of items from any SQL command TListBoxUDB - TListBox descendant load list of items from any SQL command TrDBListBoxUDB - TrDBListBox descendant load list of items from any SQL command TrDBLookupListBoxUDB - TrDBLookupListBox descendant load list of items from any SQL command

TCheckListBoxUDB - TCheckListBox descendant with possibility to load list of items from any SQL command TrDBCheckListBoxUDB - TrDBCheckListBox descendant with possibility to load list of items and values from any SQL command, provide all functions for N:M relationship

TrDBRecViewUDB - TrDBRecView descendant with possibility to load/show/edit record from any SQL command TrDBGrid_MSUDB - TrDBGrid_MS descendant with possibility to load/show/edit records from any SQL command

Updated version compatible with Delphi2010+.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TCustomConnectionUDB TCustomConnectionUDB - descendant of TADOConnection/TZConnection/TSQLConnection/TIBDataBase/TpFIBDatabase which provides same functions for all connection types
Class TCustomQueryUDB TCustomQueryUDB - descendant of TADOQuery/TZQuery/TSimpleDataSet/TIBQuery/TpFIBDataSet which provides same functions for all dataset types
Class TCustomrDBCheckBoxUDB TrDBCheckBox descendand with boolean value 1 and 0
Class TCustomEditUDB TEdit descendant loads and display text from any SQL command
Class TCustomComboBoxUDB TComboBox descendant load list of items from any SQL command
Class TCustomrDBEditUDB TrDBEdit descendant show bound button
Class TCustomrDBComboBoxUDB TrDBComboBox descendant load list of items from any SQL command
Class TCustomrDBLookupComboBoxUDB TrDBLookupComboBox descendant load list of items from any SQL command
Class TCustomListBoxUDB TListBox descendant load list of items from any SQL command
Class TCustomrDBListBoxUDB TrDBListBox descendant load list of items from any SQL command
Class TCustomrDBLookupListBoxUDB TrDBLookupListBox descendant load list of items from any SQL command
Class TCustomCheckListBoxUDB TCheckListBox descendant with possibility to load list of items from any SQL command
Class TCustomrDBCheckListBoxUDB TrDBCheckListBox descendant with possibility to load list of items and values from any SQL command, provide all functions for N:M relationship
Class TCustomrDBRecViewUDB TrDBRecView descendant with possibility to load/show/edit record from any SQL command
Class TCustomrDBGrid_MSUDB TrDBGrid_MS descendant with possibility to load/show/edit records from any SQL command
Class TCustomrDBGridSorter_UDB universal sorter for any UDB dataset
Class TConnectionUDB TCustomConnectionUDB compiled for specified dataset type
Class TQueryUDB TCustomQueryUDB compiled for specified dataset type
Class TEditUDB TCustomEditUDB compiled for specified dataset type
Class TrDBEditUDB TCustomrDBEditUDB compiled for specified dataset type
Class TrDBCheckBoxUDB TCustomrDBCheckBoxUDB compiled for specified dataset type
Class TComboBoxUDB TCustomComboBoxUDB compiled for specified dataset type
Class TrDBComboBoxUDB TCustomrDBComboBoxUDB compiled for specified dataset type
Class TrDBLookupComboBoxUDB TCustomrDBLookupComboBoxUDB compiled for specified dataset type
Class TListBoxUDB TCustomListBoxUDB compiled for specified dataset type
Class TrDBListBoxUDB TCustomrDBListBoxUDB compiled for specified dataset type
Class TrDBLookupListBoxUDB TCustomrDBLookupListBoxUDB compiled for specified dataset type
Class TCheckListBoxUDB TCustomCheckListBoxUDB compiled for specified dataset type
Class TrDBCheckListBoxUDB TCustomrDBCheckListBoxUDB compiled for specified dataset type
Class TrDBRecViewUDB TCustomrDBRecViewUDB compiled for specified dataset type
Class TrDBGrid_MSUDB TCustomrDBGrid_MSUDB compiled for specified dataset type
Class TrDBGridSorter_UDB TCustomrDBGridSorter_UDB compiled for specified dataset type

Functions and Procedures

procedure Register;

Types

TDatasetLastEditAction = (...);
TDatasetEventType = (...);
TDatasetEventTypes = set of TDatasetEventType;
TDataSetEvent = procedure(DataSet: TDataSet; EventType: TDatasetEventType = deNone) of object;
TGetSQLEvent = procedure(Sender: TObject; SQL: TStrings) of object;
TClickComboButton = procedure(Sender: TObject; Con: TCustomConnectionUDB; TableName: string; DataField, ListField: TField) of object;

Variables

lastRequeryUDB: TCustomQueryUDB;

Description

Functions and Procedures

procedure Register;
 

Types

TDatasetLastEditAction = (...);

list of dataset actions stored as last executed action

Values
  • leNone
  • leEdit
  • leInsert
  • leDuplic
  • leCancel
  • leDelete
TDatasetEventType = (...);

list of dataset event types

Values
  • deNone
  • deBeforeOpen
  • deAfterOpen
  • deBeforeClose
  • deAfterClose
  • deBeforePost
  • deAfterPost
  • deBeforeScroll
  • deAfterScroll
  • deBeforeCancel
  • deAfterCancel
  • deBeforeInsert
  • deAfterInsert
  • deBeforeEdit
  • deAfterEdit
  • deBeforeDelete
  • deAfterDelete
  • deBeforeApplyUpdates
  • deAfterApplyUpdates
  • deAfterPostOrApplyUpdates
TDatasetEventTypes = set of TDatasetEventType;

set of dataset event types

TDataSetEvent = procedure(DataSet: TDataSet; EventType: TDatasetEventType = deNone) of object;

event type used by UDBComponents

TGetSQLEvent = procedure(Sender: TObject; SQL: TStrings) of object;

event type used by TCustomQueryUDB to get SQL command

TClickComboButton = procedure(Sender: TObject; Con: TCustomConnectionUDB; TableName: string; DataField, ListField: TField) of object;

event type used by UDBComponents after click on bound button

Variables

lastRequeryUDB: TCustomQueryUDB;
 

Author

Created

Jan 2011

Last Modified

Nov 2020


Generated by PasDoc 0.15.0.