Recent

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

scons

  • Full Member
  • ***
  • Posts: 141
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 2.0.12 + FPC 3.2.0

mangakissa

  • Hero Member
  • *****
  • Posts: 1131
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 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

avra

  • Hero Member
  • *****
  • Posts: 2514
    • 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 - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018