Unit TableUtils

Classes

Functions

ExportTableToClipboard - Range2.
ExportTableToExcel -
ExportTableToStringList -
FindReplace - General String
ForEachTableIn - Iterating Tables

Rebuild the Indexes
GetLastPK -
GetNumVisFields - Import / Export
GetRequiredField - Primary Key
GetVisibleField -
ImportTableFromStringList - if Assigned(Callback) then Callback(Line, 'Before Post', DS);

Types

TEachTableProc
TIECallback

Constants

Variables


Functions


procedure ExportTableToClipboard(DS: TDataSet);

Range2.AutoFormat; XL.Quit;

procedure ExportTableToExcel(DS: TDataSet);


procedure ExportTableToStringList(DS: TDataSet; SL: TStringList; Callback: TIECallback);


procedure FindReplace(var s: string; const Find, Rep: string);

General String

procedure ForEachTableIn(Owner: TComponent; CallBack: TEachTableProc);

Iterating Tables

Rebuild the Indexes


function GetLastPK(Table: TTable): integer;


function GetNumVisFields(DS: TDataSet): integer;

Import / Export

function GetRequiredField(DataSet: TDataSet): TField;

Primary Key

function GetVisibleField(DS: TDataSet; Index: integer): TField;


procedure ImportTableFromStringList(DS: TDataSet; SL: TStringList; Callback: TIECallback);

if Assigned(Callback) then Callback(Line, 'Before Post', DS);

Types


TEachTableProc = procedure(Table: TTable) of object

TIECallback = procedure(RecordNum: integer; const Msg: string; DS: TDataSet) of object
Assumptions: - The first field that has "Required = True" is assumed to be the Primary Key

Constants


Variables