Re: [Lazarus] Easy to use memory dataset and TMemDataset problems

2016-02-26 Thread Aradeonas
> Why not ? It should perfectly work without file.
It seems I got a problem with changing properties in design time and
then opening it. if I make everything in code it works good. But problem
with memdatset and memds units still exist.

Regards, Ara


-- 
http://www.fastmail.com - Same, same, but different...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Easy to use memory dataset and TMemDataset problems

2016-02-26 Thread Michael Van Canneyt



On Fri, 26 Feb 2016, Aradeonas wrote:


Hi,

I want a memory dataset like VirtualTable [1]and really I cant
understand what are these bufdataset and memdataset and wiki[2] page as
I cant make bufdataset works without a file.


Why not ? It should perfectly work without file.

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Easy to use memory dataset and TMemDataset problems

2016-02-26 Thread Aradeonas
Hi,

I want a memory dataset like VirtualTable [1]and really I cant
understand what are these bufdataset and memdataset and wiki[2] page as
I cant make bufdataset works without a file. I want an easy to sue
memory dataset without any file usage.

Yes there is a way to use TMemDataset like this as @Thaddy said:
> program memdbtest; {$apptype console}{$mode objfpc} uses  db,memds;
> var   MemDb:TMemDataset; begin MemDb:=TMemDataset.Create(nil); try
> MemDb.FieldDefs.Add('NAME',ftString,20);   MemDb.CreateTable;
> MemDb.Open;   MemDb.Append;   MemDb.FieldByName('NAME').Value:='Free';
> MemDb.Post;   MemDb.Append;
> MemDb.FieldByName('NAME').Value:='Pascal';   MemDb.Post;
> MemDb.SaveToFile('MemDb.txt');  // as long you do not close, you don't
> have to save finally   MemDb.Close;   MemDb.Free; end; end.
But as you can see it use memds unit that CodeTools has problem with
memds unit and also it will replace it with MemDataSet unit that has a
different TMemDataset without CreateTable option.

Also Wiki [3]says that BufDataset is a better choice but is it really?
and is it a choice for using as a memory dataset?how?

Regards, Ara



Links:

  1. https://www.devart.com/vtable/
  2. 
http://wiki.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC
  3. 
http://wiki.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC#Introduction

-- 
http://www.fastmail.com - Same, same, but different...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus