Copyright: CoolDBUtilities 1.01
Citation: CoolDBUtilities 1.01 Help


Complete Overview

Description

Complete Overview over all Declarations contained in all units

Units

Overview of all Units

Classes and Components

Overview of all Classes and Components

External Procedures and Functions

Overview of all external Procedures and Functions

Types, Records and Events

Overview of all Types, Records and Events

Shareware and legal stuff

License agreement

Ordering CoolDBUtilities

Additional information

Installation

Release history

Contacts

Credits

Important Information


Units Overview

See also

Complete Overview

Description

All Units used

Units

CoolDBUtils Unit


Procedures and Functions Overview

See also

Complete Overview

Description

Overview of all Classes and Components

Procedures and Functions Overview

Procedure CopyTable

Procedure AddIndex

Function  AliasExists

Function  TableExists

Function  GetAliasPath

Procedure ChangeField

Procedure AddField

Procedure DeleteField

Procedure TableRestructure

Procedure ChangeIndex

Function  GetIndexes

Function  GetIndexDesc

Function  CheckDbaseIndexes

Procedure IndexesRestructure


Overview of all Classes and Components

See also

Complete Overview

Description

Overview of all Classes and Components

Classes and Components

TCoolDBComponent

TCoolDBBackup

TCoolDBPack

TCoolDBStructureExporter

TCoolDBStructureRestorer

TCoolDBUpdater

TCoolDBUpdater2

TDatabaseNameProperty


Types, Variables and Constants Overview

See also

Complete Overview

Description

Types, Variables and Constants Overview

Types, Records and Events

TTablesAction Type

TBDEString Type

TActionInProgress Event Type


CoolDBUtils Unit

See also

Units Overview

Types, Records and Events

  TTablesAction

  TBDEString

  TActionInProgress

Classes and Components

  TCoolDBComponent

  TCoolDBPack

  TCoolDBBackup

  TCoolDBStructureExporter

  TCoolDBStructureRestorer

  TCoolDBUpdater

  TCoolDBUpdater2

  TDatabaseNameProperty

Procedures & Functions

  CopyTable

  AddIndex

  AliasExists

  TableExists

  GetAliasPath

  ChangeField

  AddField

  DeleteField

  TableRestructure

  ChangeIndex

  GetIndexes

  GetIndexDesc

  CheckDbaseIndexes

  IndexesRestructure


TTablesAction Type

Unit

CoolDBUtils

Procedures and Functions Overview

Overview of all Types, Records and Events

Declaration

TTablesAction = (TaAll,  TaFromMask,  TaFromList);


TBDEString Type

Unit

CoolDBUtils

Procedures and Functions Overview

Overview of all Types, Records and Events

Declaration

TBDEString = String[OFS_MAXPATHNAME];


TActionInProgress Event Type

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

TActionInProgress = Procedure(Sender: TObject; TablesNum: Integer; CurName: String; CurNum: Integer) Of Object;


Properties & Events

DatabaseName

TablesAction

Tables

TablesMask

OnActionInProgress

OnExecuteBegin

OnExecuteEnd


Methods

Execute


TCoolDBComponent Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBComponent Component

Properties & Events	Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBComponent = Class(TComponent)

Description

This component is a base class for all components in CoolDBUtilities package. It declares most properties and methods but does not provide any real functionality itself. You will never need to create instances of this class, use its descendant instead.


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Dynamic; Abstract;

Description :

Abstract method that implemented in descendant classes.


DatabaseName Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property DatabaseName: TBDEString

Referenced by

TCoolDBComponent

Description

Depending on the component Database property means the following:

TCoolDBBackup	Name of the database you would like to back up.

TCoolDBStructureExporter	Name of the database whose stricture you would like to save.

TCoolDBStructureRestorer	Points to the database you would like to restore previously

saved structure in.

TCoolDBUpdater,

TCoolDBUpdater2	Name of the database whose structure you would like to update.

Database property can point on either BDE database name or folder name (folder must exist).


TablesAction Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property TablesAction: TTablesAction

Referenced by

TCoolDBComponent

Description

Use TablesAction to specify the list of tables action will be performed for.

Value 	Meaning

taAll 	Action will be performed for all tables in database.

taFromMask 	Action will be performed for those tables that match mask.

taFromList	Action will be performed only for tables from Tables list should

they  be found in database.

Note: TCoolDBStructureRestorer component does not support taFromMask value.


Tables Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property Tables: TStrings

Referenced by

TCoolDBComponent

Description

Once TablesAction is taFromList use Tables to specify the list of tables you would like action (depending on component) will be performed for.


TablesMask Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property TablesMask: String

Referenced by

TCoolDBComponent

Description

Once TablesAction is taFromMask use TableMask to specify the mask according to which tables you would like action (depending on component) will be performed for will be selected.


OnActionInProgress Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property OnActionInProgress: TActionInProgress

Referenced by

TCoolDBComponent

Description

OnActionInProgress event will be fired during the component’s action progress each time new table will be opened for an operation.


OnExecuteBegin Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property OnExecuteBegin: TNotifyEvent

Referenced by

TCoolDBComponent

Description

OnExecuteBegin event will be fired on component’s Execute method execution beginning.


OnExecuteEnd Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property OnExecuteEnd: TNotifyEvent

Referenced by

TCoolDBComponent

Description

OnExecuteEnd event will be fired on component’s Execute method execution ending.


Properties & Events

  DatabaseBackupName

  DeleteOnDone

  DatabaseName

  TablesAction

  Tables

  TablesMask

  OnActionInProgress

  OnExecuteBegin

  OnExecuteEnd


Methods

Execute


TCoolDBBackup Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBBackup Component

Properties & Events	Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBBackup = Class(TCoolDBComponent)

Description

TCoolDBBackup component can be used for backing up of the existing database or for copying complete database to the new location.


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Override;

Description :

After all Properties have been properly assigned call Execute methox to perform zan action (back up database).


DatabaseBackupName Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property DatabaseBackupName: TBDEString

Referenced by

TCoolDBBackup

Description

Use DatabaseBackupName to specify the name of the database (or folder) you would like to b ackup (copy) existing database to.


DeleteOnDone Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property DeleteOnDone: Boolean

Referenced by

TCoolDBBackup

Description

If DeleteOnDone is True original database wil be dleted after it has been backed up (copied). Be very careful with this property as you will not be able to restore the database once it has been deleted.


Methods

Execute


TCoolDBPack Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBPack Component

Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBPack = Class(TCoolDBComponent)

Description

TCoolDBPack component allows you to compact (compress) entire database.


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Override;

Description :

Compresses specified database.


Properties & Events

  FileName

  DatabaseName

  TablesAction

  Tables

  TablesMask

  OnActionInProgress

  OnExecuteBegin

  OnExecuteEnd


Methods

Execute


TCoolDBStructureExporter Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBStructureExporter Component

Properties & Events	Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBStructureExporter = Class(TCoolDBComponent)

Description

TCoolDBStructureExporter components can be used to save the structure of existing database into the disk file so that you will be able to reproduce the database later (i.e. create empty tables with the same structure).


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Override;

Description :

Once all Properties have been properly assigned use Execute method to actually save structure of the database.


FileName Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property FileName: TFileName

Referenced by

TCoolDBStructureExporter

Description

Use FileName property to specify the name of the file you would like to save the database structure into.


Properties & Events

  FileName

  DatabaseName

  TablesAction

  Tables

  TablesMask

  OnActionInProgress

  OnExecuteBegin

  OnExecuteEnd


Methods

Execute


TCoolDBStructureRestorer Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBStructureRestorer Component

Properties & Events	Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBStructureRestorer = Class(TCoolDBComponent)

Description

TCoolDBStructureRestorer component can be used to restore the structure of database that has been previously saved using TCoolDBStructureExporter component.


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Override;

Description :

Once all Properties  have been properly assigned use Execute method to restore the database.


FileName Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property FileName: TFileName

Referenced by

TCoolDBStructureRestorer

Description

Use FileName to specify the name of the file with desired database structure saved.


