Error with CRDBGrid and LocalSorting

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
TPln
Posts: 3
Joined: Wed 30 Jan 2013 17:47

Error with CRDBGrid and LocalSorting

Post by TPln » Wed 30 Jan 2013 18:03

Hi,

I'm having trouble with the latest version of UniDAC (v4.6.11).

I have a TUniQuery linked to a TCRDBGrid, on which OptionsEx.lgeLocalSorting=true. When I click on a column title to sort the data, I get an exception: "Field '...' not found".

When I compile the same application with UniDAC v4.5.10, it works.

I'm working with C++ Builder 2010 / Oracle 11.2.0.3.0.

Thanks for your help

Thierry

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with CRDBGrid and LocalSorting

Post by AlexP » Thu 31 Jan 2013 10:48

Hello,

Thank you for the information, we have already fixed this problem, the fix will be included to the next version of UniDAC.

TPln
Posts: 3
Joined: Wed 30 Jan 2013 17:47

Re: Error with CRDBGrid and LocalSorting

Post by TPln » Thu 31 Jan 2013 10:58

Hi AlexP,

Do you have an ETA for the next release ?
Or do you have a source code patch for this issue ?

Thanks,

Thierry

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with CRDBGrid and LocalSorting

Post by AlexP » Thu 31 Jan 2013 11:08

Hello,

To fix this problem, you should replace the following code in the CRGrid.pas module, in the TCRDBGrid.Reorder; method:

Code: Select all

St := St + '''' + Columns[TSortColInfo(FSortInfo[i]).Index].Field.FieldName + ''''
with

Code: Select all

St := St + Columns[TSortColInfo(FSortInfo[i]).Index].Field.FieldName

TPln
Posts: 3
Joined: Wed 30 Jan 2013 17:47

Re: Error with CRDBGrid and LocalSorting

Post by TPln » Thu 31 Jan 2013 13:02

Thanks a lot ALexP !!

My problem is solved.

:D

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with CRDBGrid and LocalSorting

Post by AlexP » Thu 31 Jan 2013 13:04

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

gregoro
Posts: 2
Joined: Sun 03 Feb 2013 21:20

Re: Error with CRDBGrid and LocalSorting

Post by gregoro » Sun 03 Feb 2013 21:46

Hello,

I am using SDAC for RAD Studio XE3 6.6.11 and have the same problem with LocalSorting in CRDBGrid.

I made changes in CRGrid.pas module as Alex wrote, installed new BPL but problem is existing. When you click title of grid you are receiving exception: "Field '...' not found".

Could anybody suggest if I am doing sth wrong ? Maybe for SDAC some other changes in CRGrid.pas are necessary?

Thank you for your help in advance.

Gregor

AndreyZ

Re: Error with CRDBGrid and LocalSorting

Post by AndreyZ » Mon 04 Feb 2013 09:47

Please make sure that Delphi Library Path contains the SDAC_Install_Dir\Source directory (here the CRGrid.pas file is located). Make the necessary changes (described by Alex above) in the CRGrid.pas file. After this, you should rebuild your application.

gregoro
Posts: 2
Joined: Sun 03 Feb 2013 21:20

Re: Error with CRDBGrid and LocalSorting

Post by gregoro » Mon 04 Feb 2013 12:12

Hello Andrey!

Thanks for your help-it works:-)
Earlier I forget about including source in library path.
Problem is solved.

Gregor

AndreyZ

Re: Error with CRDBGrid and LocalSorting

Post by AndreyZ » Mon 04 Feb 2013 12:43

I am glad I could help.

Post Reply