Using D2009
I'm trying to sort a dataset depending on a field or set of fields. A routine is called which does the following pseudocode.
DatasetToSort.SetOrderBy('Field1;Field2')
DatasetToSort.Execute
The dataset is sorted as expected.
If I use only one field then an Access EAccessviolation is triggered
DatasetToSort.SetOrderBy('Field1')
DatasetToSort.Execute --> Access violation
if I use the same field twice then no error occurs and the field is sorted
DatasetToSort.SetOrderBy('Field1;Field1')
DatasetToSort.Execute
The dataset is sorted.
I've looked at the FinalSQL generated and it appears to be correct. Idon't have the source code so I've not been able to trace the Execute statement.
The same problem occurs if I use
DatasetToSort.Close;
DatasetToSort.Open ---> error as described above
Any ideas?
Peter
TIBCQuery Order By Error
Solved the problem. I rewrote the routine (which is on a form) from scratch using IBDAC components.
I had originally used IBExpress components included with delphi which I then replaced with my new IBDAC components. Somewhere the conversion caused this problem which went away when I started with a new form.
I had originally used IBExpress components included with delphi which I then replaced with my new IBDAC components. Somewhere the conversion caused this problem which went away when I started with a new form.