El 13/4/20 a las 12:43, Michael Van Canneyt via lazarus escribió:
So, if I want to process the dataset in different orders with TbufferDataset, before opening the dataset I must set MaxIndexesCount to all the orders I'm going to use.

Yes.


Am I right? Or I have missed something?

You are right.

Probably we should at least now offer the possibility to delete indexes, and I am not sure the MaxIndexesCount is still needed.

At least it is used.

If you create the indexes before opening the dataset, MaxIndexesCount is automatically updated to hold your indexes plus the two default indexes.

But in an active dataset, you can't call addindex more than MaxIndexesCount, and being aware that two slots are used by two default indexes. You may get "The maximum amount of indexes is reached."

By the way. I got "The maximum amount of indexes is reached." and I went mad trying to find where I was creating two indexes. Was I calling addindex twices before and I wasn't aware?. Finally I looked at the code and when you call addindex, it creates two indexes: 'DEFAULT_ORDER' and ''. What are those two phantom indexes for? I couldn't find any documentation about




--
--------
Saludos
Santiago A.

-- 
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to