using TDataSet, how to delete Column lazarus / 16-Databases ---------------------------------------------------------------------- ilcaa72 · 2022-03-18 16:12 i am using a TDataSet column headers, with rows (records)... I know this is a virtual memory mini table but based on my logic, i need to delete a column of this TDataSet and continue to use it... i see alot of the commands here, https://www.freepascal.org/docs- html/fcl/db/tdataset.html but cant find a way to delete a Column .  can anyone assist? thanks ---------------------------------------------------------------------- korba812 · 2022-03-18 17:38 What are you trying to achieve? I don't think it is possible to delete columns when the DataSet is active. Maybe hiding a column is enough for you? 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 MyDataset.Fields[0].Visible := False; ---------------------------------------------------------------------- ilcaa72 · 2022-03-18 17:59 hiding the column at index value still produces the 8 total record count, i need the count to decrease ) i need to place the values in labels but randomly place them,  so logic is. for i := 0 to mydataset.FieldsCount do get random index.... random(mydataset.FieldCount) get value at index...  checkbox.text := mydataset.Field[rand_index] delete this indexed location... ??? this is the pseudo code, but problem is randomly assigning the field values (answers to quizes) to checkboxes...  do you recommend another data structure that once i run the sql query, i can load the names/fields, select the field value by index and also delete by index location? thanks (new to Delphi language0 ---------------------------------------------------------------------- korba812 · 2022-03-18 18:24 Here is a possible solution: 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  I: Integer;  IntArr: array of Integer; begin  Randomize;  IntArr := [];  for I := 0 to 10 {mydataset.FieldCount - 1} do    IntArr := Concat(IntArr, [I]);  while Length(IntArr) > 0 do  begin    I := Random(Length(IntArr));    WriteLn(IntArr[I]); // checkbox.text := mydataset.Field[IntArr[I]]    Delete(IntArr, I, 1);  end;end. ---------------------------------------------------------------------- ilcaa72 · 2022-03-18 18:47 thanks, it works great.