Page 1 of 1
Error with CRDBGrid and LocalSorting
Posted: Wed 30 Jan 2013 18:03
by TPln
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
Re: Error with CRDBGrid and LocalSorting
Posted: Thu 31 Jan 2013 10:48
by AlexP
Hello,
Thank you for the information, we have already fixed this problem, the fix will be included to the next version of UniDAC.
Re: Error with CRDBGrid and LocalSorting
Posted: Thu 31 Jan 2013 10:58
by TPln
Hi AlexP,
Do you have an ETA for the next release ?
Or do you have a source code patch for this issue ?
Thanks,
Thierry
Re: Error with CRDBGrid and LocalSorting
Posted: Thu 31 Jan 2013 11:08
by AlexP
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
Re: Error with CRDBGrid and LocalSorting
Posted: Thu 31 Jan 2013 13:02
by TPln
Thanks a lot ALexP !!
My problem is solved.

Re: Error with CRDBGrid and LocalSorting
Posted: Thu 31 Jan 2013 13:04
by AlexP
Hello,
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.
Re: Error with CRDBGrid and LocalSorting
Posted: Sun 03 Feb 2013 21:46
by gregoro
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
Re: Error with CRDBGrid and LocalSorting
Posted: Mon 04 Feb 2013 09:47
by AndreyZ
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.
Re: Error with CRDBGrid and LocalSorting
Posted: Mon 04 Feb 2013 12:12
by gregoro
Hello Andrey!
Thanks for your help-it works:-)
Earlier I forget about including source in library path.
Problem is solved.
Gregor
Re: Error with CRDBGrid and LocalSorting
Posted: Mon 04 Feb 2013 12:43
by AndreyZ
I am glad I could help.