Class TSqlitePassDataset

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSqlitePassDataset = class(TDataSet)

Description

The TSqlitePassDataset is a link between your application and the database content. TSqlitePassDataset enables you to access tables, queries, views or even to create direct SQL queries to read and write data from/to your database. It supports almost any kind of fields, including blobs, memo, datetime...etc, and has extended capabilities to quickly sort, filter records (even on calculated or lookup fiels). Locate and Lookup is also implemented with some additional methods.

Hierarchy

Overview

Methods

Public Constructor Create(AOwner: TComponent); override;
Public Destructor Destroy; override;
Public Function BookmarkValid(Bookmark: TBookmark): Boolean; override;
Public Function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override;
Public Function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;
Public Function GetFieldData(Field: TField; Buffer: Pointer): Boolean; override;
Public function Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
Public function LocateFirst: Boolean;
Public function LocateLast: Boolean;
Public function LocateNext: Boolean;
Public function LocatePrior: Boolean;
Public function Lookup(const KeyFields: String; const KeyValues: Variant; const ResultFields: String): Variant; override;
Public function LookupFirst: Variant;
Public function LookUpLast: Variant;
Public function LookupNext: Variant;
Public function LookupPrior: Variant;
Protected Function AllocRecordBuffer: PRecBuffer; override;
Protected function FindRecord(Restart, GoForward: Boolean): Boolean; override;
Protected Function GetBookmarkFlag(Buffer: PRecBuffer): TBookmarkFlag; override;
Protected Function GetCanModify: Boolean; override;
Protected Function GetParamsCount: Integer;
Protected Function GetRecNo: Integer; override;
Protected Function GetRecord(Buffer: PRecBuffer; GetMode: TGetMode; DoCheck: Boolean): TGetResult; override;
Protected Function GetRecordCount: Integer; override;
Protected Function GetRecordSize: Word; override;
Protected Function IsCursorOpen: Boolean; override;
Public Procedure ApplyChanges;
Public Procedure CancelChanges;
Public procedure CloseBlob(Field: TField); override;
Public Procedure EmptyTable;
Public Procedure Refresh;
Public Procedure Sort;
Protected procedure AllocateBLOBPointers(Buffer: pAnsiChar);
Protected Procedure ClearCalcFields(Buffer: PRecBuffer); override;
Protected Procedure DefineProperties(Filer: TFiler); override;
Protected procedure DoOnNewRecord; override;
Protected procedure FreeBlobPointers(Buffer: pAnsiChar);
Protected Procedure FreeRecordBuffer(var Buffer: PRecBuffer); override;
Protected procedure FreeRecordPointers(Buffer: pAnsiChar);
Protected Procedure GetBookmarkData(Buffer: pAnsiChar; Data: Pointer); override;
Protected Procedure InternalAddRecord(Buffer: Pointer; Append: Boolean); override;
Protected Procedure InternalCancel; override;
Protected Procedure InternalClearFieldDefs;
Protected Procedure InternalClose; override;
Protected Procedure InternalDelete; override;
Protected Procedure InternalEdit; override;
Protected Procedure InternalFirst; override;
Protected Procedure InternalGotoBookmark(ABookmark: Pointer); override;
Protected Procedure InternalHandleException; override;
Protected Procedure InternalInitFieldDefs; override;
Protected Procedure InternalInitIndexDefs;
Protected Procedure InternalInitRecord(Buffer: PRecBuffer); override;
Protected procedure InternalInsert; override;
Protected Procedure InternalLast; override;
Protected Procedure InternalOpen; override;
Protected Procedure InternalPost; override;
Protected Procedure InternalRefresh; override;
Protected Procedure InternalSetToRecord(Buffer: PRecBuffer); override;
Protected Procedure Loaded; override;
Protected Procedure Notification(AComponent: TComponent; Operation: TOperation); Override;
Protected procedure ParseFilterText(const Value: String);
Protected Procedure ReadParamData(Reader: TReader);
Protected Procedure RefreshActive;
Protected Procedure RefreshFilteredRecords(RefreshData: Boolean);
Protected Procedure SetBookmarkData(Buffer: pAnsiChar; Data: Pointer); override;
Protected Procedure SetBookmarkFlag(Buffer: PRecBuffer; Value: TBookmarkFlag); override;
Protected Procedure SetFieldData(Field: TField; Buffer: Pointer); override;
Protected procedure SetFiltered(Value: Boolean); override;
Protected procedure SetFilterText(Const Value: String); override;
Protected Procedure SetParamsList(Value: TParams);
Protected Procedure SetRecNo(Value: Integer); override;
Protected Procedure UpdateIndexDefs; override;
Protected Procedure UpdateInternalFieldsInfos;
Protected Procedure UpdateParamsList;
Protected Procedure WriteParamData(Writer: TWriter);

