Andreas Mueller - 2012-10-09 22:36:13 -
In reply to message 1 from Piersante Blasioli
Hello Piersante,
what you describe looks like a "duplicate primary key".
Please keep in mind that this is not a complete db-management tool and it lacks many functions that might be useful.
In this case it means you have to take care that your KeyField contains unique values [new CSVHandler($Filename, $Separator, $KeyFieldName) uses the cikumn named $KeyFieldName as primary unique key]. CSV Handler does not check for duplicate keys though. The delete function is quite stupid and removes any line having the correspondent value in its keyfield.
If your data do not contain a column with unique values you might just add a simple "ID" field and fill it with with an incremental count, everything should work fine.
Hope this helped,
regards
Andreas