Properties & Events

  DatabaseImporterName

  DeleteOnDone

  DatabaseName

  TablesAction

  Tables

  TablesMask

  OnActionInProgress

  OnExecuteBegin

  OnExecuteEnd


Methods

Execute


TCoolDBUpdater Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBUpdater Component

Properties & Events	Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBUpdater = Class(TCoolDBComponent)

Description

TCoolDBUpdater can be used to update structure of the database based on structure of another database. Component is very fast however has some limitations (can not update master/detail tables etc) if you want to rebuild database completely use TCoolDBUpdater2 component instead.

Feature 	Supported

Adds fields	yes

Deletes fields	yes

Changes fields content	yes

Changes fields type	yes

Changes fields length	yes

Master/detail operations	no

Adds indexes	yes

Deletes indexes	yes

Changes indexes	no


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Override;

Description :

Once all Properties have been propery assigned call Execute method to update (rebuild) database.


DatabaseImporterName Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property DatabaseImporterName: TBDEString

Referenced by

TCoolDBUpdater

Description

Use DatabaseImporterName to specify the name of database (folder) with the structure you would like to transfer to databse specified in DatabaseName property.


DeleteOnDone Property

Unit

CoolDBUtils

See also

Overview of all Types, Records and Events

Declaration

Property DeleteOnDone: Boolean

Referenced by

TCoolDBUpdater

Description

When DeleteOnDone is True after action has been completed database with DatabaseImporterName name will be cleaned up.


Methods

Execute


TCoolDBUpdater2 Component Example

Example :

Full Examples of the Components are provided in the Installation Directory of the Components.


TCoolDBUpdater2 Component

Properties & Events	Methods	Example

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TCoolDBUpdater2 = Class(TCoolDBUpdater)

Description

TCoolDBUpdater2 can be used to update structure of the database based on structure of another database. Component rebuilds tables completely if you want to rebuild database fast use TCoolDBUpdater  component instead.

Feature 	Supported

Adds fields	yes

Deletes fields	yes

Changes fields content	yes

Changes fields type	yes

Changes fields length	yes

Master/detail operations	yes

Adds indexes	yes

Deletes indexes	yes

Changes indexes	yes


Execute Procedure

Unit

CoolDBUtils

Declaration

Procedure Execute; Override;

Description :

Once all Properties have been propery assigned call Execute method to update (rebuild) database.


TDatabaseNameProperty Methods

Unit

CoolDBUtils

See also

Overview of all Classes and Components

Declaration

TDatabaseNameProperty = Class(TStringProperty)

Description

Component editor for TBDEString type properties used to display all existing BDE aliases also accpets folder names.


CopyTable Procedure

Unit

CoolDBUtils

Declaration

Procedure CopyTable(Var Table: TTable; SrcTableName: String; DestName: String);

Description :

Copies table Table.


AddIndex Procedure

Unit

CoolDBUtils

Declaration

Procedure AddIndex(Table: TTable);

Description :

Adds primary index to table Ttable (first field).


AliasExists Function

Unit

CoolDBUtils

Declaration

Function AliasExists(AliasName: String): Boolean;

Description :

Checks whenever AliasName exists in the curent BDE configuration.


TableExists Function

Unit

CoolDBUtils

Declaration

Function TableExists(AliasName,  TableName: String): Boolean;

Description :

Checks whenever table TableName exists in the database AliasName.


GetAliasPath Function

Unit

CoolDBUtils

Declaration

Function GetAliasPath(AliasName: String): String;

Description :

Returns folder of the alias AliasName (Paradox, dBASE databases).


ChangeField Procedure

Unit

CoolDBUtils

Declaration

Procedure ChangeField(Table: TTable; Field: TField; FieldsDesc: PFLDDesc);

Description :

Modifies field Field in the table Table according t3o information stored in FieldsDesc structure.


AddField Procedure

Unit

CoolDBUtils

Declaration

Procedure AddField(Table: TTable; FieldsDesc: PFLDDesc);

Description :

Adds field described in FieldsDesc structure to table Table.


DeleteField Procedure

Unit

CoolDBUtils

Declaration

Procedure DeleteField(Table: TTable; Field: TField);

Description :

Deletes field Field from table Table.


TableRestructure Procedure

Unit

CoolDBUtils

Declaration

Procedure TableRestructure(TblSource,  TblDestination: TTable);

Description :

Rebuilds table tblDestination so that its structure will match to one of the tblSource table.


ChangeIndex Procedure

Unit

CoolDBUtils

Declaration

Procedure ChangeIndex(Table: TTable; IndexDesc: IdxDesc; Index: Integer);

Description :

Modifies index with index Index for table Table according to index information IdxDesc.


GetIndexes Function

Unit

CoolDBUtils

Declaration

Function GetIndexes(Table: TTable): TStringList;

Description :

Returns complete list of indexes names for table Table.


GetIndexDesc Function

Unit

CoolDBUtils

Declaration

Function GetIndexDesc(Table: TTable; IndexName: String): IdxDesc;

Description :

Returns full index description of IndexName index for table Table.


CheckDbaseIndexes Function

Unit

CoolDBUtils

Declaration

Function CheckDbaseIndexes(Indexes: TStringList; IndexName: String): Integer;

Description :

Checks whenever IndexName is a valid index name for dBASE table indexes.


IndexesRestructure Procedure

Unit

CoolDBUtils

Declaration

Procedure IndexesRestructure(TblSource,  TblDestination: TTable);

Description :

Modifies indexes of tblDestination so that they will match indexes of tblSource.


Installation

  For proper installation of the package you need to copy all the package

  files to the folder where your components are placed.

  For Delphi 3/4/5

  1. All files should be copied to the same place.

  2. Open in Dlephi CoolDBUtilities.dpk package.

  3. Install the package.

  For C++ Builder 3

  1. All files should be copied to the same place.

  2. Open CoolDBUtilities.bpk file.

  3. Compile the package (Build All).

  4. Install the compiled package (CoolUtilities.bpl).

  For C++ Builder 4

  1. All files should be copied to the same place.

  2. Open CoolDBUtilities.bpk file.

  3. Install the package.


License agreement

Copyright:

The CoolDBUtilities (software) and everything that comes with it is Copyright (C) 1999, by Artem A. Berman. All rights reserved.

Liability disclaimer:

THIS SOFTWARE IS DISTRIBUTED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE  OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. YOU USE IT AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES,  LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.

Restrictions:

You may not attempt to reverse compile, modify, translate or disassemble the software in whole or in part. You may not remove or modify any copyright notice or the method by which it may be invoked.

Operating license:

Unregistered version.

You may distribute the unregistered version of software freely, provided that all files are included and remain unmodified and that no extra files have been added to the package.

You may not ask any money for the distribution.

You may use the unregistered version of CoolDBUtilities free of charge for testing purposes, but if you want to use it for other purposes than testing - you have to register it with the author.

Registered version.

Once you have registered, you will receive a personal registered copy via email. This copy may not be copied or lend.

You have the non-exclusive right to use registered version of the software only by a single person, on a single computer at a time. You may physically transfer the software from one computer to another, provided that the software is used only by a single person, on a single computer at a time. In group projects where multiple persons will use the software, you must purchase an individual license for each member of the group. Use over a "local area network" (within the same locale) is permitted provided that the software is used only by a single person, on a single computer at a time. Use over a "wide area network" (outside the same locale) is strictly prohibited under any and all circumstances.

Back-up and transfer:

You may make one copy of the software solely for "back-up" purposes, as prescribed by international copyright laws. You must reproduce and include the copyright notice on the back-up copy.

Terms:

This license is effective until terminated. You may terminate it by destroying the program, the documentation and copies thereof. This license will also terminate if you fail to comply with any terms or conditions of this agreement. You agree upon such termination to destroy all copies of the program and of the documentation, or return them to author

Other rights and restrictions:

All other rights and restrictions not specifically granted in this license are reserved by author.


Ordering CoolDBUtilities

Status:

CoolDBUtils is being distributed as shareware. This means you can try it out for free, but if you like it and want to use it you have to register it with the author. Before continue read and accept license agreement please.

The only difference between the unregistered and registered versions is that the registered one has no message box with remind to register.

