Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
In-Memory Tables
Previous  Top  Next



Absolute Database supports in-memory tables via TABSTable and TABSQuery components.
In-memory tables could be handled the same way as a disk tables with only few differences.

Setting Component Properties

The InMemory property of TABSTable or TABSQuery component should be set to True in order to handle in-memory table. Then the DatabaseName property is automatically set to the special in-memory database name "Memory". In-memory tables are shared within the application, so you should set unique table name for each new in-memory table.


Creating New In-Memory Table

Before you can open in-memory table, you must create it by the call to CreateTable method of TABSTable or by executing the CREATE TABLE SQL query.


Creating an In-Memory Copy of Disk Table

To create in-memory copy of the disk table, use the CopyTable method of TABSTable component with 'MEMORY' value of the DatabaseFileName parameter:

ABSDiskTable.CopyTable(ABSInMemoryTable.TableName, 'MEMORY');  


Copying an In-Memory Table to Disk Table

To copy in-memory table to the disk table, use the CopyTable method of TABSTable component with 'MEMORY' value of the DatabaseFileName parameter:

ABSInMemoryTable.CopyTable(ABSDiskTable.TableName, ABSDatabase1.DatabaseFileName);  


Deleting In-Memory Table

If in-memory table is no longer needed, you should delete it by the call to DeleteTable method of TABSTable or by executing DROP TABLE SQL query. All in-memory table not deleted till the apllication closing, are deleted by the Absolute DB Engine automatically.


        © 2003 - 2017 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Aug 19, 2017