Thanks for all the suggestions, really helpfull.
@ Almir.Bispo : interesting to see that there are more usefull (mostly unknown) features available in FPC, I might have a look at this later.
This is how I did it right now, without too much hassle (might be not the most optimal solution).
It turned out that the csv will always have the same format (same columns), only the content can be more or less (rows with data), and after some searching and thinking I came up with this strategy:
- create the DB
- create the tables
- load csv in stringlist
- parse stringlist
- insert into table
Thanks again for everyone's input. It goes pretty fast and all is done in code now without the use any external program.