Properties

Published property Active;
Published property AfterCancel;
Published property AfterClose;
Published property AfterDelete;
Published property AfterEdit;
Published property AfterInsert;
Published property AfterOpen;
Published property AfterPost;
Published property AfterScroll;
Published property AutoCalcFields;
Published property BeforeCancel;
Published property BeforeClose;
Published property BeforeDelete;
Published property BeforeEdit;
Published property BeforeInsert;
Published property BeforeOpen;
Published property BeforePost;
Published property BeforeScroll;
Published property Database: TSqlitePassDatabase Read GetFDatabase Write SetFDatabase;
Published property DatabaseAutoActivate: Boolean Read FDatabaseAutoActivate Write FDatabaseAutoActivate;
Published property DatasetName: String Read FDatasetName Write SetFDatasetName;
Public property DatasetType: TSqlitePassDatasetType Read FDatasetType;
Published property ExportMethod: TSqlitePassDatasetExportMethod Read FExportMethod Write FExportMethod;
Published property Filter;
Published property Filtered;
Published property FilterMode: TSqlitePassFilterMode Read FFilterMode Write FFilterMode;
Published property FilterOptions;
Published property FilterRecordLowerLimit: Cardinal Read FFilterRecordLowerLimit Write SetFFilterRecordLowerLimit;
Published property FilterRecordUpperLimit: Cardinal Read FFilterRecordUpperLimit Write setFFilterRecordUpperLimit;
Public property Filters: TSqlitePassFieldFilters Read FFieldFilters Write FFieldFilters;
Published property IndexDefs: TSqlitePassDatasetIndexDefs Read FIndexDefs Write FIndexDefs;
Public property LocateMoveState: TGetResult read FLocateMoveState;
Public property LocateRecordCount: Integer Read GetLocateRecordCount;
Published property LocateSmartRefresh: Boolean Read FLocateSmartRefresh Write FLocateSmartRefresh;
Published property LookUpCache: Boolean Read FLookUpCache Write SetFLookUpCache;
Published property LookUpMaxRecordCount: Integer Read FLookUpMaxRecordCount Write FLookUpMaxRecordCount;
Published property LookUpOptions: TLocateOptions Read FLookUpOptions Write FLookUpOptions;
Published property LookUpSmartRefresh: Boolean Read FLookUpSmartRefresh Write FLookUpSmartRefresh;
Published property MasterFields: String read GetMasterFields write SetMasterFields;
Published property MasterSource: TDataSource read GetMasterDataSource write SetMasterDataSource;
Published property MasterSourceAutoActivate: Boolean read FMasterAutoActivate write FMasterAutoActivate;
Published property OnCalcFields;
Published property OnDeleteError;
Published property OnEditError;
Published property OnExportProgress: TSqlitePassDatasetExportProgressEvent Read FOnExportProgress Write FOnExportProgress;
Published property OnFilterRecord : TSqlitePassDatasetFilterRecordEvent read FOnFilterRecord write FOnFilterRecord;
Published property OnImportProgress: TSqlitePassDatasetImportProgressEvent Read FOnImportProgress Write FOnImportProgress;
Published property OnNewRecord;
Published property OnPostError;
Published property ParamCheck: Boolean Read FParamCheck Write FParamCheck;
Public property ParamCount: Integer read GetParamsCount;
Published property Params: TParams read FParams Write SetParamsList Stored False;
Published property ProcessMessages: Boolean Read FProcessMessages Write FProcessMessages;
Published property ReadOnly: Boolean Read GetFReadOnly Write SetFReadOnly default False;
Published property RecordsCacheCapacity: TSqlitePassRecordsCacheCapacity Read FRecordsCacheCapacity Write FRecordsCacheCapacity;
Published property SortCalcFields: Boolean Read FSortCalcFields Write SetFSortCalcFields;
Published property Sorted: Boolean Read FSorted Write SetFSorted;
Published property SortedBy: String Read FSortedBy Write SetFSortedBy;
Public property SortMode: TSqlitePassSortMode Read FSortMode Write SetFSortMode;
Published property SQL: TStringList Read FSQL Write SetFSQL;
Public property SQLSelectStmt: TSqlitePassSelectStmt Read FSQLSelectStmt;
Published property VersionInfo: TSqlitePassDatasetVersionInfo Read FVersionInfo Write FVersionInfo;
Published property WriteMode: TSqlitePassWriteMode Read FWriteMode Write SetFWriteMode;

Description

Methods

Public Constructor Create(AOwner: TComponent); override;

—– Constructor - Destructor —–

Public Destructor Destroy; override;
 
Public Function BookmarkValid(Bookmark: TBookmark): Boolean; override;

—– Bookmarks —–

Public Function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override;
 
Public Function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;

Classic TDataset behavior

Public Function GetFieldData(Field: TField; Buffer: Pointer): Boolean; override;

—– —–

Public function Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;

The Locate function works as the classic one, with the same parameters, but has extended features to provide navigation in located records with LocateFirst, LocateNext, LocatePrior, LocateLast, LocateRecordCount

Public function LocateFirst: Boolean;

Moves to the first record matching locate parameters

Public function LocateLast: Boolean;

Moves to the last record matching locate parameters

Public function LocateNext: Boolean;

Moves to the next record matching locate parameters.

Public function LocatePrior: Boolean;

Moves to the prior record matching locate parameters

Public function Lookup(const KeyFields: String; const KeyValues: Variant; const ResultFields: String): Variant; override;

The Lookup function works as the classic one, with the same parameters, but has extended features to provide navigation in LookedUp records with LookupFirst, LookupNext, LookupPrior, LookupLast, LookupRecordCount

Public function LookupFirst: Variant;

Moves to the first record matching lookup parameters

Public function LookUpLast: Variant;

Moves to the last record matching lookup parameters

Public function LookupNext: Variant;

Moves to the next record matching lookup parameters

Public function LookupPrior: Variant;

Moves to the prior record matching lookup parameters

Protected Function AllocRecordBuffer: PRecBuffer; override;
 
Protected function FindRecord(Restart, GoForward: Boolean): Boolean; override;
 
Protected Function GetBookmarkFlag(Buffer: PRecBuffer): TBookmarkFlag; override;

Procedure InternalMoveToBookmark(Bookmark: Pointer);

Protected Function GetCanModify: Boolean; override;
 
Protected Function GetParamsCount: Integer;
 
Protected Function GetRecNo: Integer; override;
 
Protected Function GetRecord(Buffer: PRecBuffer; GetMode: TGetMode; DoCheck: Boolean): TGetResult; override;
 
Protected Function GetRecordCount: Integer; override;

—– Records infos —–

Protected Function GetRecordSize: Word; override;

Ok v1.00

Protected Function IsCursorOpen: Boolean; override;
 
Public Procedure ApplyChanges;

—– Apply or Cancel records modification if WriteMode is wmPostpone —–

Public Procedure CancelChanges;
 
Public procedure CloseBlob(Field: TField); override;

Classic TDataset behavior

Public Procedure EmptyTable;
 
Public Procedure Refresh;
 
Public Procedure Sort;

Sorts the dataset using the fields and sort order defined in the SortedBy property

Protected procedure AllocateBLOBPointers(Buffer: pAnsiChar);

—– Blobs —–

Protected Procedure ClearCalcFields(Buffer: PRecBuffer); override;
 
Protected Procedure DefineProperties(Filer: TFiler); override;
 
Protected procedure DoOnNewRecord; override;
 
Protected procedure FreeBlobPointers(Buffer: pAnsiChar);
 
Protected Procedure FreeRecordBuffer(var Buffer: PRecBuffer); override;
 
Protected procedure FreeRecordPointers(Buffer: pAnsiChar);
 
Protected Procedure GetBookmarkData(Buffer: pAnsiChar; Data: Pointer); override;

Keep the inherited - Function GetBookmarkStr: TBookmarkStr; override; Keep the inherited - Procedure SetBookmarkStr(const Value: TBookmarkStr); override;

Protected Procedure InternalAddRecord(Buffer: Pointer; Append: Boolean); override;

—– Navigation and Editing —–

Protected Procedure InternalCancel; override;
 
Protected Procedure InternalClearFieldDefs;
 
Protected Procedure InternalClose; override;
 
Protected Procedure InternalDelete; override;
 
Protected Procedure InternalEdit; override;
 
Protected Procedure InternalFirst; override;
 
Protected Procedure InternalGotoBookmark(ABookmark: Pointer); override;

—– Bookmarks —–

Protected Procedure InternalHandleException; override;

—– Miscalleous —–

Protected Procedure InternalInitFieldDefs; override;
 
Protected Procedure InternalInitIndexDefs;
 
Protected Procedure InternalInitRecord(Buffer: PRecBuffer); override;
 
Protected procedure InternalInsert; override;
 
Protected Procedure InternalLast; override;
 
Protected Procedure InternalOpen; override;
 
Protected Procedure InternalPost; override;
 
Protected Procedure InternalRefresh; override;
 
Protected Procedure InternalSetToRecord(Buffer: PRecBuffer); override;
 
Protected Procedure Loaded; override;

—– Override methods from TDataset —–

Protected Procedure Notification(AComponent: TComponent; Operation: TOperation); Override;
 
Protected procedure ParseFilterText(const Value: String);
 
Protected Procedure ReadParamData(Reader: TReader);
 
Protected Procedure RefreshActive;

Fetch data from physical Database

Protected Procedure RefreshFilteredRecords(RefreshData: Boolean);

—– Filtering —–

Protected Procedure SetBookmarkData(Buffer: pAnsiChar; Data: Pointer); override;
 
Protected Procedure SetBookmarkFlag(Buffer: PRecBuffer; Value: TBookmarkFlag); override;

From TDataset

Protected Procedure SetFieldData(Field: TField; Buffer: Pointer); override;
 
Protected procedure SetFiltered(Value: Boolean); override;
 
Protected procedure SetFilterText(Const Value: String); override;
 
Protected Procedure SetParamsList(Value: TParams);

—– Params —–

Protected Procedure SetRecNo(Value: Integer); override;
 
Protected Procedure UpdateIndexDefs; override;
 
Protected Procedure UpdateInternalFieldsInfos;
 
Protected Procedure UpdateParamsList;
 
Protected Procedure WriteParamData(Writer: TWriter);
 

Properties

Published property Active;

Classic dataset behavior. When set to True, opens the dataset and displays data if dataware components are linked to the datasource. When set to False, closes the dataset and frees the memory used to store dataset records.

Published property AfterCancel;
 
Published property AfterClose;
 
Published property AfterDelete;
 
Published property AfterEdit;
 
Published property AfterInsert;
 
Published property AfterOpen;
 
Published property AfterPost;
 
Published property AfterScroll;
 
Published property AutoCalcFields;

Published property BeforeCancel;
 
Published property BeforeClose;
 
Published property BeforeDelete;
 
Published property BeforeEdit;
 
Published property BeforeInsert;
 
Published property BeforeOpen;

Published property BeforePost;
 
Published property BeforeScroll;
 
Published property Database: TSqlitePassDatabase Read GetFDatabase Write SetFDatabase;

Selects the TsqlitePassDatabase component you want to depend on.

Published property DatabaseAutoActivate: Boolean Read FDatabaseAutoActivate Write FDatabaseAutoActivate;

When set to True, opens automatically the database if needed.

Published property DatasetName: String Read FDatasetName Write SetFDatasetName;

Once you are connected to a database, enters a table name or a query name. At design time, a dialog will let you choose your dataset among all the available database datasets.

Public property DatasetType: TSqlitePassDatasetType Read FDatasetType;

This property is read only. It gives you information about the currently selected dataset and can be one of the following values :

dtUnkown : The dataset type could not be recognized or the DatasetName property is empty.

dtTable : The dataset is a table.

dtQuery : The dataset is a query.

dtView : The dataset is a view.

dtSqlDirect : The SQL property has been modified or you entered a new SQL query. When the SQL text is changed, the DatasetName will automatically be set to '' assuming that the DatasetName and SQL text don't match anymore.

Published property ExportMethod: TSqlitePassDatasetExportMethod Read FExportMethod Write FExportMethod;

To be implemented

Published property Filter;

This dataset allows many kinds of filtering features that will be applied in this priority to the retrieved data :

  1. Original SQL statement using a WHERE or a LIMIT clause to filter records.

  2. Additional WHERE clause defined in the 1st part of the Filter property - when FilterMode in [fmSQL, fmSQLDirect].

  3. FilterRecordLowerLimit applies after the SQL statement is executed.

  4. FilterRecordUpperLimit applies after the SQL statement is executed.

  5. Additional filter defined in the 2nd part of the Filter property - when FilterMode is in [fmDirect, fmSQLDirect].

  6. Master - Detail relationship.

As described, the filter statement itsef can be divided in two parts that are activated depending on the FilterMode property. [1st part = SQL syntax][;][2nd part = Custom syntax]

The goal of the 2nd part is to provide filtering on calculated fields

The 1st part : follows the classic dataset filter behavior and takes a SQL WHERE clause but without the WHERE word at the begining. You can also use wildcard characters as discribed in the Sqlite help. Example #1 : country = 'France' Example #2 : customer like '%cur%'

The ';' semi-colon is used to separate the 1st and the 2nd part

The 2nd part : it uses a custom syntax close to SQL but limited For numeric fields : ComparisonOp : '=, <>, >, >=, <=, <, Null, NotNull' Value = numeric or empty (with Null and NotNull) Example 1 : MyDataset.Filter := MyField1 > 1 and < 10 or = 20; MyField7 <> 5; MyField3 Null;

Example 2 : '=' operator has a special syntax supporting multiple values separated with comma MyDataset.Filter := MyField1 = 1, 10, 20, 30; MyField2 <> 5; MyField7 NotNull;

For Boolean fields ComparisonOp : '=' Value : True or False

Example 1 : MyDataset.Filter := MyField1 = True; MyField2 = False;

For Text fields (including Memo) ComparisonOp : '=, <>, >, >=, <=, <, Null, NotNull' '=' and '<>' accept '%' or '*' wildcard char. You can use *YourText or %YourText* or YourText% as TextPattern

Example 1 : MyDataset.Filter := MyField1 = %Pasc%; MyField3 NotNull;

For Date, Time, DateTime fields ComparisonOp : '=, <>, >, >=, <=, <, Null, NotNull' Value = numeric or empty (with Null and NotNull) DateFormat : #DD-MM-YYYY# TimeFormat : #hh:mm:ss[.zzz]# DateTimeFormat : #DD-MM-YYYY hh:mm:ss[.zzz]#

Note : '#' can be replaced by single or double quote

Example 1 : MyDataset.Filter := MyField1 = #22-02-2008#; MyField3 NotNull;

Published property Filtered;

Determines whether or not the different filters are activated. The TsqlitePassDataset component can handle three filter levels that will be applied in this priority order :

1 : MasterFields/DetailFields property 2 : Filter property 3 : RecordLowerLimit/RecordUpperLimit properties

