Hello,
I'm fighting the problem in my application that arise after Lazarus upgrade from 2.0.4 to 2.0.10.
I'm using this code to sort TSQLQuery with indexes:
https://forum.lazarus.freepascal.org/index.php/topic,20142.0.htmlSorting tsqlquery with indexes working example(Yes it works now)I set SQLQuery1.SQL.text, then call SQLQuery1.Open.
When data appears in DBGrid1, I apply sorting.
In Lazarus 2.0.4 it was possible to close SQLQuery1, set new SQL.text and open it again - data in DBGrid1 appeared already sorted.
In Lazarus 2.0.10 second attempt to open SQLQuery1 causes error: "DBQuery1: Index 'ASC_callid' not found".
I didn't find any description about TSQLQuery indexes, so I'm doing blind troubleshooting
I see, that DBQuery1.IndexName still equals 'ASC_callid' after DBQuery1 is closed.
I have tried to call DBquery1.ClearIndexes or DBQuery1.IndexDefs.Clear after closing DBQuery1,
but next open still produce the same error.
Please share an idea how to deal with indexes in this case.