Forum > Database

Possible bug in TCSVDataSet?

(1/2) > >>

I load up a CSV file to TCSVDataSet, and set it active.
Then, I go to CSVOptions of TCSVDataSet and set FirstLineAsFieldNames to true.
But then there occurs error --- it is not done.
I think the first column names --- Column1, Column2, ...  are not cleared.
In the FieldDefs of TCSVDataSet, column names are changed to first line, but if I right click on the TCSVDataSet icon and enter Edit Fields, the old field names are alive, and I cannot remove them.

What's the "Field"-Delimiter inside the CSV?
What did you set as Field-Delimiter in your TCSV-Object?

When a dataset is active its structure cannot be changed any more. Therefore, I'd propose to FIRST set FirstLineAsFieldNames=true and THEN to set Active=true (untested).

That is the correct order.

What is "that"? First set FirstLineAsFieldNames/second set Active, or first set Active/second set FirstLineAsFieldName?


[0] Message Index

[#] Next page

Go to full version