TIBCQuery Order By Error

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dokkie
Posts: 43
Joined: Wed 08 Oct 2008 21:58

TIBCQuery Order By Error

Post by Dokkie » Wed 05 Nov 2008 00:02

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 05 Nov 2008 08:53

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.

Dokkie
Posts: 43
Joined: Wed 08 Oct 2008 21:58

Post by Dokkie » Wed 05 Nov 2008 19:43

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.

Post Reply