Trying to enter a TBufDataset.IndexName and it keeps disappearing. lazarus / 16-Databases ---------------------------------------------------------------------- RedOctober · 2018-01-02 22:57 I have nothing in the .IndexFieldName property, it's empty.  I have configured a index called cdsUsrIdxLoginID which has a Fields property of LoginID and is ixPrimary.  When I go to the TBufDataSet and try to set the IndexName property, the name I paste into the property disappears and the phrase   'DEFAULT_ORDER' appears instead. I am sure the field name I used for the IndexDef is correct.  My MaxIndexes is 2 (the default) What am I missing?  Thanks in advance for any help you can provide. ---------------------------------------------------------------------- RedOctober · 2018-01-04 18:40 I have made a small sample project showing the problem.  Maybe I am missing something. ---------------------------------------------------------------------- balazsszekely · 2018-01-06 09:10 Hi RedOctober, Clear  IndexDef, IndexFieldName, IndexName then: 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 TForm1.FormCreate(Sender: TObject);begin  BufDataset1.MaxIndexesCount := 2;  BufDataset1.AddIndex('LoginIndex', 'LoginID', [ixPrimary, ixUnique]);  BufDataset1.IndexFieldNames:='LoginID';  BufDataset1.IndexName := 'LoginIndex';  BufDataset1.CreateDataSet;end; PS: Test project attached. ---------------------------------------------------------------------- RedOctober · 2018-01-06 17:47 Thank you GetMem.  After some experimentation, I was able to determine that I can set all the index related properties (including defs) at design time.  The only property that cannot be set (which is a bug in Laz 1.9 or Fbc 3.1.1) is the IndexName. So, in my project code, I simply set the IndexName in code, BEFORE I do a .CreateDataset; This was the most important clue you gave me, and it solved my problem.  Thank you. Example: .. set all other settings in the Lazarus IDE, then hardcode: 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   BufDataset1.IndexName := 'LoginIndex';  BufDataset1.CreateDataSet;