ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > N.A.N.Y. 2018

NANY 2018 - 6 Command line Database utilities

<< < (2/2)

chesterw:
Because Delphi is such a popular tool throughout the world, those who write viruses often use Delphi.  Normal library routines in Delphi produce strings of characters in most Delphi programs.  In error, some antivirus heuristics look for those strings of characters and automatically label (falsely) a program as a virus.  So if I submit a program in Delphi, it pretty much is guaranteed to be falsely labeled as a virus by some antivirus program.  Packers like UPX compress the final EXE significantly, which speeds up file transfers, and has the added benefit of avoiding the false positives of some antivirus software.  But then, as pointed out above, they complain that you used UPX to pack the EXE.  I can't win...

Delphi is quite versatile in its database capabilities.  The 6 programs here are really just 2 programs, with slight changes for 3 different databases.  The trick used in the 3 "dump out a table" programs was to discover 3 different ways to get the list of columns.  Every database does it differently.  Once I had the list of column names, and put them at the top of the CSV file, I did a "SELECT * FROM tablename" and wrapped each field with double-quotes and commas, to make a "safe" CSV file, as a field can contain commas.

The other 3 programs for getting the result of a query have the user give me the column names, and a (hopefully pre-tested) query that matches those column names.  Using a similar process as above, I create the CSV file.

The real versatility is using the batch/CMD files to do the routine stuff like passwords, and allow the flexibility of dumping different tables or running a set of custom SQL files.  Enjoy!

pencoe:
In several years coding in Delphi i had never any complaint about an AV and a Delphi exe, but several false positives with UPX... so i'm with mouser on this one.

Tuxman:
I honestly wish more people would come back to Delphi (or Free Pascal, whatever floats your boat) so I can have more reasons to use Delphi for new projects because of a sane ecosystem. As it stands, every additional Delphi Unit that does not come from Embarcadero (or whatever their current name is) is pretty much left to rot. :(

(But Delphi sure does have a nice "standard" library.)

chesterw:
07/02/2018 - In the 3 QueryToCSV files:
  Corrected a bug that added a blank column to the output file.
  Enhanced error messages.
  Added an N parameter: Output file has a header unless there is this parameter.

Navigation

[0] Message Index

[*] Previous page

Go to full version