View Issue Details

IDProjectCategoryView StatusLast Update
0005558JEDI VCL00 JVCL Componentspublic2011-09-21 11:39
ReportermatheusdAssigned Toobones 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionsuspended 
Product Version3.40 
Target VersionFixed in Version 
Summary0005558: fix for TJvCsvDataSet add fields from csv
DescriptionWhen the definition of a csv dataset is changed (with field additions), when loading an older version of the csv file you cannot modify the value of the new fields (the component raises an Exception with the message 'GetCsvRowItemData: Column index values are corrupt.').

To fix this message, when loading a csv file new fields must be added to all records. This is already 99% implemented in the current (3.40) version of the component, but it was missing the actual appending of the new fields to a record during parsing. This is done in jvCsvData.pas, in the method

procedure TJvCustomCsvDataSet.InternalOpen()

around line 3770 change

{$IFDEF UNICODE}
if FUtf8Detected then
  ProcessCsvDataRow(Utf8ToAnsi(CsvLine), Counter)
else
  {$ENDIF UNICODE}
  ProcessCsvDataRow(string(AnsiString(CsvLine)), Counter);

to

{$IFDEF UNICODE}
if FUtf8Detected then
  ProcessCsvDataRow(Utf8ToAnsi(CsvLine+AppendStr), Counter)
else
  {$ENDIF UNICODE}
  ProcessCsvDataRow(string(AnsiString(CsvLine+AppendStr)), Counter);
TagsNo tags attached.

Activities

obones

2011-06-07 17:55

administrator   ~0018627

Please provide the zipped sources of a sample application showing this

obones

2011-09-21 11:39

administrator   ~0018909

No news, suspending the issue

Issue History

Date Modified Username Field Change
2011-04-27 16:46 matheusd New Issue
2011-06-07 17:55 obones Note Added: 0018627
2011-06-07 17:55 obones Status new => feedback
2011-09-21 11:39 obones Note Added: 0018909
2011-09-21 11:39 obones Status feedback => resolved
2011-09-21 11:39 obones Resolution open => suspended
2011-09-21 11:39 obones Assigned To => obones