Unit BdeUtils

*****************************************************} { } { Delphi VCL Extensions (RX) } { } { Copyright (c) 1995, 1996 AO ROSNO } { Copyright (c) 1997, 1998 Master-Bank } { } {

Classes

TCloneDataset - TCloneDataset
TCloneTable - TCloneTable
TDBLocate -

Functions

AsyncQrySupported -
BdeErrorMsg -
BdeFlushBuffers -
BdeTranslate -
BookmarksCompare -
ConvertStringToLogicType - Routine for convert string to IDAPI logical field type
CurrentRecordDeleted -
DataSetFindLike -
DataSetFindValue - DataSet locate routines
DataSetPositionStr -
DataSetRecNo -
DataSetRecordCount -
DataSetShowDeleted -
DbNotSupported -
DeleteRange -
ExecuteQuery -
ExecuteQueryEx - Execute Query routine
ExportDataSet - Export/import DataSet routines

Check for multiple directories, use only the first one
FetchAllRecords - Utility routines

Call DbiPackTable procedure if dBase table
FieldLogicMap -
FieldSubtypeMap -
GetAliasPath -
GetBdeDirectory -
GetNativeHandle -
ImportDataSet - clear previous output - overwrite existing file
InitRSRUN - ReportSmith initialization

ReportSmith runtime initialization routine
IsBookmarkStable - Utility routines
IsDirectory - BDE aliases routines
LoginToDatabase - Database Login routine
PackTable -
ReindexTable -
RestoreIndex -
SetIndex -
SetToBookmark -
ToggleDebugLayer -
TransActive -

Types

TBDEDataSet

Constants

Variables


Functions


function AsyncQrySupported(Database: TDatabase): Boolean;


function BdeErrorMsg(ErrorCode: DBIResult): string;


procedure BdeFlushBuffers;


procedure BdeTranslate(Locale: TLocale; Source, Dest: PChar; ToOem: Boolean);


function BookmarksCompare(DataSet: TBDEDataSet; Bookmark1, Bookmark2: TBookmark): Integer;


procedure ConvertStringToLogicType(Locale: TLocale; FldLogicType: Integer; FldSize: Word; const FldName, Value: string; Buffer: Pointer);

Routine for convert string to IDAPI logical field type

function CurrentRecordDeleted(DataSet: TBDEDataSet): Boolean;


function DataSetFindLike(ADataSet: TBDEDataSet; const Value, FieldName: string): Boolean;


function DataSetFindValue(ADataSet: TBDEDataSet; const Value, FieldName: string): Boolean;

DataSet locate routines

function DataSetPositionStr(DataSet: TDataSet): string;


function DataSetRecNo(DataSet: TDataSet): Longint;


function DataSetRecordCount(DataSet: TDataSet): Longint;


procedure DataSetShowDeleted(DataSet: TBDEDataSet; Show: Boolean);


procedure DbNotSupported;


procedure DeleteRange(Table: TTable; IndexFields: array of const; FieldValues: array of const);


procedure ExecuteQuery(const DbName, QueryText: string);


procedure ExecuteQueryEx(const SessName, DbName, QueryText: string);

Execute Query routine

procedure ExportDataSet(Source: TBDEDataSet; DestTable: TTable; TableType: TTableType; const AsciiCharSet: string; AsciiDelimited: Boolean; MaxRecordCount: Longint);

Export/import DataSet routines

Check for multiple directories, use only the first one


procedure FetchAllRecords(DataSet: TBDEDataSet);

Utility routines

Call DbiPackTable procedure if dBase table


function FieldLogicMap(FldType: TFieldType): Integer;


function FieldSubtypeMap(FldType: TFieldType): Integer;


function GetAliasPath(const AliasName: string): string;


function GetBdeDirectory: string;


function GetNativeHandle(Database: TDatabase; Buffer: Pointer; BufSize: Integer): Pointer;


procedure ImportDataSet(Source: TBDEDataSet; DestTable: TTable; MaxRecordCount: Longint; Mappings: TStrings; Mode: TBatchMode);

clear previous output - overwrite existing file

procedure InitRSRUN(Database: TDatabase; const ConName: string; ConType: Integer; const ConServer: string);

ReportSmith initialization

ReportSmith runtime initialization routine


function IsBookmarkStable(DataSet: TBDEDataSet): Boolean;

Utility routines

function IsDirectory(const DatabaseName: string): Boolean;

BDE aliases routines

function LoginToDatabase(Database: TDatabase; OnLogin: TLoginEvent): Boolean;

Database Login routine

procedure PackTable(Table: TTable);


procedure ReindexTable(Table: TTable);


procedure RestoreIndex(Table: TTable);


procedure SetIndex(Table: TTable; const IndexFieldNames: string);


function SetToBookmark(ADataSet: TDataSet; ABookmark: TBookmark): Boolean;


procedure ToggleDebugLayer(Active: Boolean; const DebugFile: string);


function TransActive(Database: TDatabase): Boolean;


Types


TBDEDataSet = TDataSet

Constants


Variables