ZMSQL question and TBufdataset usage lazarus / 16-Databases ---------------------------------------------------------------------- Ronan · 2016-11-22 16:40 Dear All, My first question is: Can ZMSQL connect to the other format type of databases or does it understand only the XML or CSV formatted datbases ? My second question is: In order to understand the usage of TBufDataset, I use the following code, but interesting thing is locate fnction always returns the true, regarding the code below It's never even supposed to retrieve the true value, but why it behaves in that way ? Your help will be really appreciated, Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  BufDS :TBufDataset;  i:INteger;  str :string;begin  BufDS := TBufDataset.Create(Self);  bufDS.FieldDefs.Add('Test_Field', ftString);   bufDS.CreateDataset;  bufDS.Open;   for i := 0 to 5000 do  begin    bufDS.Append;    bufDS.FieldByName('Test_Field').value:= 'new_value-'+IntToStr(i);    bufDS.Post;   end;    bufDS.First;   if bufDS.Locate('Test_Field',1000,[]) then     str := 'correct'; ---------------------------------------------------------------------- LacaK · 2016-11-22 18:23 To second question:   In case of ftString fields you must specify Size (else is 0 which leads to strange results):     bufDS.FieldDefs.Add('Test_Field', ftString, 14); ---------------------------------------------------------------------- tatamata · 2016-12-02 12:18 Zmsql loads and save from CSV files by using Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure LoadFromTable; //Loads data (or data and schema) from a .csv file (TableName.csv), set in property TableName, from path specified in ZMConnection property.procedure SaveToTable;overload; //Saves data and schema to a .csv file (TableName.csv), set in Tablename property, in path specified in ZMConnection property. But, it can also load data from any other TDaset descendent Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure CopyFromDataset (pDataset:TDataSet); //Copies schema and data from any TDataset. It can also just create memory dataset Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure MemoryDataSetOpen; //Executes CreateDynamicFieldsFromFieldDefs and set dataset to Active. or it can create memory dataset as result of SQL query executed on CSV files Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure QueryExecute; //Executes SQL query defined in SQL property, on .csv files that are placed in folder defined in ZMConnection property. Resultset of select query is loaded into the the zmquerydataset (self).