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
0001952 [JEDI VCL] 00 JVCL Components feature always 2004-07-09 11:59 2005-08-28 09:03
Reporter RichardLi View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0001952: TJvCSVDataSet Bugs
Description jvCSVData.pas unit, TJvCustomCsvDataSet.CopyFromDataset has bug.
'DataSet.Fields.FieldByNumber(I+1)' will not work if you have calculated fields.
To correct this, you can change it to 'DataSet.Fields[I]'.

Additional, TJvCsvDataSet can only copy data from a known Dataset. Use code bellow, you can copy data from any dataset and save to csv file.

  for I := 0 to adataset.FieldCount - 1 do // Iterate
  begin
    case adataset.Fields[I].DataType of
      ftString,ftGuid:
        CsvFieldDef := adataset.Fields[I].FieldName + ':$' + inttostr(adataset.Fields[I].Size);
      ftBytes, ftVarBytes, ftAutoInc, ftWord, ftSmallint, ftInteger:
        CsvFieldDef := adataset.Fields[I].FieldName + ':%';
      ftDate, ftTime, ftDateTime:
        CsvFieldDef := adataset.Fields[I].FieldName + ':@';
      ftFloat, ftCurrency, ftBCD:
        CsvFieldDef := adataset.Fields[I].FieldName + ':&';
      ftBoolean:
        CsvFieldDef := adataset.Fields[I].FieldName + ':!';
    end;
    if aCsvDataset.CsvFieldDef = '' then
       aCsvDataset.CsvFieldDef := CsvFieldDef
    else
       aCsvDataset.CsvFieldDef := aCsvDataset.CsvFieldDef + ','+ CsvFieldDef;
  end;
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0007761)
obones (administrator)
2005-08-10 02:57

The first part about the calculated field is in CVS.
Could you have a look in the latest source and provide more indications for the second part? Especially line numbers and description.
(0007864)
obones (administrator)
2005-08-28 09:03

No answers in a timely manner, this is considered resolved.
As to the second part, please post a new issue should you be able to.

- Issue History
Date Modified Username Field Change
2004-07-09 11:59 RichardLi New Issue
2005-08-10 02:57 obones Note Added: 0007761
2005-08-10 02:57 obones Status new => feedback
2005-08-28 09:03 obones Status feedback => resolved
2005-08-28 09:03 obones Resolution open => fixed
2005-08-28 09:03 obones Assigned To => obones
2005-08-28 09:03 obones Note Added: 0007864


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