Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 19, 2017, 02:37 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: NANY 2018 - 6 Command line Database utilities  (Read 660 times)

chesterw

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
NANY 2018 - 6 Command line Database utilities
« on: September 20, 2017, 07:12 AM »
I have noticed that there often is a need to dump database information into a CSV file.  Users then can use
Excel or a similar program to manipulate the data.  These utilities are easy to use, flexible, and fast.
There are 2 utilities for Oracle, 2 for Microsoft SQL, and 2 for SQLite.  They convert a table or SQL into a CSV file.

Oracle:
  OracleTableToCSV.exe       Converts an entire table into a CSV file.
  OracleQueryToCSV.exe       Converts an SQL query result into a CSV file.

Microsoft:
  MSTableToCSV.exe           Converts an entire table into a CSV file.
  MSQueryToCSV.exe           Converts an SQL query result into a CSV file.

SQLite:
  SqliteTableToCSV.exe       Converts an entire table into a CSV file.
  SqliteQueryToCSV.exe       Converts an SQL query result into a CSV file.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 8,140
    • View Profile
    • Donate to Member
Re: NANY 2018 - 6 Command line Database utilities
« Reply #1 on: September 20, 2017, 08:54 PM »
I took the liberty to download the file and submit it to Jotti's malware scanner. 1 AV returned a result, which is likely a false-positive.

https://virusscan.jo...lescanjob/2q535hrt21

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,051
    • View Profile
    • Donate to Member
Re: NANY 2018 - 6 Command line Database utilities
« Reply #2 on: September 21, 2017, 01:36 AM »
@chesterw: It would be nice to hear how you made this (start by using the NANY template in your post), any future plans you have with this, and as a developer I'm interested in the technology stuff used as well.

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 701
    • View Profile
    • Donate to Member
Re: NANY 2018 - 6 Command line Database utilities
« Reply #3 on: September 21, 2017, 05:45 AM »
I took the liberty to download the file and submit it to Jotti's malware scanner. 1 AV returned a result, which is likely a false-positive.

Scanners like to mark any exe that has been compressed (like with UPX) as potential malware. The scanners are probably ticked off that they would have to go through an unpacking process to scan the payload properly, so being the lazy curs that they are, they opt to just mark it as bad stuff without really checking.

That said, I am curious why people still pack their exe's these days. Disk space isn't nearly the problem it was years ago, when storage topped out in the low gbs, and bandwidth savings can't possibly be a real concern unless you're going to get millions of downloads.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 37,597
    • View Profile
    • Donate to Member
Re: NANY 2018 - 6 Command line Database utilities
« Reply #4 on: September 21, 2017, 07:29 PM »
What x16wda said.
These days it seems packing your exe is just asking for headaches with antivirus tools.

chesterw

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: NANY 2018 - 6 Command line Database utilities
« Reply #5 on: October 24, 2017, 07:18 AM »
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!