Published property FilterMode: TSqlitePassFilterMode Read FFilterMode Write FFilterMode;

Can take one of the following values :

  • fmDirect

  • fmSQL

  • fmSQLDirect - Default

See also
Filter
This dataset allows many kinds of filtering features that will be applied in this priority to the retrieved data :

  1. Original SQL statement using a WHERE or a LIMIT clause to filter records.

  2. Additional WHERE clause defined in the 1st part of the Filter property - when FilterMode in [fmSQL, fmSQLDirect].

  3. FilterRecordLowerLimit applies after the SQL statement is executed.

  4. FilterRecordUpperLimit applies after the SQL statement is executed.

  5. Additional filter defined in the 2nd part of the Filter property - when FilterMode is in [fmDirect, fmSQLDirect].

  6. Master - Detail relationship.

As described, the filter statement itsef can be divided in two parts that are activated depending on the FilterMode property.

Published property FilterOptions;

foCaseInsensitive and foNoPartialCompare applies both to SQL and Internal Filters

Published property FilterRecordLowerLimit: Cardinal Read FFilterRecordLowerLimit Write SetFFilterRecordLowerLimit;

FilterRecordLowerLimit is the lower limit of the range filter. If greater than 1, the -nth first records will not be retrieved. In other words, if FilterLowerLimit = 4, the fifth record will be the first one retrieved from the query.

Published property FilterRecordUpperLimit: Cardinal Read FFilterRecordUpperLimit Write setFFilterRecordUpperLimit;

FilterRecordUpperLimit is the upper limit of the range filter.

If greater than 1, the -nth first records will be retrieved. In other words, if FilterUpperLimit = 4 and FilterLowerLimit = 0 then only the four first records will be retrieved from the query.

If lesser than 0, the -nth last records will be retrieved. In other words, if FilterUpperLimit = -9 and FilterLowerLimit = 0 then only the nine last records will be retrieved from the query.

Public property Filters: TSqlitePassFieldFilters Read FFieldFilters Write FFieldFilters;

A list of internal filters applying to a record

Published property IndexDefs: TSqlitePassDatasetIndexDefs Read FIndexDefs Write FIndexDefs;

The IndexDefs property gives you access to the indexes definitions for the selected table. Indexes are only available if the DatasetType is a 'dtTable' type.

Public property LocateMoveState: TGetResult read FLocateMoveState;

Returns the state of the last move when locating a record

Public property LocateRecordCount: Integer Read GetLocateRecordCount;

Returns the total number records matching the locate link(SqlitePassDataset.Locate) arguments

Published property LocateSmartRefresh: Boolean Read FLocateSmartRefresh Write FLocateSmartRefresh;

When set to TRUE, Located records list is updated every time data is refetched from database. If FALSE, the located records list is not synchronized : Located records are lost when data is refetched

Published property LookUpCache: Boolean Read FLookUpCache Write SetFLookUpCache;

Activate or disactivate the LookUpCache

Published property LookUpMaxRecordCount: Integer Read FLookUpMaxRecordCount Write FLookUpMaxRecordCount;

The LookUpMaxRecordCount is used to limit the number of records returned by the Lookup functions in order to improve speed with large tables

Published property LookUpOptions: TLocateOptions Read FLookUpOptions Write FLookUpOptions;

loCaseInsensitive, loPartialKey options used when lookup'ing' records

Published property LookUpSmartRefresh: Boolean Read FLookUpSmartRefresh Write FLookUpSmartRefresh;

To be implemented

Published property MasterFields: String read GetMasterFields write SetMasterFields;

Classic table MasterFields behavior.

At design time, a dialog will let you create or modify the relation between MasterFields and DetailFields.

A relation is defined like this : MasterFieldName=DetailFieldName If you want set several relations, they must be separated by a ';' MasterFieldName1=DetailFieldName1;MasterFieldName2=DetailFieldName2

Published property MasterSource: TDataSource read GetMasterDataSource write SetMasterDataSource;

Classic table MasterSource behavior.

