Ciao,
Nelle JVCL c'è il TJvMemoryData (probabilmente è lo stesso componente).
Ma, in Delphi 12 puoi usare FireDac per un Database in memoria qui l'esempio a runtime senza componente a DesignTime:
var
dbo: TFDMemTable;
//Esempio di creazione:
begin
dbo := TFDMemTable.Create(nil);
dbo.LogChanges := False;
dbo.FetchOptions.RecsMax := 300000; //Sample value
dbo.ResourceOptions.SilentMode := True;
dbo.UpdateOptions.LockMode := lmNone;
dbo.UpdateOptions.LockPoint := lpDeferred;
dbo.UpdateOptions.FetchGeneratorsPoint := gpImmediate;
with dbo.FieldDefs do
begin
with AddFieldDef do
begin
Name := 'Uova';
DataType := ftVarBytes;
Size := 50;
end;
with AddFieldDef do
begin
Name := 'Luci';
DataType := ftVarBytes;
Size := 17;
end;
end;
with dbo do
begin
Open;
end;
end;
//Esempio di append:
begin
with dbo do
begin
Append;
Fields[0].AsBytes := [0]; //UOVA
Fields[1].AsBytes := (BufferLight); //LUCI, è un array
Post;
end;
end;
//Chiusura
begin
if assigned(dbo) then
begin
dbo.Close;
dbo.Free;
end;
end;