View Issue Details

IDProjectCategoryView StatusLast Update
0001732JEDI VCL00 JVCL Componentspublic2005-08-10 02:45
ReporteranonymousAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.10 
Summary0001732: TJvCsvDataSet parse error leaves data loaded
DescriptionA poorly formatted CSV file was loaded into a TJvCsvDataSet.
The dataset was opened, and as expected, an exception was raised indicating a parsing error. However, when the file was fixed, and reopened during the same run of the program, the component still reported a parsing error.

A glance at the code seems to show that the internal TStrings is not emptied and freed if a parsing error occurs, as it would during a normal open operation. The fact that the internal TStrings exists is used to determine whether the data should be loaded again. As the object still exists, the component believes it is not supposed to load the object again, and therefore the erroneous data remains in memory instead of being replaced by a new version of the file.

Properties for the component in a form where this error occurred are listed in Additional Information. A sample file that caused the problem is attached. Basically, the CSV file had a series of commas on the first line instead of the field names.
Additional InformationProperties:
  object csvInput: TJvCsvDataSet
    ReadOnly = True
    Changed = False
    CsvUniqueKeys = False
    ExtendedHeaderInfo = False
    CaseInsensitive = False
    SavesChanges = False
    AutoBackupCount = 0
    Left = 32
    Top = 24
  end

File:
,,
"LastName","FirstName","Title"
"Schmoe","Joe","CFO"
"Smith","Jane","CEO"
"Jones","Sam","Manager"
TagsNo tags attached.

Activities

2004-05-06 14:18

 

test.csv (103 bytes)

anonymous

2004-05-11 14:22

viewer   ~0004214

In addition, changing the source file, even while the table is inactive, has other odd effects. For example, some of the CVSHeader properties are not cleared completely.

obones

2005-08-10 02:15

administrator   ~0007758

Confirmed with the latest CVS code base. Bug fix is in progress.

obones

2005-08-10 02:45

administrator   ~0007759

This is now fixed in CVS.

Issue History

Date Modified Username Field Change
2004-05-06 14:18 anonymous New Issue
2004-05-06 14:18 anonymous File Added: test.csv
2004-05-11 14:22 anonymous Note Added: 0004214
2005-08-10 02:15 obones Note Added: 0007758
2005-08-10 02:15 obones Status new => confirmed
2005-08-10 02:45 obones Status confirmed => resolved
2005-08-10 02:45 obones Resolution open => fixed
2005-08-10 02:45 obones Assigned To => obones
2005-08-10 02:45 obones Note Added: 0007759