Registration types:

There are two registration types: Registering with and without sources.

Registration without sources will cost you  USD 12. You will receive a copy of CoolDBUtils (D3/D4/BCB3/BCB4 versions) via e-mail. You will have an opportunity to receive updated versions of CoolDBUtils for free via

e-mail. If you will register without sources and will decide to buy sources later, you'll be able to do it for additional USD 12.

Registration with sources will cost you  USD 24. You will receive all the above plus sources.

How to pay:

I’m use ShareIt! service to process registrations.  If you would like to register CoolDBUtils, you can do the registration on-line on  the Internet at http://www.cooldev.com/registration.html

Customers in the US may also place their order by calling the toll-free order number

1-800-903-4152, available 24 hours a day. Please make sure to have your program ID # (your program number here) ready. Please note: this number is for orders only and is not qualified to provide customer service, technical support or to give information on the status of your order in any

way. Please contact us directly at our European office (+49 221 2407279) for these inquiries.

 If you do not have access to the Internet, you can register via phone, fax or  postal mail. Please print out the following form, and fax or mail it to:

 Reimold&Schumann Internet Services

 ShareIt!

 Habsburgerring 3

 50674 Koeln

 Germany

 Phone:	+49-221-2407279

 Fax: 	        	+49-221-2407278

 E-Mail:         	register@shareit.com

 Registration form for CoolDBUtils

 Program No.: 104379

 Last name: ___________________________________

 First name: ____________________________________

 Company: ____________________________________

 Street and #: ______________________________________

 City, State, postal code: ________________________________

 Country: _______________________________________

 Phone: _____________________________________

 Fax: ________________________________________

 E-Mail: ______________________________________

 How would like to receive the registration key/full version?

 e-mail 	- fax	- postal mail

 How would you like to pay the registration fee of $12/24:

 credit card - wire transfer - EuroCheque - cash

 Credit card information (if applicable)

 Credit card: Visa - Eurocard/Mastercard - American Express - Diners Club

 Card holder: ________________________________

 Card No.: ___________________________________

 Date of Expiration : ___________________________________

 Date / Signature ___________________________


Release history

Version 1.01 29-Sep-1999

    + Speed improved in serious way and some parts rewritten completely.

    + New TCoolDBPack component. Allows to compress entire database (all

       its tables).

    + PackOnProgress property of TCoolDBBackup. Allows to pack table while

       backup process in progress.

    + Delphi 5 version added and structure of the package changed.

    * Number of problems related to work with the indexes fixed. They are

       updated in such a way that target structure matches source one exactly.

Version 1.0 28-Jun-1999

    Initial release.


Contacts

E-mail:

General questions

Support questions

Registration questions

Internet:

http://www.cooldev.com

Phone / Fax:

+38 0552 321381

Postal address:

Mr. Artem A. Berman

Ukraine, 325000, Kherson

Tiraspolskaya 38


Credits

Thanks to Alexander Mehlhorn for Component Help Generator. This help file was created using this neat tool.


Information
Important Information

Some useful advices and suggestions are here.

1.	Version 1.0 of this package intended to be used with Paradox and dBASE local databases. Although some components will work with SQL based databases package was not tested and is not fully compatible with SQL databases.

2.	Your data is the most important thing you have so please be very careful when you work with it. You will not believe how often people casually specify wrong databases etc. Watch out!

3.	Backup! Backup as often as you can and even more often. Before testing make sure you have created reserved copy of your DB.

4.	TCoolDBUpdater and TCoolDBUpdater2 components are doing the same work but in quite different way. While TCoolDBUpdater uses batchmove TCoolDBUpdater2 uses only low level BDE calls. TCoolDBUpdater is way faster bat have some limitations (can’t work with master/detail tables etc). The solution would be to use TCoolDBUpdater whenever you can but if you need to restructure your database more seriously use TCoolDBUpdater2 component.

5.	While table rebuilded its passwords (if any) are removed. So you will have to add the password once you’re done with updating. Refer to DbiDoRectructure() BDE procedure. There’s an example on how to set passwors fo Paradox tables there.