Forum > Database
Possible bug in TCSVDataSet?
egsuh:
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.
Zvoni:
Sample-Code?
What's the "Field"-Delimiter inside the CSV?
What did you set as Field-Delimiter in your TCSV-Object?
wp:
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).
Thaddy:
That is the correct order.
wp:
What is "that"? First set FirstLineAsFieldNames/second set Active, or first set Active/second set FirstLineAsFieldName?
Navigation
[0] Message Index
[#] Next page