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
0003610 [JEDI VCL] 00 JVCL Components crash always 2006-03-26 09:29 2006-04-14 06:01
Reporter cfzwit View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.10
Summary 0003610: Fixed error in "GetValues" method for JvMemoryData
Description Hi !!!

I change this method (GetValues), becuase produce an variant conversion error.
This is the complete source ( ONLY IN "GetValues" METHOD !!! )

function TJvMemoryData.GetValues(FldNames: string = ''): Variant;
var
  List : TList;
  I: Integer;
begin
  Result := Null;
  if FldNames = '' then
    FldNames := FKeyFieldNames;
  If FldNames = '' Then Exit;

  If Pos(';',FldNames) > 0 Then
  Begin
    List := TList.Create;
    GetFieldList(List,FldNames);
    Result := VarArrayCreate([0, List.Count - 1], varVariant);
    for I := 0 to List.Count - 1 do
      Result[I] := TField(List[I]).Value;
    FreeAndNil(List);
  End
  Else
  Begin
    Result := VarArrayCreate([0,0],VarVariant);
    Result[0] := FieldByName(FldNames).Value;
  End;
end;

Please, change this routine into the CVS (JvMemoryData.Pas) in the JEDI site.

Thank You !!!
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0009083)
obones (administrator)
2006-04-13 02:52

What's the point of this change?
What was the problem it is supposed to fix?
Please provide a sample application showing the problem, AFTR you have tried with the latest JVCL.
(0009087)
cfzwit (reporter)
2006-04-13 04:50

>> What's the point of this change?
1)Into the method "GetValues", I eliminate the auxiliar routine "FldsNamesToStrList", and use the method "GetFieldList" from the ancestor class TDataset.
2) If the returned value IS ONLY FOR ONE FIELD, I return a Variant Array ( [0,0] ) with the field <-- In previous version, I return a Variant without array.

>> What was the problem it is supposed to fix?
This method, is used into the method "ApplyChanges", I Get the key values of the records changed and try LOCATE the record in the original Dataset before apply the changes. With BDE and IBX the actual version not have problems, but with other ( ADO, DBISam, DBX, etc ) the locate method of Dataset crashed, IF THE RETURNED VALUE IS ONLY ONE FIELD, because is NOT content into a ARRAY of variant.

>> Please provide a sample application showing the problem, AFTR you have tried with the latest JVCL
This bug haved revelead for an colega, (not work with BDE/IBX) and I not have the source code. Sorry.

Thank You for your feedbak !!!
(0009108)
obones (administrator)
2006-04-14 06:01

Thanks, this is now in CVS.

- Issue History
Date Modified Username Field Change
2006-03-26 09:29 cfzwit New Issue
2006-04-13 02:52 obones Note Added: 0009083
2006-04-13 02:52 obones Status new => feedback
2006-04-13 04:50 cfzwit Note Added: 0009087
2006-04-14 06:01 obones Status feedback => resolved
2006-04-14 06:01 obones Resolution open => fixed
2006-04-14 06:01 obones Assigned To => obones
2006-04-14 06:01 obones Note Added: 0009108


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