TomDuncan Active Member Licensed User Longtime User Apr 3, 2013 #1 What is the easiest method to import a csv file into your database along with the headers from the first row. I am using a '|' as a seperator. BTW the file has around 6000 records and 70 fields, so I will need to expand the field count. Is this done globally or on a file by file basis. The finished project will be using about 8 databases. These will then be imported into my Delphi project on demand. Is the easiest method just to copy the database files from the Android to the pc then import. I have used an ftp server on the pc and this works quiet well. Tom :sign0104:
What is the easiest method to import a csv file into your database along with the headers from the first row. I am using a '|' as a seperator. BTW the file has around 6000 records and 70 fields, so I will need to expand the field count. Is this done globally or on a file by file basis. The finished project will be using about 8 databases. These will then be imported into my Delphi project on demand. Is the easiest method just to copy the database files from the Android to the pc then import. I have used an ftp server on the pc and this works quiet well. Tom :sign0104:
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2013 #2 You can load a CSV file with StringUtils.LoadCSV2. Is the easiest method just to copy the database files from the Android to the pc then import. Click to expand... It is hard to say. It depends on your specific requirements. Upvote 0
You can load a CSV file with StringUtils.LoadCSV2. Is the easiest method just to copy the database files from the Android to the pc then import. Click to expand... It is hard to say. It depends on your specific requirements.
TomDuncan Active Member Licensed User Longtime User Apr 3, 2013 #3 Thanks for that. Will test it out in the morning. Will be able to read the headers, set up the database then import the rest. Tom Upvote 0
Thanks for that. Will test it out in the morning. Will be able to read the headers, set up the database then import the rest. Tom
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2013 #4 It loads the complete CSV at once. If the file is large than this method might be too slow. Upvote 0
TomDuncan Active Member Licensed User Longtime User Apr 3, 2013 #5 I think I might go back to using sqlite and try and get my head around dbutils. Speed for this project is very important. Upvote 0
I think I might go back to using sqlite and try and get my head around dbutils. Speed for this project is very important.
Erel B4X founder Staff member Licensed User Longtime User Apr 4, 2013 #6 SQLite is a much better tool for any non-small data set. Upvote 0