* * *

Author Topic: [SOLVED] firebird - fill table  (Read 1804 times)

scons

  • Jr. Member
  • **
  • Posts: 97
Re: [SOLVED] firebird - fill table
« Reply #15 on: July 14, 2017, 10:40:58 am »
Yes, I should investigate some time for this. Just did a test with a bigger csv file.

Load csv file in Firebird 3 (with my silly parsing code, and over wifi network)
Code: Text  [Select]
  1. [load csv in DB]...
  2. [START] - 10:28:38.537
  3. [END]   - 10:32:39.658
  4. [LOADED ROWS]- 21435

Load that same file in an sdfdataset
Code: Text  [Select]
  1. [load csv]...
  2. [START] - 10:36:13.313
  3. [END]   - 10:36:13.348
  4. [LOADED ROWS]- 21435
  5. [show in grid]...
  6. [START] - 10:36:13.350
  7. [END]   - 10:36:13.363

Of course this is not the same test but is just shows how amazingly fast this SDFDataset is.
Windows 10-64bit Lazarus 1.6.4 FPC 3.0.2

mangakissa

  • Hero Member
  • *****
  • Posts: 707
Re: [SOLVED] firebird - fill table
« Reply #16 on: July 15, 2017, 08:44:04 am »
@avra,

sdfdataset is nice, but after you read the CSV into it, you still have to make an import function to the database. The way scons handle the CSV is exactly the same way
Lazarus 1.64 (32b) / FPC 3.0
Windows 10

avra

  • Hero Member
  • *****
  • Posts: 1085
    • Additional info
Re: [SOLVED] firebird - fill table
« Reply #17 on: July 15, 2017, 11:38:32 am »
sdfdataset is nice, but after you read the CSV into it, you still have to make an import function to the database.
Quite true. I didn't say that importing data into Firebird is automatic.

Quote
The way scons handle the CSV is exactly the same way
Not quite. I think that using something like
Code: Pascal  [Select]
  1. ThirdColumnStrData := MyCSV.Fields[3].AsString;
is more readable and less work then code that manually extracts column from a line in StringList. Besides, having a dataset also enables nice preview of data in a grid if needed.
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus