VirtualDAC組件由TDataSet發展而來,它是沒有鏈接數據文件的內存數據存儲庫。使用AddField方法向虛擬表添加字段。創建虛擬表后,它將立即為空。然后,用戶就可以定義新字段或加載現有表文件,以便虛擬表對象初始化并準備打開。關閉虛擬表時,它將丟棄其記錄集。為了保留用戶在設計時輸入的數據供以后使用,用戶可能希望在Options屬性中包含voStored選項。在運行時,用戶需要顯式調用SaveToFile方法以存儲對文件的修改,以后可以通過調用LoadFromFile方法將其檢索回虛擬表。
TVirtualTable component is TDataSet descendant. It represents an in-memory data storage that does not have linked data files. To add fields to virtual table call AddField method. Immediately after creating virtual table it will be empty. You then define new fields or load existing table files so that virtual table object becomes initialized and ready to be opened. When you close virtual table it will discard its record set. To keep data you entered at design-time for later use you may wish to include voStored option in Options property. At run-time you need to call SaveToFile method explicitly to store modifications to the file that later may be retrieved back into the virtual table by calling LoadFromFile method.
Following the main features of VirtualTable Component
-
Free of charge binaries
-
Represents an in-memory dataset
-
Can store record data in the file (at run-time) and in dfm (at design-time)
-
Provides expanded ability for locating records
-
Supports records filtering
-
Local sorting ability by several field
-
Allows to add and remove fields to the existing data
-
Optimized string and row data storing
-
Advanced design-time editors
-
Available source code by registration