Page 1 of 1

TIBCQuery Order By Error

Posted: Wed 05 Nov 2008 00:02
by Dokkie
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

Posted: Wed 05 Nov 2008 08:53
by Plash
We could not reproduce the problem. Please send to ibdac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.

Posted: Wed 05 Nov 2008 19:43
by Dokkie
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.