Jump to content

Brian Evans

Members
  • Content Count

    291
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Brian Evans

  1. Brian Evans

    suppress connection killed/ gone away dialog

    Likely the reconnect failed and latter on after the error dialog is closed the connection gets opened again and the application continues on. A FDConnection has some events to give you a chance to handle exceptions or log what is happening: OnError, OnLogin, OnLost, OnRecover and OnRestored. If you add some logging to OnLost with a timestamp you should be able to tell what is going on and when.
  2. A quick look at the file (searched Bing for the 2022VAERSDATA.csv) and it looks like double quotes within a string field are escaped with a double quote. As well only string fields that contain commas or double quotes appear to be enclosed in double quotes. Will take a more detailed look when I get a chance. LOAD DATA local INFILE 'c:/programdata/mysql/mysql server 8.0/uploads/2022VAERSDATA.csv' INTO TABLE data CHARACTER SET latin1 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '"' IGNORE 1 LINES
  3. The MySQL LOAD DATA statement can certainly handle all of that not sure why you think otherwise? MySQL :: MySQL 5.7 Reference Manual :: 13.2.6 LOAD DATA Statement The [{FIELDS | COLUMNS} [TERMINATED BY 'string'] [[OPTIONALLY] ENCLOSED BY 'char'] [ESCAPED BY 'char'] can handle double quotes. The SET col_name={expr | DEFAULT} section can be used for date, Boolean or other field conversions as needed.
  4. I tend to move it all into a DataModule (one per thread type/definition) so it ends up under an instance variable for that namespace wise.
×