BFC_FileCheck |
Description
At first i wish to say that the author is NOT responsible for any damage that is caused by using this component. If you look for somebody to blame, blame yourself or don't use this component.
This is a Delphi component designed for
The purpose is to first make a DBI-file from the datafile. This DBI-file (DBI stands for DataBase Inifile) holds the description of each field and index. Currently referential integrity and passwords are NOT supported. An EXE-demo program for making these DBI-files is provided, but you can easily write your own.
Distribute these DBI-files together with your application.
The way i use it is that everytime my end-user starts his application i do a version-check. That is, i check the version of the executable with the previous version stored in a inifile or registry. When the versions are not the same use the components startcheck method with the property CtrlStruct set to True and property FileName set to *.DB (I use paradox-files) The structure of every datafile will be checked with the structure described in the DBI-file. If the structure does not match, a conversion will be made.
Packing and Reindexing don't need a DBI-file.
Both DbaseIV and Paradox-files are supported. The extention of the filename will be used to determine the type of datafile.
Properties
BusyLabel | Declaration property BusyLabel: TLabel; Description |
|
CtrlStruct | Declaration property CtrlStruct: boolean; Description
|
|
DBIDirectory | Declaration property DBIDirectory: string; Description |
|
Filename | Declaration property Filename: string; Description |
|
MakeIni | Declaration property MakeIni: boolean; Description |
|
NewFile | Declaration property NewFile: boolean; Description |
|
NewIndex | Declaration property NewIndex: boolean; Description |
|
Pack | Declaration property Pack: boolean; Description |
|
ProgramName | Declaration property ProgramName: string; Description |
|
ProgramVersion | Declaration property ProgramVersion: string; Description |
|
Progressbar | Declaration property Progressbar: TProgressBar; Description |
|
RebuildFile | Declaration property RebuildFile: boolean; Description |
|
RebuildIndex | Declaration property RebuildIndex: boolean; Description |
Methods
CheckFile | Declaration procedure CheckFile(Filename: String; Pack, RebuildIndex, NewIndex, RebuildFile, NewFile, CtrlStruct, MakeIni: Boolean; Version, Programname: String; PrgBar: TProgressBar; Busy: TLabel); Description |
|
StartCheck
|
Declaration procedure StartCheck; Description |
|
SetInit | Declaration procedure SetInit; Description |
|
SetInitPack | Declaration procedure SetInitPack; Description |
|
SetInitRebuildIndex | Declaration procedure SetInitRebuildIndex; Description |
|
SetInitNewIndex | Declaration procedure SetInitNewIndex; Description |
|
SetInitRebuildFile | Declaration procedure SetInitRebuildFile; Description |
|
SetInitNewFile | Declaration procedure SetInitNewFile; Description |
|
SetInitCtrlStruct | Declaration procedure SetInitCtrlStruct; Description |
|
SetInitMakeIni | Declaration procedure SetInitMakeIni; Description |