<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Hi,<br></div>
<div> </div>
<div>I want a memory dataset like <a href="https://www.devart.com/vtable/">VirtualTable </a>and really I cant understand what are these bufdataset and memdataset and <a href="http://wiki.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC">wiki</a> page as I cant make bufdataset works without a file.<br></div>
<div>I want an easy to sue memory dataset without any file usage.<br></div>
<div> </div>
<div>Yes there is a way to use TMemDataset like this as @Thaddy said:<br></div>
<blockquote><div><div>program memdbtest;<br></div>
<div>{$apptype console}{$mode objfpc}<br></div>
<div>uses<br></div>
<div> db,memds;<br></div>
<div>var<br></div>
<div> MemDb:TMemDataset;<br></div>
<div>begin<br></div>
<div> MemDb:=TMemDataset.Create(nil);<br></div>
<div> try<br></div>
<div> MemDb.FieldDefs.Add('NAME',ftString,20);<br></div>
<div> MemDb.CreateTable;<br></div>
<div> MemDb.Open;<br></div>
<div> MemDb.Append;<br></div>
<div> MemDb.FieldByName('NAME').Value:='Free';<br></div>
<div> MemDb.Post;<br></div>
<div> MemDb.Append;<br></div>
<div> MemDb.FieldByName('NAME').Value:='Pascal';<br></div>
<div> MemDb.Post;<br></div>
<div> MemDb.SaveToFile('MemDb.txt'); // as long you do not close, you don't have to save<br></div>
<div> finally<br></div>
<div> MemDb.Close;<br></div>
<div> MemDb.Free;<br></div>
<div> end;<br></div>
<div>end.<br></div>
</div>
</blockquote><div>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.<br></div>
<div> </div>
<div>Also <a href="http://wiki.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC#Introduction">Wiki </a>says that BufDataset is a better choice but is it really? and is it a choice for using as a memory dataset?how?<br></div>
<div> </div>
<div id="sig12586409"><div class="signature">Regards,<br></div>
<div class="signature">Ara<br></div>
</div>
<div> </div>
<pre>
--
http://www.fastmail.com - Same, same, but different...
</pre>
</body>
</html>