Âñå áåñïëàòíî
    Âñå ññûëêè íà ôàéëû, ðàñïîëîæåííûå íà ñòðàíèöàõ ñàéòà, äîáàâëåíû ïîëüçîâàòåëÿìè è äîñòóïíû äëÿ áåñïëàòíîãî ñêà÷èâàíèÿ. Çà ñîäåðæàíèå ýòèõ ôàéëîâ àäìèíèñòðàöèÿ ñàéòà îòâåòñòâåííîñòè íå íåñåò.



Âîïðîñû
  Êàê ïîêàçàòü balloon tooltips â ïðîãðàììå
   Êàòåãîðèÿ: Ïðèëîæåíèå
  Îïðåäåëåíèå ðàçìåðà ôàéëà
   Êàòåãîðèÿ: Ôàéëîâàÿ ñèñòåìà
  Óäàëèòü ñâîé æå exe-øíèê
   Êàòåãîðèÿ: Ïðèëîæåíèå
  Ïðîöåäóðû è ôóíêöèè äëÿ ðàáòû ñ ôàéëàìè
   Êàòåãîðèÿ: Ôàéëîâàÿ ñèñòåìà
  Ïðîãðàììíî ñêðûòü MainMenu
   Êàòåãîðèÿ: Êîìïîíåíòû
  Êàê ïîëó÷èòü êîä HTM ñòðàíèöû çíàÿ åå URL
   Êàòåãîðèÿ: Èíòåðíåò è Ñåòè
  Óïàêîâàòü *.mdb-ôàéë
   Êàòåãîðèÿ: Áàçû äàííûõ
  Çàìåíà ïîäñòðîêè â ñòðîêå
   Êàòåãîðèÿ: Òåêñò è ñòðîêè
  Èçìåíèòü ñòðóêòóðó ABS (AbsoluteDB)
   Êàòåãîðèÿ: Áàçû äàííûõ
  Ñîõðàíèòü äîêóìåíò Word êàê RTF íà DELPHI
   Êàòåãîðèÿ: Ôàéëîâàÿ ñèñòåìà

FIBPlus. Ñâîéñòâà è ìåòîäû. TpFIBDataset

  << Íàçàä ê Îãëàâëåíèþ   


ßâëÿåòñÿ ïîòîìêîì TDataSet è ïîääåðæèâàåò âñå åãî ìåòîäû è ñâîéñòâà. Çäåñü áóäóò ïåðå÷èñëåíû òîëüêî ñïåöèôè÷åñêèå ñâîéñòâà TpFIBDataSet.

Ñâîéñòâà

Active
Ñìîòðèòå ñïðàâêó ïî TDataSet.

Filter
Ñìîòðèòå îïèñàíèå ñâîéñòâà â ñïðàâêå ïî Delphi/C++Builder, îíî íè÷åì íå îòëè÷àåòñÿ îò ñâîéñòâ â TDataSet.

FilterOptions
Ñìîòðèòå îïèñàíèå ñâîéñòâà ñ ñïðàâêå ïî Delphi/C++Builder, îíî íè÷åì íå îòëè÷àåòñÿ îò ñâîéñòâ â TDataSet.

AllowedUpdateKinds
Îáúÿâëåííûå êàê
TUpdateKind = (ukModify, ukInsert, ukDelete);
TUpdateKinds = set of TUpdateKind;

Ýòî ñâîéñòâî ïîçâîëÿåò çàäàòü ðåæèì îáíîâëåíèÿ äàòàñåòà. ukModify îïðåäåëÿåò, áóäóò ëè ïðîèçâîäèòüñÿ ìîäèôèêàöèè äàòàñåòà, ukInsert âñòàâêè è ukDelete óäàëåíèÿ. Åñëè îïöèÿ âûêëþ÷åíà, íî â ìîìåíò îïåðàöèè áèáëèîòåêà áóäåò âûçâàòü òèõîå èñêëþ÷åíèå Abort, òî îïåðàöèÿ íå áóäåò âûïîëíÿòüñÿ.

AutoCalcFields
Çíà÷åíèå îïöèè àíàëîãè÷íî çíà÷åíèþ îïöèè äëÿ TDataSet.

AutoCommit
Åñëè îïöèÿ óñòàíîâëåíà â True, òî, â çàâèñèìîñòè îò íàñòðîåê UpdateTransaction, ïîñëå êàæäîé ìîäèôèöèðóþùåé îïåðàöèè Insert/Update/Delete áóäåò âûçûâàòüñÿ ïðèíóäèòåëüíûé Commit/CommitRetaining.

AutoUpdateOptions
Î÷åíü âàæíàÿ ãðóïïà îïöèé. Åñëè ïîíèìàòü, êàê ðàáîòàåò äàííàÿ ãðóïïà îïöèé, ìîæíî èçáåæàòü çíà÷èòåëüíîãî êîëè÷åñòâà ïðîáëåì.

TAutoUpdateOptions= class (TPersistent)
property AutoParamsToFields: Boolean .. default False;
property AutoReWriteSqls: Boolean .. default False;
property CanChangeSQLs: Boolean .. default False;
property GeneratorName: string;
property GeneratorStep: Integer .. default 1;
property KeyFields: string;
property ParamsToFieldsLinks: TStrings;
property SeparateBlobUpdate: Boolean .. default False;
property UpdateOnlyModifiedFields: Boolean .. default False;
property UpdateTableName: string;
property WhenGetGenID: TWhenGetGenID .. default wgNever;
property UseExecuteBlock:Boolean;
property UseReturningFields: TSetReturningFields; end;
TWhenGetGenID=(wgNever,wgOnNewRecord,wgBeforePost);


Åñëè îïöèÿ AutoRewriteSQLs óñòàíîâëåíà â True, òî, ïðè íàëè÷èè ïóñòûõ SQLText äëÿ InsertSQL, UpdateSQL, DeleteSQL è RefreshSQL, áóäåò àâòîìàòè÷åñêè ïðîèçâîäèòüñÿ èõ ãåíåðàöèÿ íà îñíîâå KeyFields, UpdateTableName.
Åñëè îïöèÿ CanChangeSQLs óñòàíîâëåíà â True, òî ðàçðåøåíà ïåðåçàïèñü íåïóñòûõ SQL.

Îïöèè GeneratorName è GeneratorStep çàäàþò, ñîîòâåòñòâåííî, èìÿ è øàã ãåíåðàòîðà

Îïöèÿ KeyFields ñîäåðæèò ñïèñîê êëþ÷åâûõ ïîëåé

Îïöèÿ SeparateBlobUpdate óïðàâëÿåò çàïèñüþ BLOB ïîëåé â áàçó äàííûõ. Åñëè ýòà îïöèÿ óñòàíîâëåíà â True, òî ñíà÷àëà áóäåò ïðîèçâîäèòüñÿ çàïèñü ñòðîêè áåç BLOB ïîëÿ, à çàòåì, â ñëó÷àå óñïåõà, áóäåò çàïèñûâàòüñÿ ñàìî BLOB ïîëå.

Åñëè îïöèÿ UpdateOnlyModifiedFields óñòàíîâëåíà â True è åñëè òàêæå óñòàíîâëåíû ÑanChangeSQLs, òî äëÿ êàæäîé îïåðàöèè îáíîâëåíèÿ áóäåò ôîðìèðîâàòüñÿ íîâûé SQL-çàïðîñ, â êîòîðîì áóäóò ïðåäñòàâëåíû òîëüêî ðåàëüíî èçìåíåííûå ïîëÿ.

UpdateTableName äîëæíà ñîäåðæàòü èìÿ îáíîâëÿåìîé òàáëèöû

WhenGetGenId ïîçâîëÿåò çàäàòü ðåæèì èñïîëüçîâàíèÿ ãåíåðàòîðà: íèêîãäà, íà íîâóþ çàïèñü, íåïîñðåäñòâåííî ïåðåä îïåðàöèåé Post.

ParamsToFieldsLinks - ïðåäñòàâëÿåò ñîáîé «êàðòó ñîîòâåòñòâèÿ» ìåæäó ïîëÿìè çàïðîñà è ïàðàìåòðàìè. Åñëè ýòî ñâîéñòâî çàïîëíåíî, òî ïðè âñòàâêå íîâîé çàïèñè, àâòîìàòè÷åñêè óêàçàííûå ïîëÿ áóäóò çàïîëíåíû çíà÷åíèÿìè ñîîòâåòñòâóþùèõ ïàðàìåòðîâ. Îñîáåííî àêòóàëüíî ýòî ñâîéñòâî äëÿ äåòàëü-äàòàñåòà â ðåæèìå ìàñòåð äåòàëü.

AutoParamsToFields - åñëè ñîäåðæèò çíà÷åíèå True òî ParamsToFieldsLinks áóäåò çàïîëíåí àâòîìàòè÷åñêè.

UseExecuteBlock : Ðàáîòàåò òîëüêî ïðè CachedUpdates=True.Åñëè âêëþ÷åíî,òî ïðè ApplyUpdates,ApplyUpdToBase áóäóò ãåíåðèòüñÿ çàïðîñû òèïà EXECUTE BLOCK. Ò.å. èçìåíåíèÿ áóäóò ïîñûëàòüñÿ â áàçó íå äëÿ êàæäîé çàïèñè îòäåëüíî, à ïà÷êàìè ïî 255 çàïèñåé.

UseReturningFields : Óêàçûâàåò èñïîëüçîâàòü ëè äëÿ ãåíåðàöèè UpdateSQL,InsertSQL ñåêöèþ RETURNING, ÷òî ïîçâîëÿåò ïîñëå âûïîëíåíèÿ ìîäèôèöèðóþùåãî çàïðîñà ÷àñòè÷íî «îñâåæèòü» çàïèñü áåç âûïîëíåíèÿ ìåòîäà Refresh. (ðàáîòàåò íà÷èíàÿ ñ ôàéðáåðä 2.0) Èìååò òðè âîçìîæíûõ çíà÷åíèÿ.

rfAll - âêëþ÷àòü â ñåêöèþ RETURNING âñå ïîëÿ
rfKeyFields - âêëþ÷àòü â ñåêöèþ RETURNING òîëüêî êëþ÷åâûå ïîëÿ
rfBlobFields- âêëþ÷àòü â ñåêöèþ RETURNING Blob ïîëÿ.

Ò.å., ïðè èñïîëüçîâàíèè íàñòðîåê AutoUpdateOptions FIBPlus ïîçâîëÿåò èçáàâèòüñÿ îò ãåíåðàöèè SQL â ðåæèìå design time è ïåðåëîæèòü ýòó çàäà÷ó íà âðåìÿ èñïîëíåíèÿ ïðîãðàììû. Äëÿ ýòîãî íóæíî ëèøü ïðèïèñàòü èìÿ îáíîâëÿåìîé òàáëèöû è êëþ÷åâîå ïîëå.

Äàííûå êîä âçÿò èç ïðèìåðà AutoUpdateOptions:
pFIBDataSet1.SelectSQL.Text := 'SELECT * FROM EMPLOYEE'; 
pFIBDataSet1.AutoUpdateOptions.AutoReWriteSqls := True;
pFIBDataSet1.AutoUpdateOptions.CanChangeSQLs  := True;
pFIBDataSet1.AutoUpdateOptions.UpdateOnlyModifiedFields := True;
'EMPLOYEE'; 'EMP_NO'; 'EMP_NO_GEN'; wgBeforePost;
pFIBDataSet1.AutoUpdateOptions.UpdateTableName
pFIBDataSet1.AutoUpdateOptions.KeyFields
pFIBDataSet1.AutoUpdateOptions.GeneratorName
pFIBDataSet1.AutoUpdateOptions.WhenGetGenID
pFIBDataSet1.Open;


CachedUpdates
Ýòî ñâîéñòâî ñîîòâåòñòâóåò àíàëîãè÷íîìó ñâîéñòâó êîìïîíåíòà TDataSet, ïîäðîáíåå ñìîòðè ðóêîâîäñòâî ïîëüçîâàòåëÿ òåìó «Èñïîëüçîâàíèå êýøèðîâàííûõ èçìåíåíèé».

CacheModelOptions
Ýòî «ðåâîëþöèîííîå» íîâøåñòâî FIBPlus. Èñïîëüçóÿ ýòó îïöèþ, Âû ìîæåòå âûáðàòü ìîäåëü õðàíåíèÿ êåøà äàòàñåòà. Ïîäðîáíîå îïèñàíèå ðàáîòû â ðåæèìå îãðàíè÷åííîãî êåøà îïèñàíî â ðàçäåëå ...

TCacheModelOptions = class(TPersistent)
property CacheModelKind: TCacheModelKind default cmkStandard;
property BufferChunks: Integer default vBufferCacheSize;
property PlanForDescSQLs:string;
property BlobCacheLimit:integer; end;
TCacheModelKind=(cmkStandard,cmkLimitedBufferSize);


CacheModelKind ìîæåò ïðèíèìàòü çíà÷åíèå cmkStandard cmkLimitedBuffersSize. Ïðè óñòàíîâëåíèè ýòîé îïöèè â cmkLimitedBuffersSize äàòàñåò áóäåò çàãðóæàòü â ïàìÿòü ïðèëîæåíèÿ ñòîëüêî çàïèñåé, ñêîëüêî óñòàíîâëåíî â ñâîéñòâå BuffersChunks.  äîïîëíåíèè ê ýòîìó ìîæíî óêàçàòü ïëàí äëÿ âûïîëíåíèÿ îáðàòíûõ çàïðîñîâ (áûñòðîå èçâëå÷åíèå ïîñëåäíèõ çàïèñåé âûáîðêè). BlobCacheLimit – óêàçûâàåò ìàêñèìàëüíîå ÷èñëî áëîáîâ óäåðæèâàåìûõ â êýøå.

Conditions
Ïîäðîáíåå î äîïîëíèòåëüíûõ óñëîâèÿõ ÷èòàéòå â Ðóêîâîäñòâå ïîëüçîâàòåëÿ.

Container
Ïîäðîáíåå îá èñïîëüçîâàíèè êîíòåéíåðîâ ñìîòðèòå îïèñàíèå êîìïîíåíòà TpFIBDatasetContainer.

Database
Ýòî ñâîéñòâî èñïîëüçóåòñÿ äëÿ ïîäêëþ÷åíèÿ äàòàñåòà ê áàçå äàííûõ.

DataSet_ID
Ñâîéñòâî ïîçâîëÿåò çàäàòü êîä äàòàñåòà, õðàíÿùåãîñÿ â ðåïîçèòîðèè. Åñëè çíà÷åíèå ñâîéñòâà îòëè÷íî îò íóëÿ, òî ïðè îòêðûòèè äàòàñåòà áóäåò ïðîèçâåäåíà âûãðóçêà íàñòðîåê èç ðåïîçèòîðèÿ äàòàñåòîâ è çàïîëíåíî ñâîéñòâî Description. Ïîäðîáíåå î èñïîëüçîâàíèè ðåïîçèòîðèåâ FIBPlus ÷èòàéòå â ðàçäåëå «Ðåïîçèòîðèè FIBPlus» à òàêæå ñìîòðèòå äåìîíñòðàöèîííûå ïðèìåðû XXXRepository

Description
Ýòî ñâîéñòâî îïèñàíèå äàòàñåòà, êîòîðîå èñïîëüçóåòñÿ â ðåïîçèòîðèè äàòàñåòîâ.

DefaultFormats
Ýòà ãðóïïà îïöèé ïîçâîëÿåò çàäàòü ôîðìàòû îòîáðàæåíèÿ ñòàíäàðòíûõ ïîëåé äëÿ ýòîãî äàòàñåòà. Îïèñàíèå âûãëÿäèò ñëåäóþùèì îáðàçîì:
TFormatFields = class(TPersistent) property DateTimeDisplayFormat: string; 
property NumericDisplayFormat: string; property NumericEditFormat: string;
property DisplayFormatDate: string; property DisplayFormatTime: string;
end;


Ò.å., âû ìîæåòå çàäàòü ôîðìàò îòîáðàæåíèÿ äëÿ ïîëåé
TDateTimeField/TDataField/TTimeField, îòîáðàæåíèÿ è ðåäàêòèðîâàíèÿ TnumericField.
Ïîäðîáíåå ñì. â ðóêîâîäñòâî ïîëüçîâàòåëÿ

DetailConditions
Ýòî ãðóïïà îïöèé îáëåã÷àåò ðàáîòó â ðåæèìå master-detail. Âîò åå îïèñàíèå:
TDetailCondition=(dcForceOpen,dcIgnoreMasterClose,dcForceMasterRefresh, dcWaitEndMasterScroll);
TDetailConditions= set of TDetailCondition;


dcForceOpen - åñëè ýòà îïöèÿ âêëþ÷åíà, òî äåòàëüíûå äàòàñåò áóäåò îòêðûâàòüñÿ àâòîìàòè÷åñêè ïðè îòêðûòèè ìàñòåðà dcIgnoreMasterClose îïöèÿ îçíà÷àåò, ÷òî äåòàëüíûé äàòàñåò íå áóäåò çàêðûâàòüñÿ â ñëó÷àå çàêðûòèÿ ìàñòåðà dcForceMasterRefresh ïðè îáíîâëåíèè äåòàëüíîãî äàòàñåòà áóäåò ïðîèçâîäèòüñÿ îáíîâëåíèå ìàñòåð-äàòàñåòà – áóäåò âûçûâàòüñÿ åãî RefreshSQL dcWaitEndMasterScroll îïöèÿ îçíà÷àåò, ÷òî ïðè ïðîêðóòêå ìàñòåðà âûæèäàåòñÿ íåêîòîðîå âðåìÿ è òîëüêî ïîòîì ïðîèñõîäèò ïåðåîòêðûòèå äåòàëè. Îïöèÿ ïîçâîëÿåò èçáåæàòü ëèøíåé ðàáîòû ïðè ïðîêðóòêå ìàñòåð-äàòàñåòà

FieldOriginalRule
Ýòî ñâîéñòâî ïîçâîëÿåò ðóêîâîäèòü çàïîëíåíèåì ñâîéñòâà TField.Origin è ìîæåò ïðèíèìàòü íåñêîëüêî çíà÷åíèé:

TfieldOriginRule =(forNoRule, forTableAndFieldName, forClientFieldName, forTableAliasAndFieldName);

Çíà÷åíèÿìè, ñîîòâåòñòâåííî, ÿâëÿþòñÿ: íå çàïîëíÿòü, äëÿ òàáëèöû è èìåíè ïîëÿ, ïðîñòî èìÿ ïîëÿ íà êëèåíòå, äëÿ àëèàñà òàáëèöû è èìåíè ïîëÿ. Ñâîéñòâî Origin çàïîëíÿåòñÿ òîëüêî â ðåæèìå âûïîëíåíèÿ ïðîãðàììû.

Options
Ýòà ãðóïïà îïöèé - îäíà èç îñíîâíûõ è íåîáõîäèìûõ äëÿ ïîíèìàíèÿ òîíêîñòåé ðàáîòû ñ TpFIBDataSet. Îïèñàíèå ãðóïïû îïöèé:

TpFIBDsOption = (poTrimCharFields, poRefreshAfterPost, poRefreshDeletedRecord, poStartTransaction, poAutoFormatFields, poProtectedEdit, poKeepSorting, poPersistentSorting, poVisibleRecno, poNoForceIsNull, poFetchAll, poFreeHandlesAfterClose, poCacheCalcFields);
TpFIBDsOptions= set of TpFIBDsOption;


poStartTransaction -ñòàðòîâàòü òðàíçàêöèþ ïðè îòêðûòèè äàòàñåòà, åñëè îíà íå àêòèâíà
poTrimCharFields -óñåêàòü êîíöåâûå ïðîáåëû äëÿ ïîëåé òèïà CHAR/VARCHAR
poRefreshAfterPost -âûïîëíÿòü RefreshSQL, ïîñëå ôèêñàöèè èçìåíåíèé â ÁÄ, ïîñëå ìåòîäà Post;
poRefreshDeletedRecord - óäàëÿòü èç êåøà çàïèñü ïîñëå âûïîëíåíèÿ RefreshSQL, åñëè òîò íå âåðíóë çàïèñè
poAutoFormatFields -èñïîëüçîâàòü àâòîìàòè÷åñêîå ôîðìàòèðîâàíèå äëÿ äàòàñåòà
poProtectedEdit -èñïîëüçîâàòü çàùèùåííîå ðåäàêòèðîâàíèå (ïîäðîáíåå îïèñàíî â ðàçäåëå Çàùèùåííîå ðåäàêòèðîâàíèå)
poKeepSorting - ïîìåùàòü äîáàâëåííûå ëèáî èçìåíåííûå çàïèñè â ïðàâèëüíóþ ïîçèöèþ áóôåðà, êîòîðàÿ îòâå÷àåò ëîêàëüíîé ñîðòèðîâêå äàòàñåòà. Ïîäðîáíåå ðàáîòà ñ ëîêàëüíîé ñîðòèðîâêîé áóäåò ðàññìîòðåíà â ðàçäåëå Ëîêàëüíàÿ ñîðòèðîâêà.
poPersistentSorting -ñîõðàíÿòü ñîðòèðîâêó è âîññòàíàâëèâàòü ïðè ñëåäóþùåì îòêðûòèè äàòàñåòà.
poVisibleRecno - ïðè âêëþ÷åííîé îïöèè äîáàâëÿåòñÿ ïîëå RecNo
poNoForceIsNull - åñëè îïöèÿ âûêëþ÷åíà, òî äëÿ ïàðàìåòðîâ â ñëó÷àå åñëè îíè NULL óñëîâèå where âèäà FIELD1 = :FIELD1 áóäåò çàìåíÿòñÿ íà where FIELD IS NULL.  íåêîòîðûõ ñëó÷àÿõ òàêîå ïîâåäåíèå ìîæåò áûòü íåæåëàòåëüíî. Íàïðèìåð, åñëè íóæíî âîçâðàòèòü èíôîðìàöèþ î òèïå ïàðàìåòðà, ñëåäóåò âêëþ÷èòü ýòó îïöèþ.
poFetchAll - ïðè âêëþ÷åííîé îïöèè áóäåò ïðîèçâîäèòüñÿ ïîëíûé fetch äàííûõ, ÷òî ìîæåò ïîòðåáîâàòüñÿ, íàïðèìåð, äëÿ ñïðàâî÷íèêîâ
poFreeHandlesAfterClose - ýòà îïöèÿ îòâå÷àåò çà òî, ÷òîáû àâòîìàòè÷åñêè ñðàçó æå ïîñëå çàêðûòèÿ çàïðîñà (ìîäèôèöèðóþùèé çàïðîñ, ëèáî ñåëåêòèâíûé ïîñëå fetch âñåõ çàïèñåé) âûçûâàëîñü àâòîìàòè÷åñêîå
îñâîáîæäåíèÿ ðåñóðñîâ, ñâÿçàííûõ ñ çàïðîñîì FreeHandle
poCacheCalcFields - ïðè âêëþ÷åííîé îïöèè áóäóò êýøèðîâàòüñÿ âû÷èñëÿåìûå è ëóêàï ïîëÿ.
poUseSelectForLock - ïðè âêëþ÷åííîé îïöèè, äëÿ ñîçäàíèÿ ëîêèðóþùåãî çàïðîñà áóäåò ïðèìåíÿòüñÿ ñèíòàêñèñ SELECT 1 FROM TABLE1 FOR UPDATE WITH LOCK

PrepareOptions
Ýòî òàêæå êëþ÷åâûå îïöèè äëÿ òîíêîé íàñòðîéêè ðàáîòû äàòàñåòà
TpPrepareOption = (pfSetRequiredFields, pfSetReadOnlyFields, pfImportDefaultValues, psUseBooleanField, psUseGuidField, psSQLINT64ToBCD, psApplyRepositary, psGetOrderInfo, psAskRecordCount, psCanEditComputedFields, psSetEmptyStrToNull, psSupportUnicodeBlobs, psUseLargeIntField);
TpPrepareOptions=set of TpPrepareOption;


pfSetRequiredFields– åñëè âêëþ÷åíî òî âçàïîëíÿòüñÿ ñâîéñòâî Required. Äëÿ NOT NULL True, äëÿ îñòàëüíûõ False. (Ýòà îïöèÿ íå âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå)

pfSetReadOnlyFields – Åñëè âêëþ÷åíî, òî òå ïîëÿ äàòàñåòà, êîòîðûå íå ó÷àñòâóþò â ìîäèôèöèðóþùèõ çàïðîñàõ, àâòîìàòè÷åñêè ñòàíîâÿòñÿ ReadOnly. Ò.å. èõ íåëüçÿ áóäåò èçìåíÿòü äàæå â áóôåðå äàòàñåòà. Êðîìå òîãî ñòàíîâÿòñÿ ReadOnly òå ïîëÿ, êîòîðûå ÿâëÿþòñÿ êàëüêóëèðóåìûìè íà ñåðâåðå. (Ýòà îïöèÿ âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå, ñ öåëüþ âûÿñíèòü êàêèå ïîëÿ ÿâëÿþòñÿ server-calculated)

pfImportDefaultValues – Åñëè èìåþò çíà÷åíèå ïî óìîë÷àíèþ, DefaultExpression.
âêëþ÷åíî, òî òå ïîëÿ äàòàñåòà, êîòîðûå â áàçå àâòîìàòè÷åñêè ïîëó÷àò ñîîòâåòñòâóþùåå çíà÷åíèå â
ñâîéñòâî DefaultExpression. Ýòî ñâîéñòâî èñïîëüçóåòñÿ ïðè Insert/Append íîâîé çàïèñè. (Ýòà îïöèÿ âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå, ñ öåëüþ ïîëó÷åíèÿ òåêñòà çíà÷åíèÿ ïî óìîë÷àíèþ)

pfImportDefaultValues – Åñëè âêëþ÷åíî, òî òå ïîëÿ äàòàñåòà, êîòîðûå â áàçå èìåþò çíà÷åíèå ïî óìîë÷àíèþ, àâòîìàòè÷åñêè ïîëó÷àò ñîîòâåòñòâóþùåå çíà÷åíèå â ñâîéñòâî DefaultExpression. Ýòî ñâîéñòâî èñïîëüçóåòñÿ ïðè Insert/Append íîâîé çàïèñè. (Ýòà îïöèÿ âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå, ñ öåëüþ ïîëó÷åíèÿ òåêñòà çíà÷åíèÿ ïî óìîë÷àíèþ)

psUseBooleanField – Åñëè âêëþ÷åíî, òî äàòàñåò ñìîæåò èñïîëüçîâàòü Boolean ïîëÿ. Ïîäðîáíåå ñì. â òåìå «Èñïîëüçîâàíèå óíèêàëüíûõ òèïîâ ïîëåé». (Ýòà îïöèÿ âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå, ñ öåëüþ ïîëó÷åíèÿ äîìåíà ïîëÿ)

psUseGuidField – Åñëè âêëþ÷åíî, òî äàòàñåò ñìîæåò èñïîëüçîâàòü GUID ïîëÿ. Ïîäðîáíåå ñì. â òåìå «Èñïîëüçîâàíèå óíèêàëüíûõ òèïîâ ïîëåé» (Ýòà îïöèÿ âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå, ñ öåëüþ ïîëó÷åíèÿ äîìåíà ïîëÿ

psSQLINT64ToBCD – Åñëè âêëþ÷åíî, òî äàòàñåò áóäåò èñïîëüçîâàòü TBCDField äëÿ ïîëåé òèïà NUMERIC(x,y), ãäå y áîëüøå 4. Ïîäðîáíåå ñì. â òåìå «Èñïîëüçîâàíèå óíèêàëüíûõ òèïîâ ïîëåé» (Ýòà îïöèÿ íå âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå)
psApplyRepositary – Åñëè âêëþ÷åíî, òî äàòàñåò áóäåò èñïîëüçîâàòü ðåïîçèòîðèé ïîëåé, äëÿ çàïîëíåíèÿ òàêèõ ñâîéñòâ ïîëåé, êàê DisplayLabel,DisplayFormat, EditFormat è ò.ä. Ïîäðîáíåé ñì â òåìå «Ðåïîçèòîðèè FIBPlus»
psGetOrderInfo – Åñëè âêëþ÷åíî, òî ïðè îòêðûòèè äàòàñåòà àâòîìàòè÷åñêè çàïîëíÿåòñÿ ñâîéñòâî äàòàñåòà SortFields, êîòîðîå â äàëüíåéøåì èñïîëüçóåòñÿ â ðåæèìàõ îãðàíè÷åííîãî êýøà è ðåæèìàõ «óäåðæèâàíèÿ» ñîðòèðîâêè ïðè îïåðàöèÿõ âñòàâêè ìîäèôèêàöèè çàïèñåé. Ïîäðîáíåå ñì. â òåìå «Ëîêàëüíàÿ ñîðòèðîâêà». (Ýòà îïöèÿ íå âûçûâàåò äîïîëíèòåëüíûå çàïðîñû ê áàçå)

psAskRecordCount – Åñëè âêëþ÷åíî, òî ïåðåä îòêðûòèåì äàòàñåòà áóäåò ïîñëàí çàïðîñ ê ñåðâåðó, ñ öåëüþ âûÿñíèòü êîëè÷åñòâî çàïèñåé, êîòîðûå ïîïàäàþò ïîä óñëîâèÿ çàïðîñà. Ïîñëå ýòîãî ñâîéñòâî RecordCount áóäåò âîçâðàùàòü íå êîëè÷åñòâî îòôåò÷åííûõ çàïèñåé, à êîëè÷åñòâî ïîïàâøèõ ïîä óñëîâèÿ çàïðîñà.

psSetEmptyStrToNull – Åñëè âêëþ÷åíî, òî åñëè ñòðîêîâîå ïîëå ñîäåðæèò ïóñòóþ ñòðîêó, è ýòà çàïèñü ìîäèôèöèðîâàíà, òî ïðè ïðèìåíåíèè èçìåíåíèé ê áàçå, äëÿ ýòîãî ïîëÿ áóäåò îòïðàâëåíî Null çíà÷åíèå. Íåîáõîäèìîñòü ýòîé îïöèè ñâÿçàíà ñ òåì, ÷òî ñòàíäàðòíûå DBÑontrols íå ìîãóò ïîêàçàòü, èëè ïðèíÿòü Null çíà÷åíèå. Îíî â íèõ îòîáðàæàåòñÿ èìåííî êàê ïóñòàÿ ñòðîêà.

psUseLargeIntField – Åñëè âêëþ÷åíî, òî ïîëÿ òèïà BIGINT, NUMERIC(18,0) áóäóò ïðåäñòàâëåíû êëàññîì TFIBLargeField. Åñëè âûêëþ÷åíî, òî îíè áóäóò ïðåäñòàâëåíû êëàññîì TFIBBCDField.
Òàêæå äëÿ PrepareOptions è Options åñòü ðåäàêòîðû, îáëåã÷àþùèå êîìïëåêñíóþ íàñòðîéêó äàòàñåòà. Ïîìèìî ýòîãî, â èíñòðóìåíòå FIBPlusTools ýòè îïöèè ìîæíî íàñòðîèòü äëÿ êîìïîíåíòîâ TpFIBDataSet, âíîâü äîáàâëÿåìûõ â ïðîåêò.

RefreshTransactionKind
Ýòî ñâîéñòâî ïîçâîëÿåò çàäàòü, â êàêîé òðàíçàêöèè (÷èòàþùåé èëè îáíîâëÿþùåé) áóäåò âûçâàòüñÿ RefreshSQL. Ïîäðîáíåå ñì. â òåìå î ðåæèìå ðàçäåëåííûõ òðàíçàêöèé.

SQLs
Ýòî ñâîéñòâî ñîäåðæèò òåêñòû SQL-çàïðîñîâ.

SQLScreenCursor
Ýòî ñâîéñòâî ïîçâîëÿåò çàäàòü êóðñîð ýêðàíà äëÿ äîëãèõ îïåðàöèé äàòàñåòà.

Transaction
Ýòî ñâîéñòâî âîçâðàùàåò òðàíçàêöèþ, â êîòîðîé ïðîèçâîäèòñÿ ÷òåíèå äàííûõ.

UniDirectional
Åñëè ýòî ñâîéñòâî óñòàíîâëåíî â True, âàø äàòàñåò ñòàíåò îäíîíàïðàâëåííûì è íå áóäåò êýøèðîâàòü ðåçóëüòàòû âûïîëíåíèÿ.  êàæäûé ìîìåíò áóäåò äîñòóïíà ëèøü îäíà çàïèñü. Ýòî ìîæåò ïîíàäîáèòüñÿ, íàïðèìåð, äëÿ áîëüøèõ îò÷åòîâ.

UpdateRecordTypes
Ýòî ñâîéñòâî ïîçâîëÿåò çàäàòü ðåæèì îòîáðàæåíèÿ çàïèñåé â ðåæèìå êýøèðîâàííûå îáíîâëåíèé:
TCachedUpdateStatus =(cusUnmodified, cusModified, cusInserted,cusDeleted,
cusUninserted, cusDeletedApplied);
TFIBUpdateRecordTypes = set of TCachedUpdateStatus;

Ïîääåðæèâàþòñÿ ñëåäóþùèå ðåæèìû îòîáðàæåíèÿ çàïèñåé: îòîáðàæåíèå íåìîäèôèöèðîâàâøèõñÿ; ìîäèôèöèðîâàâøèõñÿ; âñòàâëåííûõ; óäàëåííûõ; óäàëåííûõ, ñ óæå ïðèìåííûì óäàëåíèåì.

UpdateTransaction
Ýòî ñâîéñòâî çàäàåò òðàíçàêöèþ, â êîòîðîé áóäóò ïðîèçâîäèòüñÿ ìîäèôèöèðóþùèå çàïðîñû

Ñîáûòèÿ

Ðàññìîòðèì ñîáûòèÿ, óíèêàëüíûå äëÿ TpFIBDataSet. Ñîáûòèÿ TDataSet ñìîòðèòå â ñïðàâêå ïî Delphi. Ìíîãèå ñîáûòèÿ ïîíÿòíû áåç îïèñàíèÿ, ìû æå îáðàòèì âíèìàíèå íà íåêîòîðûå èç íèõ.

AfterEndTransaction
procedure (EndingTR: TFIBTransaction; Action: TTransactionAction; Force: Boolean);

AfterEndUpdateTransaction
procedure TForm1.pFIBDataSet1AfterEndUpdateTransaction(EndingTR: TFIBTransaction; Action: TTransactionAction; Force: Boolean);

AfterFetchRecord
procedure (FromQuery: TFIBQuery; RecordNumber: Integer; var StopFetching: Boolean);

AfterStartTransaction
procedure (Sender: Tobject);

AfterStartUpdateTransaction
procedure TForm1.pFIBDataSet1AfterStartUpdateTransaction(Sender: TObject);

BeforeEndTransaction
procedure (EndingTR: TFIBTransaction; Action: TTransactionAction; Force: Boolean);

BeforeEndUpdateTransaction
procedure (EndingTR: TFIBTransaction; Action: TTransactionAction; Force: Boolean);

BeforeFetchRecord
procedure (EndingTR: TFIBTransaction; Action: TTransactionAction; Force: Boolean);

BeforeStartTransaction
procedure (Sender: Tobject);

BeforeStartUpdateTransaction
procedure (Sender: Tobject);

DatabaseDisconnected
procedure (Sender: Tobject);

DatabaseDisconnecting
procedure (Sender: Tobject);

DatabaseFree
procedure (Sender: Tobject);

OnApplyDefaultValue
procedure (DataSet: TDataSet; Field: TField; var Applied: Boolean);
Ýòî ñîáûòèå ïîçâîëÿåò ïåðåîïðåäåëèòü çíà÷åíèÿ ïîëåé, âûñòàâëåííûõ ïî óìîë÷àíèþ, ïðè âñòàâêå íîâîé çàïèñè.

OnApplyFieldRepository
Ýòî ñîáûòèå ïîçâîëÿåò ðàçðàáîò÷èêó ëåãêî èñïîëüçîâàòü ñâîè ñîáñòâåííûå íàñòðîéêè â
ðåïîçèòàðèè ïîëåé. Íàïðèìåð. Åñëè âàì õî÷åòñÿ íàñòðàèâàòü ñâîéñòâî EditMask, òî
äîáàâëÿåòå â òàáëèöó ðåïîçèòîðèÿ ïîëå EDIT_MASK. À â îáðàáîò÷èêå
OnApplyFieldRepository ïèøåòå:
procedure TForm1.pFIBDataSet1ApplyFieldRepository(DataSet: TDataSet; Field: TField; FieldInfo: TpFIBFieldInfo);
begin
Field.EditMask:=FieldInfo.OtherInfo.Values['EDIT_MASK'];
end;


OnAskRecordCount
procedure (DataSet: TFIBDataSet; var SQLText: String);

Ýòî ñîáûòèå âîçíèêàåò ïðè âûñòàâëåííîé îïöèè psAskRecordCount è ïîçâîëÿåò èçìåíèòü SQL ïî óìîë÷àíèþ äëÿ ïîëó÷åíèÿ êîëè÷åñòâà çàïèñåé

OnCompareFieldValues
function (Field: TField; const S1, S2: Variant): Integer;
Ýòî ñîáûòèå ïîçâîëÿåò çàäàòü ñâîþ ôóíêöèþ ñðàâíåíèÿ äëÿ ëîêàëüíîé ñîðòèðîâêè. Ðàçëè÷íûå êîäèðîâêè (ðàçíûå íàáîðû ñèìâîëîâ) òðåáóþò ðàçíûõ ìåòîäîâ ñîðòèðîâêè. Ïîýòîìó äëÿ êîäèðîâêè None è Unicode_FSS ïîäîéäåò ñòàíäàðòíûé ìåòîä, ò.å., íè÷åãî ïåðåîïðåäåëÿòü íå íóæíî. Äëÿ íàöèîíàëüíûõ êîäèðîâîê íóæíî ñòàâèòü ANSI êîäèðîâêó AnsiCompareString (ôóíêöèÿ äàòàñåòà).

OnFieldChange
procedure OnFieldChange(Sender: Tfield);
Ýòî ñîáûòèå âîçíèêàåò ïðè èçìåíåíèè çíà÷åíèÿ ïîëÿ.

OnFillClientBlob
procedure (DataSet: TFIBCustomDataSet; Field: TFIBBlobField; Stream: TFIBBlobStream);
Ýòî ñîáûòèå âûçûâàåòñÿ ïðè çàïîëíåíèè BLOB ïîëÿ íà êëèåíòå, â ñëó÷àå åñëè ñâîéñòâî
TFIBBlobField.IsClientField=True

OnReadBlobField, OnWriteBlobField
procedure(Field:TBlobField;BlobSize:integer;Progress:integer;var Stop:boolean);
Ýòè ñîáûòèÿ âûçûâàþòñÿ ïðè ÷òåíèè-çàïèñè BLOB ïîëÿ èç ÁÄ. Ïîçâîëÿþò îòîáðàçèòü ïðîãðåññ ïðîöåññà ÷òåíèÿ-çàïèñè, à ïðè ÷òåíèè è ïðåðâàòü åãî â ñëó÷àå íåîáõîäèìîñòè

OnLockError
procedure (DataSet: TDataSet; LockError: TLockStatus; var ErrorMessage: String; var Action: TDataAction);
Ýòî ñîáûòèå âîçíèêàåò ïðè âûñòàâëåííîé îïöèè poProtectedEdit, åñëè ïîïûòêà áëîêèðîâàíèÿ íå áûëà óñïåøíîé. Ñìîòðèòå ðàçäåë «Ïåññèìèñòè÷åñêàÿ áëîêèðîâêà» ðóêîâîäñòâà ïîëüçîâàòåëÿ.

NEW

OnLockSQLText
procedure (DataSet: TFIBDataSet; var SQLText: String);
Ýòî ñîáûòèå âîçíèêàåò ïåðåä ãåíåðàöèåé ëîêèðóþùåãî çàïðîñà, è ïîçâîëÿåò ðàçðàáîò÷èêó ñàìîìó çàäàòü òåêñò ýòîãî çàïðîñà, íå ïîëàãàÿñü íà àâòîãåíåðàöèþ.

TransactionEnded
procedure (Sender: Tobject);
Ýòî ñîáûòèå âîçíèêàåò ïîñëå çàâåðøåíèÿ òðàíçàêöèè.

TransactionEnding
procedure (Sender: Tobject);
Ýòî ñîáûòèå âîçíèêàåò â ìîìåíò çàâåðøåíèÿ òðàíçàêöèè.

TransactionFree
procedure (Sender: Tobject);
Ýòî ñîáûòèå âîçíèêàåò ïðè âûñâîáîæäåíèè òðàíçàêöèè.

Ìåòîäû

Äàííûå ìåòîäû èñïîëüçóþòñÿ äëÿ ñðàâíåíèÿ Ansi-ñòðîê:
function AnsiCompareString(Field:TField;const val1, val2: variant): Integer;
function StdAnsiCompareString(Field:TField;const S1, S2: variant): Integer;


StdAnsiCompareString – çàäàåò ñëåäóþùèé ïîðÿäîê:
à À á Á
AnsiCompareString – çàäàåò ñëåäóþùèé ïîðÿäîê:
À Á à á

Ìåòîä ñîîòâåòñòâóåò ðàçíûì ñîðòèðîâêàì ñåðâåðà ïðè ðàçëè÷íûõ ñî÷åòàíèÿõ ÷àðñåòîâ (charset) è êîëëýéòîâ (collate).

function FN(const FieldName: string): TField;
function FBN(const FieldName: string): Tfield;

Äàííûå ôóíêöèè àíàëîãè÷íû TdataSet.FieldByName, íî áîëåå êîðîòêèå â íàïèñàíèè.

procedure ApplyConditions(Reopen :boolean = False);
Ýòîò ìåòîä ïðèìåíÿåò äîïîëíèòåëüíûå óñëîâèÿ. Ïàðàìåòð Reopen óêàçûâàåò, íóæíî ëè ïåðåîòêðûâàòü TpFIBDataSet

procedure CancelConditions;
Ýòîò ìåòîä îòìåíÿåò âñå äîïîëíèòåëüíûå óñëîâèÿ.

procedure CloseOpen(const DoFetchAll:boolean);
Ýòîò ìåòîä ïåðåîòêðûâàåò TpFIBDataSet. Ïàðàìåòð DoFetchAll óêàçûâàåò, äåëàòü ëè ïîëíûé fetch äàííûõ

procedure StartTransaction;
procedure BatchInput(InputObject: TFIBBatchInputStream; SQLKind: TpSQLKind=skInsert);
procedure BatchOutput(OutputObject: TFIBBatchOutputStream);

Ïîäðîáíîñòè ñìîòðèòå â ðàçäåëå Ïàêåòíûå èçìåíåíèÿ Ðóêîâîäñòâà ïîëüçîâàòåëÿ.

function CachedUpdateStatus: TcachedUpdateStatus;
Ýòîò ìåòîä ïîçâîëÿåò ïîëó÷èòü ñòàòóñ çàïèñè ïðè èñïîëüçîâàíèè êýøèðîâàííûõ îáíîâëåíèé.

procedure CancelUpdates; virtual;
Ýòîò ìåòîä îòìåíÿåò âñå èçìåíåíèÿ, ñäåëàííûå â ðåæèìå êýøèðîâàííûõ îáíîâëåíèé

procedure FetchAll;
Ýòîò ìåòîä ïðîèçâîäèò ïîëíûé fetch äàòàñåòà

procedure RevertRecord;
Ïðè èñïîëüçîâàíèè ðåæèìà CachedUpdates ýòîò ìåòîä âîâçðàùàåò çàïèñü ê íà÷àëüíîìó ñîñòîÿíèþ.

procedure Undelete;
Ýòîò ìåòîä îòìåíÿåò óäàëåíèå çàïèñè â ðåæèìå CachedUpdates.

procedure DisableScrollEvents; procedure EnableScrollEvents;
procedure DisableCloseOpenEvents; procedure
EnableCloseOpenEvents;

Áëîêèðóþò è äåáëîêèðóþò âûïîëíåíèå ñîîòâåòñòâóþùèõ ñîáûòèé.

procedure DisableCalcFields;
procedure EnableCalcFields;
Áëîêèðóþò è äåáëîêèðóþò âûïîëíåíèå ñîáûòèÿ OnCalcFields.

procedure DisableMasterSource;
procedure EnableMasterSource;
function MasterSourceDisabled:boolean;

Ñëóæàò äëÿ âðåìåííîãî îòêëþ÷åíèÿ ðåæèìà ìàñòåð-äåòàëü. Íàïðèìåð
DetailDataSet.DisableMasterSource;
try
MasterDataSet.Edit;
MasterDataSet.FieldByName('ID').asInteger:=NewValue; MasterDataSet.Post; ChangeDetailDataSetLinkField(NewValue);
finally
DetailDataSet.EnableMasterSource;
end

ïðè ýòîì äåòàëü äàòàñåò íå ïåðåîòêðûâàåòñÿ.

function ArrayFieldValue(Field:TField):Variant;
procedure SetArrayValue(Field:TField;Value:Variant);
function GetElementFromValue( Field:TField; Indexes:array of integer):Variant;
procedure SetArrayElementValue(Field:TField;Value:Variant; Indexes:array of
integer );


Äëÿ ïîëó÷åíèÿ ïîäðîáíîñòåé ñìîòðèòå ðàçäåë «Ðàáîòà ñ ïîëÿìè-ìàññèâàìè» Ðóêîâîäñòâà ïîëüçîâàòåëÿ.

function GetRelationTableName(Field:TObject):string;
Ýòîò ìåòîä âîçâðàùàåò èìÿ îòíîøåíèÿ äëÿ ïîëÿ.

function GetRelationFieldName(Field:TObject):string;
Ýòîò ìåòîä âîçâðàùàåò èìÿ ïîëÿ.

procedure MoveRecord(OldRecno,NewRecno:integer); virtual;
Ýòîò ìåòîä ïåðåìåùàåò ïîëå â êåøå ñ ïîçèöèè OldRecNo íà ïîçèöèþ NewRecNo

procedure DoSortEx(Fields: array of integer; Ordering: array of Boolean); overload;
procedure DoSortEx(Fields: TStrings; Ordering: array of Boolean); overload;
procedure DoSort(Fields: array of const; Ordering: array of Boolean); virtual;

Äàííûå ìåòîäû – ýòî ìåòîäû ëîêàëüíîé ñîðòèðîâêè.

function CreateCalcField(FieldClass:TFieldClass; const aName,aFieldName:string;aSize:integer):TField; function CreateLookUpField(FieldClass:TFieldClass; const aName,aFieldName:string;aSize:integer; aLookupDataSet: TDataSet; const aKeyFields, aLookupKeyFields, aLookupResultField: string ):Tfield;
Ýòîò ìåòîä ïîçâîëÿåò ñîçäàâàòü â ðàí-òàéìå Calc-, Lookup-ïîëÿ.

function GetFieldOrigin(Fld:TField):string;
Ýòîò ìåòîä âîçâðàùàåò îðèãèíàëüíîå èìÿ ïîëÿ Tfield.Origin

function FieldByOrigin(const aOrigin:string):TField; overload;
function FieldByOrigin(const TableName,FieldName:string):TField; overload;

Ýòîò ìåòîä ïîëó÷àåò îáúåêò-ïîëå ïî îðèãèíàëüíîìó èìåíè

function FieldByRelName(const Fname:string):TField;
Ýòîò ìåòîä âîçâðàùàåò ïåðâîå ïîëå äëÿ 'Select AAA as Name from Table1' FieldByRelName(‘AAA’).

function ReadySelectText:string;
Ýòîò ìåòîä ïîçâîëÿåò óâèäåòü çàïðîñ, êîòîðûé â äåéñòâèòåëüíîñòè îòïðàâëÿåòñÿ íà ñåðâåð.
Ïîëåçåí ïðè ðàáîòå ñ äîïîëíèòåëüíûìè óñëîâèÿìè.

function TableAliasForField(const aFieldName:string):string;
Ýòîò ìåòîä âîçâðàùàåò ïñåâäîíèì òàáëèöû äëÿ ïîëÿ.

function SQLFieldName(const aFieldName:string):string;
Ýòîò ìåòîä âîçâðàùàåò ðåàëüíîå èìÿ ïîëÿ.

procedure RestoreMacroDefaultValues;
Ýòîò ìåòîä óñòàíàâëèâàåò çíà÷åíèÿ ìàêðîñîâ â çíà÷åíèÿ ïî óìîë÷àíèþ (default).

function IsComputedField(Fld:Variant):boolean;
Ýòîò ìåòîä âîçâðàùàåò True, åñëè ïîëå âû÷èñëÿåìîå.

function DomainForField(Fld:Variant):string;
Ýòîò ìåòîä âîçâðàùàåò äîìåí ïîëÿ.

function SortInfoIsValid:boolean;
Ýòîò ìåòîä ïðîâåðÿåò èíôîðìàöèÿ î ñîðòèðîâêå íà âàëèäíîñòü

function IsSortedField(Field:TField; var FieldSortOrder:TSortFieldInfo):boolean;
Ýòîò ìåòîä ïîëó÷àåò èíôîðìàöèþ î ïîðÿäêå ñîðòèðîâêå äëÿ ïîëÿ. Òèï TsortFieldInfo îáúÿâëåí êàê:

TSortFieldInfo = record
FieldName: string;        //èìÿ ïîëÿ
InDataSetIndex: Integer;   // ïîðÿäêîâûé íîìåð ïîëÿ â äàòàñåòå, ò.å., èíäåêñ â êîëëåêöèè Fields.
InOrderIndex: Integer;    // ïîðÿäêîâûé íîìåð ïîëÿ â order. Ò.å., íàïðèìåð, äëÿ order by 2,3,1 âòîðîå ïîëå äàòàñåòà áóäåò ïåðâûì â îðäåðå. InDataSetIndex=1, à InOrderIndex=0 (íóìåðàöèÿ ñ íóëÿ)
Asc: Boolean;    //True, åñëè ïîðÿäîê ïîëåé ïî âîçðàñòàíèþ îñòàëüíûìè
end;

NullsFirst: Boolean;      //åñëè óñòàíîâëåíî â Null çíà÷åíèå ïåðåä


function SortFieldsCount:integer;
Ýòîò ìåòîä âîçâðàùàåò êîëè÷åñòâî ïîëåé ñîðòèðîâêè

function SortFieldInfo(OrderIndex:integer):TSortFieldInfo;
Ýòîò ìåòîä âîçâðàùàåò èíôîðìàöèþ î ñîðòèðîâêå ïîëÿ â ïîçèöèè OrderIndex

function SortedFields:string;
Ýòîò ìåòîä âîçâðàùàåò ñòðîêó ñ ïîëÿìè ñîðòèðîâêè, ïåðå÷èñëåííûìè ÷åðåç ';'.

function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override;
Ýòîò ìåòîä ñðàâíèâàåò äâå çàêëàäêè.

function BlobModified(Field: TField): boolean;
Ýòîò ìåòîä âîçâðàùàåò True, åñëè BLOB ïîëå Field áûëî ìîäèôèöèðîâàíî.

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;
Ýòîò ìåòîä cîçäàåò BLOB Stream äëÿ ïîëÿ.

function GetRecordFieldInfo(Field: TField; var TableName,FieldName:string; var RecordKeyValues:TDynArray ):boolean;
Ýòîò ìåòîä ïîëó÷àåò èíôîðìàöèþ î ïîëå.

function RecordFieldValue(Field:TField;RecNumber:integer):Variant; overload; function RecordFieldValue(Field:TField;aBookmark:TBookmark):Variant; overload;
Ýòè ìåòîäû âîçâðàùàþò çíà÷åíèå ïîëÿ è çíà÷åíèå ïîëÿ ïî çàêëàäêå ñîîòâåòñòâåííî.

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

Ýòî ñòàíäàðòíàÿ ôóíêöèÿ äàòàñåòà: ïîèñê çàïèñè, â äîïîëíåíèå ê íåìó ïîèñê ñëåäóþùåé çàïèñè è ïîèñê ïðåäûäóùåé.
function ExtLocate(const KeyFields: String; const KeyValues: Variant; Options:TExtLocateOptions): Boolean;
function ExtLocateNext(const KeyFields: String; const KeyValues: Variant;Options: TExtLocateOptions): Boolean;
function ExtLocatePrior(const KeyFields: String; const KeyValues: Variant; Options: TExtLocateOptions): Boolean;

Ýòî óíèêàëüíûå ôóíêöèè FIBPlus, êîòîðûå ðàáîòàþò àíàëîãè÷íî ïðåäûäóùèì, íî
ïîçâîëÿþò áîëåå ãèáêîå óïðàâëåíèå.

TExtLocateOptions    =    (eloCaseInsensitive,    eloPartialKey,    eloWildCards,    eloInSortedDS, eloNearest, eloInFetchedRecords)


eloCaseInsensitive - èãíîðèðîâàòü ðåãèñòð ïðè ñðàâíåíèè ñòðîê ;
eloPartialKey- ïîèñê ïî ÷àñòè÷íîìó ñîâïàäåíèþ;
eloWildCards- ïîèñê áóäåò ïðîèçâîäèòüñÿ ïî ìàñêå (ïîäîáíî òîìó, êàê â îïåðàòîðå LIKE);
eloInSortedDS - ïîèñê ïðîèçâîäèòñÿ â îòñîðòèðîâàííîì äàòàñåòå. Åñëè äàòàñåò ñîðòèðîâàí ïî ýòîìó ïîëþ, òî ïîèñê áóäåò ðàáîòàòü áûñòðåå, ÷åì îáû÷íî;
eloNearest - (òîëüêî â êîìáèíàöèè ñ eloInSortedDS). Â ðåçóëüòàòå îïåðàöèè, åñëè
çàïèñü íå áóäåò íàéäåíà, óêàçàòåëü òåêóùåé çàïèñè áóäåò ñïîçèöèîíèðîâàí íà òî ìåñòî, ãäå äîëæåí áûë áûòü ðåçóëüòàò;
eloInFetchedRecords - ïîèñê ïðîèçâîäèòñÿ òîëüêî â òåõ çàïèñÿõ, êîòîðûå óæå fetched è íàõîäÿòñÿ â áóôåðå äàòàñåòà.

procedure RefreshFilters;
Ýòîò ìåòîä îáíîâëÿåò ôèëüòð.
Ïðè îáû÷íîé ðàáîòå ñ ôèëüòðàìè íóæíî äåëàòü òàê:

DataSet.Filtered := False;
DataSet.Filter := <ñòðîêà ôèëüòðà>;
DataSet.Filtered := True;


Èñïîëüçóÿ FIBPlus, ìîæíî íàïèñàòü ïðîùå:
DataSet.Filter := <ñòðîêà ôèëüòðà>;
DataSet.RefreshFilters;


procedure CacheDelete;
Ýòîò ìåòîä óäàëÿåò çàïèñü èç êýøà äàòàñåòà, íî ðåàëüíîãî óäàëåíèÿ íå ïðîèñõîäèò.

procedure CacheOpen;
Ýòîò ìåòîä îòêðûâàåò äàòàñåò, íî íå äåëàåò fetch äàííûõ. Íåîáõîäèìî, ÷òîáû áûëî ïîäêëþ÷åíèå ê ÁÄ.

procedure RefreshClientFields(ForceCalc:boolean=True);
Ýòîò ìåòîä ïåðåñ÷èòûâàåò Calculated ïîëÿ áåç ïåðåîòêðûòèÿ çàïðîñà.

function CreateCalcFieldAs(Field:TField):TField;
Ýòîò ìåòîä ñîçäàåò âû÷èñëÿåìîå ïîëå ñ òàêèì æå òèïîì, êàê ó ïîëÿ-ïàðàìåòðà.

procedure CopyFieldsStructure(Source:TFIBCustomDataSet;RecreateFields:boolean);
Ýòîò ìåòîä êîïèðóåò ñòðóêòóðó ïîëåé èç äàòàñåòà-èñòî÷íèêà.

procedure CopyFieldsProperties(Source,Destination:TFIBCustomDataSet);
Ýòîò ìåòîä êîïèðóåò ñâîéñòâà ïîëåé èç îäíîãî äàòàñåòà â äðóãîé.

procedure AssignProperties(Source:TFIBCustomDataSet);
Ýòîò ìåòîä êîïèðóåò âñå ñâîéñòâà äàòàñåòà-ïàðàìåòðà.

procedure OpenAsClone(DataSet:TFIBCustomDataSet);
Ýòîò ìåòîä îòêðûâàåò äàòàñåò êàê êîïèþ äàòàñåòà-ïàðàìåòðà.

procedure Clone(DataSet:TFIBCustomDataSet; RecreateFields:boolean);
Ýòîò ìåòîä êëîíèðóåò äàííûå äàòàñåòà-ïàðàìåòðà.

function CanCloneFromDataSet(DataSet:TFIBCustomDataSet):boolean;
Ýòà ôóíêöèÿ âîçâðàùàåò True, åñëè ìîæåò áûòü ñîçäàíà êîïèÿ äàòàñåòà-ïàðàìåòðà

function PrimaryKeyFields(const TableName: string): string;
Ýòîò ìåòîä âîçâðàùàåò èìÿ êëþ÷åâîãî ïîëÿ äëÿ òàáëèöû.

function FetchNext(FetchCount:Dword):integer;
Ýòîò ìåòîä äåëàåò fetch ñëåäóþùèõ çàïèñåé â êîëè÷åñòâå, óêàçàííîì â ïàðàìåòðå.

procedure ReopenLocate(const LocateFieldNames:string);
Ýòîò ìåòîä ïåðåîòêðûâàåò TpFIBDataSet ñ ïîçèöèîíèðîâàíèåì íà òîì æå ìåñòå, ãäå áûë êóðñîð ïåðåä çàêðûòèåì. Ïàðàìåòð îïðåäåëÿåò, ïî êàêèì ïîëÿì áóäåò ñäåëàí ïîñëåäóþùèé Locate. Åñëè ïîëåé íåñêîëüêî, èõ íóæíî ïèñàòü ÷åðåç ';'

function AllFieldValues: variant;
Ýòîò ìåòîä âîçâðàùàåò âàðèàíòíûé ìàññèâ – òåêóùóþ ñòðîêó äàòàñåòà.

procedure FullRefresh;
Ýòîò ìåòîä ïðîèçâîäèò ïåðåîòêðûòèå äàòàñåòà. Ïðè ýòîì îòêëþ÷àþòñÿ ìåòîäû, âëèÿþùèå íà
îòîáðàæåíèå: âèçóàëüíûå êîìïîíåíòû äàííûõ è ïðîêðóòêà.

procedure RefreshFromQuery(RefreshQuery:TFIBQuery; const KeyFields:string; IsDeletedRecords:boolean=False; DoAdditionalRefreshRec:boolean=False);
Ýòîò ìåòîä ïîçâîëÿåò îñâåæèò êýø äàòàñåòà èñïîëüçóÿ âíåøíèé êîìïîíåíò TFIBQuery. Ñíà÷àëà ïðîèçâîäèòñÿ âûïîëíåíèå çàïðîñà çàïèñàííîãî â RefreshQuery. Ïðè ýòîì ïàðàìåòðû èç RefreshQuery çàïîëíÿþòñÿ çíà÷åíèÿìè ïàðàìåòðîâ äàòàñåòà. Ïîñëå âûïîëíåíèÿ îñâåæàþùåãî çàïðîñà, äëÿ êàæäîé çàïèñè âîçâðàùåííîé ýòèì çàïðîñîì ïðîèçâîäÿòñÿ ñëåäóþùèå äåéñòâèÿ: Èñïîëüçóÿ ïîëÿ KeyFields ïðîèçâîäèòñÿ ïîèñê ñîîòâåòñòâóþùåé çàïèñè â äàòàñåòå. Åñëè çàïèñü íàéäåíà, òî â çàâèñèìîñòè îò çíà÷åíèÿ IsDeletedRecords, îíà ëèáî êîððåêòèðóåòñÿ ëèáî óäàëÿåòñÿ. Åñëè çàïèñü íå íàéäåíà è IsDeletedRecords=False, òî îíà âñòàâëÿåòñÿ â êýø äàòàñåòà èñïîëüçóÿ çíà÷åíèÿ âîçâðàùåííûå â RefreshQuery. Ïîñëåäíèé ïàðàìåòð DoAdditionalRefreshRec, ãîâîðèò î òîì íóæíî ëè ïðîèçâåñòè ñòàíäàðòíûé ðåôðåø, äëÿ êàæäîé òîëüêî ÷òî îñâåæåííîé çàïèñè. Ïðèìåð èñïîëüçîâàíèÿ ýòîãî ìåòîäà íàõîäèòñÿ â êîìïëåêòå ïðèìåðîâ â ïðîåêòå RefreshDataSet.exe

function FieldsCount:integer;
Ýòîò ìåòîä âîçâðàùàåò êîëè÷åñòâî ïîëåé.

function FieldName(FieldIndex:integer):string;
Ýòîò ìåòîä âîçâðàùàåò èìÿ ïîëÿ ïî èíäåêñó.

function FieldExist(const FieldName:string; var FieldIndex:integer):boolean;
Ýòîò ìåòîä ïðîâåðÿåò ñóùåñòâîâàíèå ïîëÿ â TDataSet, è â ñëó÷àå óñïåõà (åñëè ïîëå ñóùåñòâóåò) åãî èíäåêñ âîçâðàùàåòñÿ â FieldIndex.

function ParamExist(const ParamName:string; var ParamIndex:integer):boolean;
Ýòîò ìåòîä ïðîâåðÿåò ñóùåñòâîâàíèå ïàðàìåòðà â TDataSet, è â ñëó÷àå óñïåõà (åñëè ïàðàìåòð ñóùåñòâóåò) åãî èíäåêñ âîçâðàùàåòñÿ â FieldIndex.

function FieldValue(const FieldName:string; Old:boolean):variant; overload; function FieldValue(const FieldIndex:integer;Old:boolean):variant; overload;
Ýòîò ìåòîä âîçâðàùàåò çíà÷åíèå ïîëÿ ïî èìåíè èëè èíäåêñó.

function ParamValue(const ParamName:string):variant; overload;
function ParamValue(const ParamIndex:integer):variant; overload;

Ýòîò ìåòîä âîçâðàùàåò çíà÷åíèå ïàðàìåòðà ïî èíäåêñó èëè èìåíè

procedure SetParamValue(const ParamIndex:integer; aValue:Variant);
Ýòîò ìåòîä óñòàíàâëèâàåò çíà÷åíèå ïàðàìåòðà

function RecordCountFromSrv: integer; dynamic;
Ýòîò ìåòîä âîçâðàùàåò êîëè÷åñòâî çàïèñåé íà ñåðâåðå. Èñïîëüçóåòñÿ äëÿ ïîëó÷åíèÿ ðåàëüíîãî êîëè÷åñòâà çàïèñåé íà ñåðâåðå, êîãäà fetch âûáîðêè âûïîëíåí íå äî êîíöà. Òàê, íàïðèìåð, ýòîò ìåòîä èñïîëüçóåòñÿ ïðè îïöèè psAskRecordCount.

function VisibleRecordCount: Integer;
Ýòîò ìåòîä âîçâðàùàåò êîëè÷åñòâî âèäèìûõ çàïèñåé, íàïðèìåð, â ñåòêå äàííûõ.

function CanEdit: Boolean; override;
Ýòîò ìåòîä âîçâðàùàåò True, åñëè äàòàñåò ïîääåðæèâàåò îïåðàöèþ Edit;

function CanInsert: Boolean; override;
Ýòîò ìåòîä âîçâðàùàåò True, åñëè äàòàñåò ïîääåðæèâàåò îïåðàöèþ Insert;

function CanDelete: Boolean; override;
Ýòîò ìåòîä âîçâðàùàåò True, åñëè äàòàñåò ïîääåðæèâàåò îïåðàöèþ Delete.

function ExistActiveUO(KindUpdate: TUpdateKind): boolean;
function AddUpdateObject(Value: TpFIBUpdateObject): integer;
procedure RemoveUpdateObject(Value: TpFIBUpdateObject);

Ýòè ìåòîäû ïðîâåðÿþò ñóùåñòâîâàíèå äîïîëíèòåëüíîãî îáðàáîò÷èêà TpFIBUpdateObject, à
òàêæå óäàëÿþò èëè äîáàâëÿþò äîïîëíèòåëüíûé îáðàáîò÷èê TpFIBUpdateObject.

function ParamByName(const ParamName: string): TFIBXSQLVAR;
Ýòîò ìåòîä âîçâðàùàåò ïàðàìåòð ïî èìåíè.

function FindParam(const ParamName: string): TFIBXSQLVAR;
Ýòîò ìåòîä èùåò ïàðàìåòð, â òîì ÷èñëå, è íà óðîâíå ìàêðîñîâ. Åñëè ìàêðîñû ñîäåðæàò
ïàðàìåòðû, òî äëÿ èõ çàïîëíåíèÿ íóæíî èñïîëüçîâàòü èìåííî ýòîò ìåòîä.

function RecordStatus(RecNumber: integer): TupdateStatus;
Ýòîò ìåòîä âîçâðàùàåò ñòàòóñ äëÿ êýøèðîâàííûõ îáíîâëåíèé.

procedure CloneRecord(SrcRecord: integer; IgnoreFields: array of const);
Ýòîò ìåòîä êîïèðóåò çàïèñü ïî èíäåêñó SrcRecord. Âòîðîé ïàðàìåòð óêàçûâàåò, êàêèå ïîëÿ èãíîðèðîâàòü ïðè êëîíèðîâàíèè (íàïðèìåð, êëþ÷åâûå ïîëÿ)

procedure CloneCurRecord(IgnoreFields: array of const);
Ýòîò ìåòîä êëîíèðóåò òåêóùóþ çàïèñü.

procedure CommitUpdToCach;
procedure ApplyUpdToBase;
procedure ApplyUpdates;

Ýòî ìåòîäû äëÿ êýøèðîâàííûõ îáíîâëåíèé â äîïîëíåíèå ê ñòàíäàðòíûì ApplyUpdates, CancelUpdates. Ñòàíäàðòíûå îïåðàöèè äàòàñåòà íåàäåêâàòíî ðàáîòàþò ïðè ôèëüòðàöèè, ïîýòîìó ðåêîìåíäóåì èñïîëüçîâàòü ýòè äîïîëíèòåëüíûå ìåòîäû. Ïîäðîáíåå ñìîòðè òåìó â ðóêîâîäñòâå ïîëüçîâàòåëÿ «Èñïîëüçîâàíèå êýøèðîâàííûõ èçìåíåíèé»

procedure SaveToStream(Stream: TStream; SeekBegin: boolean);
procedure LoadFromStream(Stream: TStream; SeekBegin: boolean);
procedure SaveToFile(const FileName: string);
procedure LoadFromFile(const FileName: string);

Ýòè ìåòîäû ïîçâîëÿþò ñîõðàíèòü, à çàòåì çàãðóçèòü êåø äàòàñåòà â ôàéë èëè â ïîòîê. Äàòàñåò äîëæåí áûòü ïîäêëþ÷åí ê ÁÄ.

function LockRecord(RaiseErr: boolean= True): TlockStatus;
Ýòîò ìåòîä ïîçâîëÿåò ïðîèçâîäèòü ïåññèìèñòè÷åñêîå áëîêèðîâàíèå çàïèñè.

function FieldByFieldNo(FieldNo: Integer): Tfield;
Ýòîò ìåòîä âîçâðàùàåò ïîëå ïî ÷èñëîâîìó ïàðàìåòðó FieldNo

function ParamNameCount(const aParamName: string): integer;
Ýòîò ìåòîä âîçâðàùàåò êîëè÷åñòâî óíèêàëüíûõ èìåí ïàðàìåòðîâ, åñëè îäèí è òîò æå
ïàðàìåòð èñïîëüçóåòñÿ íåñêîëüêî ðàç.

function ParamCount: integer;
Ýòîò ìåòîä âîçâðàùàåò êîëè÷åñòâî ïàðàìåòðîâ.

procedure ExecUpdateObjects(KindUpdate: TUpdateKind; Buff: Pointer; aExecuteOrder: TFIBOrderExecUO);
Ýòîò ìåòîä âûïîëíÿåò äîïîëíèòåëüíûå îáíîâëÿþùèå çàïðîñû TpFIBUpdateObject, àññîöèèðîâàííûå ñ äàòàñåòîì.

procedure OpenWP(const ParamValues: array of Variant); overload;
procedure OpenWP(const ParamNames : string;const ParamValues: array of Variant);
overload;
procedure OpenWPS(const ParamSources: array of ISQLObject);
procedure ReOpenWP(const ParamValues: array of Variant); overload;
procedure ReOpenWP(const ParamNames : string;const ParamValues: array of
Variant