Class TrDBBlob

Unit

Declaration

type TrDBBlob = class(TPanel)

Description

DB component for working with Blob fields, contains function for loading, saving and opening of any content in blob

Hierarchy

  • TPanel
  • TrDBBlob

Overview

Methods

Public procedure OpenBlob;
Public function SaveAsFile(const FileName: string; ProgressInfo: string = ''; InfoStayVisible: boolean = false): boolean;
Public function LoadFromFile(const FileName: string; ProgressInfo: string = ''; InfoStayVisible: boolean = false): boolean;
Public procedure ClearBlob;
Public procedure RenameBlob;
Public function BlobInfo: string;

Properties

Published property DataFieldBlob: string read GetDataFieldBlob write SetDataFieldBlob;
Published property DataSourceBlob: TDataSource read GetDataSourceBlob write SetDataSourceBlob;
Published property DataFieldInfo: string read GetDataFieldInfo write SetDataFieldInfo;
Published property DataSourceInfo: TDataSource read GetDataSourceInfo write SetDataSourceInfo;
Published property DefaultPrefix: string read FDefaultPrefix write SetDefaultPrefix;
Published property DBEditLabel: TDBBoundLabel read FDBEditLabel;
Published property InfoLabel: TChildLabel read FInfoLabel;
Published property BtnOpen: TChildBtn read FBtnOpen;
Published property BtnLoad: TChildBtn read FBtnLoad;
Published property BtnSave: TChildBtn read FBtnSave;
Published property BtnClear: TChildBtn read FBtnClear;
Published property BtnMargin: integer read FBtnMargin write SetBtnMargin;
Published property BtnSpace: integer read FBtnSpace write SetBtnSpace;
Published property OpenByApp: string read FOpenByApp write FOpenByApp;
Published property OpenParams: string read FOpenParams write FOpenParams;
Published property OpenTempDir: string read FOpenTempDir write FOpenTempDir;
Published property FileFilter: string read FFileFilter write FFileFilter;
Published property FileSizeLimitMB: double read FFileSizeLimitMB write FFileSizeLimitMB;
Published property OnLoadBlob: TBlobFileEvent read FOnLoadBlob write FOnLoadBlob;
Published property OnOpenBlob: TBlobFileEvent read FOnOpenBlob write FOnOpenBlob;
Published property OnPrepareBlobDataset: TNotifyEvent read FPrepareBlobDataset write FPrepareBlobDataset;
Published property ShowProgressWindow: boolean read FShowProgressWindow write FShowProgressWindow default true;

Description

Methods

Public procedure OpenBlob;

save blob content to disk and run

Public function SaveAsFile(const FileName: string; ProgressInfo: string = ''; InfoStayVisible: boolean = false): boolean;

save blob to file

Public function LoadFromFile(const FileName: string; ProgressInfo: string = ''; InfoStayVisible: boolean = false): boolean;

load blob from file

Public procedure ClearBlob;

clear blob field and info field, works if dataset is in edit state or autoedit is on

Public procedure RenameBlob;

rename info field, works if dataset is in edit state or autoedit is on

Public function BlobInfo: string;

return text info with name and size of blob

Properties

Published property DataFieldBlob: string read GetDataFieldBlob write SetDataFieldBlob;

datalink to blob field containing data

Published property DataSourceBlob: TDataSource read GetDataSourceBlob write SetDataSourceBlob;

datalink to blob field containing data

Published property DataFieldInfo: string read GetDataFieldInfo write SetDataFieldInfo;

datalink to info field containing filename and filetype

Published property DataSourceInfo: TDataSource read GetDataSourceInfo write SetDataSourceInfo;

datalink to info field containing filename and filetype

Published property DefaultPrefix: string read FDefaultPrefix write SetDefaultPrefix;

define prefix for auto-named function (name of component is set according datafield)

Published property DBEditLabel: TDBBoundLabel read FDBEditLabel;

define properties of bound label

Published property InfoLabel: TChildLabel read FInfoLabel;

define properties of info label

Published property BtnOpen: TChildBtn read FBtnOpen;

define properties of Open button

Published property BtnLoad: TChildBtn read FBtnLoad;

define properties of Load button

Published property BtnSave: TChildBtn read FBtnSave;

define properties of Save button

Published property BtnClear: TChildBtn read FBtnClear;

define properties of Clear button

Published property BtnMargin: integer read FBtnMargin write SetBtnMargin;

define margin for buttons

Published property BtnSpace: integer read FBtnSpace write SetBtnSpace;

define space between buttons

Published property OpenByApp: string read FOpenByApp write FOpenByApp;

define application used to open blob content

Published property OpenParams: string read FOpenParams write FOpenParams;

define parameters used to open blob content

Published property OpenTempDir: string read FOpenTempDir write FOpenTempDir;

define directory used to store blob content for opening

Published property FileFilter: string read FFileFilter write FFileFilter;

define file filter used in OpenFile dialog

Published property FileSizeLimitMB: double read FFileSizeLimitMB write FFileSizeLimitMB;

define limit for size of loaded file

Published property OnLoadBlob: TBlobFileEvent read FOnLoadBlob write FOnLoadBlob;

event is called after file is selected before start loading of file content

Published property OnOpenBlob: TBlobFileEvent read FOnOpenBlob write FOnOpenBlob;

event is called after blob is stored and before file is open

Published property OnPrepareBlobDataset: TNotifyEvent read FPrepareBlobDataset write FPrepareBlobDataset;

event is called each time before blob dataset is accessed - user can open and load data in this event

Published property ShowProgressWindow: boolean read FShowProgressWindow write FShowProgressWindow default true;

define whether progress window is shown during time consuming operations


Generated by PasDoc 0.15.0.