Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003974 [JEDI VCL] 00 JVCL Components major always 2006-10-30 06:27 2007-10-12 06:27
Reporter cfzwit View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.20
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)
Additional Information
Tags No tags attached.
Attached Files ? file icon JvMemoryDataset.pas [^] (76,509 bytes) 2006-10-30 06:27
zip file icon JvMemoryDataset.zip [^] (15,895 bytes) 2007-06-20 13:40

- Relationships

-  Notes
(0013395)
obones (administrator)
2007-06-19 02:52

No Value in the list? But the Count property returned something greater than zero, so the loop is running. This is very weird...
(0013500)
cfzwit (reporter)
2007-06-20 08:21

obones :
        I try fix the count bug in this week and send you the new source code

Best regards
(0013502)
cfzwit (reporter)
2007-06-20 13:48

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.
(0013503)
cfzwit (reporter)
2007-06-20 13:57

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.
(0013914)
obones (administrator)
2007-10-12 06:26

This is now in SVN

- Issue History
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:19 cfzwit Issue Monitored: cfzwit
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker