Class TForm1 (unit MemTst16)

Inherits from

TForm

Renamed from Test.pas 6/7/1998 Paul Rice to avoid conflict with 32-bit version. This is an exmple of how to use TInMemoryTable and TTempTable. WARNING! THIS CODE IS PROVIDED AS IS WITH NO GUARANTEES OF ANY KIND! USE THIS AT YOUR OWN RISK - YOU ARE THE ONLY PERSON RESPONSIBLE FOR ANY DAMAGE THIS CODE MAY CAUSE - YOU HAVE BEEN WARNED! Having got this of my chest, more about this program: It creates an in-memory table and then sets the DataSet property of a DataSource control on the form to it. So the grid that you see on your form is actually accessing an in-memory table! If you have the VCL source and figured out how to recompile it (it's not hard - read the readme) then you can go into DB.PAS, change the line in TDataSet.InternalOpen that reads FCanModify := (CursorProps.eOpenMode = dbiReadWrite) and not CursorProps.bTempTable; to FCanModify := (CursorProps.eOpenMode = dbiReadWrite); { and not CursorProps.bTempTable; } Now just change TInMemoryTable to TTempTable in the source below - and you have a TempTable - it's just like in-memory, but has more features. Have Fun! Gregory Trubetskoy INTERNET:grisha@mira.com http://www.mira.com/home/grisha

Constructors



Functions

procedure Button1Click(Sender: TObject);


procedure FormDestroy(Sender: TObject);

these lines are moved to FormDestroy Close; Free;

Properties

Events

Variables

Button1 : TButton;


DataSource1 : TDataSource;


DBGrid1 : TDBGrid;


MyTable : TInMemoryTable;

Public declarations


Constructors


Functions


procedure Button1Click(Sender: TObject);


procedure FormDestroy(Sender: TObject);

these lines are moved to FormDestroy Close; Free;


Properties


Events


Variables


Button1 : TButton;


DataSource1 : TDataSource;


DBGrid1 : TDBGrid;


MyTable : TInMemoryTable;

Public declarations