View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003974 | JEDI VCL | 00 JVCL Components | public | 2006-10-30 06:27 | 2007-10-12 06:27 |
Reporter | cfzwit | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | 3.34 | |||
Summary | 0003974: JvMemoryData bug in "FindDeleted" Method And new property "OneValueInArray" | ||||
Description | Klaus Greiner , Send me this BUG : I think there is a bug in JvMemorydata (JVCL 3.20). I get an exception in TJvMemoryData.FindDeleted. Code: function TJvMemoryData.FindDeleted(KeyValues: Variant): Integer; var I, J, Len, Equals: Integer; PxKey: TPVariant; xKey, ValRow, ValDel: Variant; begin Result := -1; if VarIsNull(KeyValues) then Exit; PxKey := nil; Len := VarArrayHighBound(KeyValues, 1) try for I := 0 to FDeletedValues.Count - 1 do begin PxKey := FDeletedValues[I]; - here the exception occurs. (EVariantBadVarTypeError) because there is no value in the list -> xKey := PxKey^; ... I'm not so familiar with this code to find out why... Can you help me? The exception occurs if I load a small dataset to my JvMemoryDataset, insert a new record, delete this inserted record and insert a record again (with append; ... := .... ; post) At the Post of the last insert the exception ooccors described above in FindDeleted. (***********************************************************************) I Tried corrected this bug in "InternalDelete", "InternalPost", "Destroy" and "FindDeleted" methods I Added an new property : "OneValueInArray". If TRUE , the GetValues method, return the value of ONE field in a Variant Array ; if FALSE, return only the variant value without array. This change, is for compatibility with ALL database componentes (BDE, IBX, ADO, DBISAM, etc, etc, etc) | ||||
Tags | No tags attached. | ||||
2006-10-30 06:27
|
JvMemoryDataset.pas (76,509 bytes) |
|
No Value in the list? But the Count property returned something greater than zero, so the loop is running. This is very weird... |
|
obones : I try fix the count bug in this week and send you the new source code Best regards |
2007-06-20 13:40
|
JvMemoryDataset.zip (15,895 bytes) |
|
obones : I send you a new file (JvMemoryDataset.zip), with changes and comments (into the source code). Thats changes "fixed" this "bugs". Please, search the word "FDeletedValues.Count" and you find two comments and modifications. Thank you !!!, and sorry my not good English. PD : into this file, the three mantis issues are fixed. |
|
obones : I send you a new file (JvMemoryDataset.zip), with changes and comments (into the source code). Thats changes "fixed" this "bugs". Please, search the word "FDeletedValues.Count" and you find two comments and modifications. Thank you !!!, and sorry my not good English. PD : into this file, the three mantis issues are fixed. |
|
This is now in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-10-30 06:27 | cfzwit | New Issue | |
2006-10-30 06:27 | cfzwit | File Added: JvMemoryDataset.pas | |
2007-06-19 02:52 | obones | Note Added: 0013395 | |
2007-06-19 02:52 | obones | Status | new => feedback |
2007-06-20 08:21 | cfzwit | Note Added: 0013500 | |
2007-06-20 13:40 | cfzwit | File Added: JvMemoryDataset.zip | |
2007-06-20 13:48 | cfzwit | Note Added: 0013502 | |
2007-06-20 13:57 | cfzwit | Note Added: 0013503 | |
2007-10-12 06:26 | obones | Status | feedback => resolved |
2007-10-12 06:26 | obones | Fixed in Version | => Daily / SVN |
2007-10-12 06:26 | obones | Resolution | open => fixed |
2007-10-12 06:26 | obones | Assigned To | => obones |
2007-10-12 06:26 | obones | Note Added: 0013914 |