Published property MasterSourceAutoActivate: Boolean read FMasterAutoActivate write FMasterAutoActivate;

When set to TRUE, the dataset will try to automatically open the master dataource if necessary

Published property OnCalcFields;
 
Published property OnDeleteError;
 
Published property OnEditError;
 
Published property OnExportProgress: TSqlitePassDatasetExportProgressEvent Read FOnExportProgress Write FOnExportProgress;

Additionnal Events

Published property OnFilterRecord : TSqlitePassDatasetFilterRecordEvent read FOnFilterRecord write FOnFilterRecord;
 
Published property OnImportProgress: TSqlitePassDatasetImportProgressEvent Read FOnImportProgress Write FOnImportProgress;
 
Published property OnNewRecord;
 
Published property OnPostError;
 
Published property ParamCheck: Boolean Read FParamCheck Write FParamCheck;

Not used - TODO

Public property ParamCount: Integer read GetParamsCount;

To be properly implemented

Published property Params: TParams read FParams Write SetParamsList Stored False;

Not used - TODO

Published property ProcessMessages: Boolean Read FProcessMessages Write FProcessMessages;

Not used - TODO

Published property ReadOnly: Boolean Read GetFReadOnly Write SetFReadOnly default False;
 
Published property RecordsCacheCapacity: TSqlitePassRecordsCacheCapacity Read FRecordsCacheCapacity Write FRecordsCacheCapacity;

Set the number of records that can fit within one memory bloc before the need to allocate a new records memory bloc. Using a larger RecordsCacheCapacity with large tables or queries should improve loading speed

Published property SortCalcFields: Boolean Read FSortCalcFields Write SetFSortCalcFields;
 
Published property Sorted: Boolean Read FSorted Write SetFSorted;

Determines whether or not the sortedBy property is activated.

Published property SortedBy: String Read FSortedBy Write SetFSortedBy;

The SortedBy property always takes a SQL 'ORDER BY' clause but without the 'ORDER BY' expression at the begining
Example : 'car_names ASC, car_types DESC'. Field names with space must be quoted (see TSqlitePassDatabaseOptions.QuoteStyle).
It has two different sort modes :
When the SortMode property is set to smDirect, (this is the default value) the dataset is directly sorted in memory, using quicksort. This is fast and handy to sort dates, times, and calculated fields since you don't have to think about date or time format.
When the SortMode property is set to smSQL, the dataset is sorted using a SQL ORDER BY statement. Calculated fields cannot be sorted this way.
At design time, a dialog will let you create or modify the sort order.

Public property SortMode: TSqlitePassSortMode Read FSortMode Write SetFSortMode;

Can take one of the following values :

  • smDirect - Default

  • smSQL

See also
SortedBy
The SortedBy property always takes a SQL 'ORDER BY' clause but without the 'ORDER BY' expression at the begining
Example : 'car_names ASC, car_types DESC'. Field names with space must be quoted (see TSqlitePassDatabaseOptions.QuoteStyle).
Published property SQL: TStringList Read FSQL Write SetFSQL;

SQL represents the SQL statement used to retrieve data from the database.

For tables, it will automatically be set to :

SELECT * FROM TableName; if all fields need to be retrieved from the table, or to :

SELECT field1, field2... FROM TableName; if only some fields need to be retrieved from the table.

For queries, it will reflect the query SQL statement. You can also directly write your own SQL statement to fit your needs or to interact directly with the database. In this case, the datasetname propery will be set to '' (empty) and the datasetType will be set to dtDirectSql.

Public property SQLSelectStmt: TSqlitePassSelectStmt Read FSQLSelectStmt;

The internal schema of the current SQL statement. It gives you access to advanced information - read only

Published property VersionInfo: TSqlitePassDatasetVersionInfo Read FVersionInfo Write FVersionInfo;

Returns the dataset component version number

Published property WriteMode: TSqlitePassWriteMode Read FWriteMode Write SetFWriteMode;
 

Generated by PasDoc 0.11.0 on 2009-10-08 22:34:50