View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005603 | JEDI VCL | 00 JVCL Components | public | 2011-06-21 19:47 | 2012-09-10 14:15 |
Reporter | stevegr | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.40 | ||||
Target Version | Fixed in Version | 3.46 | |||
Summary | 0005603: JvDBUltimGrid - ADO sorting problem. | ||||
Description | ADO limitation: Default Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Error on sort when key exists 10 KB. A simple solution is: procedure UpdateProp(const PropName: string; const Value: string); begin // ERROR ADO 10 MB key limitation try SetStrProp(DSet, PropName, Value); FSortedFields := FieldsToSort; FSortOK := True; except { } end; end; | ||||
Tags | No tags attached. | ||||
|
Please provide the zipped sources of a sample application showing this |
|
The try...except block is for general-purpose error handling. The ADO 10MB key limitation error fires when I try to sort one of the following types using postgres database (Encoding UTF8): - memo - character varying(4680) or larger ==> 4680 x 2 = 9360 bytes MSSQL Server do not allow so large values for char fields. I have not tried other databases but as this is an ADO limitation I believe that should happen with any char field that exceeds this limitation. |
|
I'm sorry, but we can't silently swallow ALL exceptions, this is very dangerous and can lead to code injection by hackers There should be another way to deal with this |
|
OK. if there's a way to assist, please let me know. |
|
// That piece of code is working. I tested only with ADO. procedure TJvDBUltimGrid.Sort(FieldsToSort: TSortFields); ...... var DSet: TDataSet; SortField: TField; {needed in UpdateProp} procedure UpdateProp(const PropName: string; const Value: string); var Error: Boolean; begin // ERROR: ADO 10 KB key limitation Error:= (SortWith = swFields) { swFields: for ADO tables } and (SortField.DataType in [ftString, ftWideString]) and (SortField.DataSize > 9361); if not Error then begin SetStrProp(DSet, PropName, Value); FSortedFields := FieldsToSort; FSortOK := True; end else FSortOK := False; end; ...... |
|
Someone with DB knowledge would have to look at this |
|
This is now fixed in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-06-21 19:47 | stevegr | New Issue | |
2011-09-21 11:48 | obones | Note Added: 0018925 | |
2011-09-21 11:48 | obones | Status | new => feedback |
2011-09-28 19:49 | stevegr | Note Added: 0018990 | |
2011-10-07 16:13 | obones | Note Added: 0019017 | |
2011-10-07 16:59 | stevegr | Note Added: 0019018 | |
2011-10-08 21:23 | stevegr | Note Added: 0019022 | |
2012-02-22 14:42 | obones | Note Added: 0019439 | |
2012-02-22 14:42 | obones | Status | feedback => acknowledged |
2012-02-27 11:29 | obones | Relationship added | related to 0005806 |
2012-02-27 11:33 | obones | Note Added: 0019567 | |
2012-02-27 11:33 | obones | Status | acknowledged => resolved |
2012-02-27 11:33 | obones | Fixed in Version | => Daily / SVN |
2012-02-27 11:33 | obones | Resolution | open => fixed |
2012-02-27 11:33 | obones | Assigned To | => obones |
2012-09-10 14:15 | obones | Fixed in Version | Daily / SVN => 3.46 |