Page 1 of 1

Export to CSV fails to export all records when large number of rows returned

Posted: Mon Jul 13, 2020 1:19 pm
by DiZzyDmon
PrimalSQL 4.5.72.0 64-bit
Windows 10 1909 64-bit

When I run a query (click "Execute Query"), PrimalSQL's Results pane always displays the full results from the query, no matter how many rows are returned (screenshot "01 Execute Query").

But when any query returns a large number of rows (10,000+-ish or more), when I click "Export Results" > "Export to CSV" (or "Export to HTML", "...to Text", "...to XML"), the "Export to CSV" progress bar dialog pops up, most of the query results disappear from the Results pane (screenshot "02 Export to CSV"), the progress bar completes, the Results remain largely missing (until I run the query again).

When the export completes, the resulting file only has a few hundred rows of data, followed by loads of blank lines. The number of lines in the file corresponds exactly to the number of rows returned by the query.

This started happening several months ago, with an earlier version of PrimalSQL (sorry, I don't remember the version number). At that time, the problem only occurred when I ran PrimalSQL on my laptop at home, VPNed in to our corporate intranet. My workaround was to connect to a (virtual) computer that resides in our corporate datastore (and thus directly connected to our intranet), run PrimalSQL from that computer.

Now the problem occurs on the wired-to-the-datacenter computer as well.

Just now I figured out that if I...
1. Right-click the results, click "Select All"
2. Right-click the selected results, click "Copy"
3. Open Notepad, Ctrl+V to paste
4. Save the Notepad file as a tab-separated-values (.TSV) file
...all of the results make it into the .TSV file (which can be opened directly in Excel). The column names don't make it over, have to be entered manually.

So, I've got (yet another) workaround, making this a low-level issue. Nonetheless, it's a bug that would be nice to see squashed.

Re: Export to CSV fails to export all records when large number of rows returned

Posted: Mon Jul 13, 2020 4:14 pm
by stephanied
This issue is being looked into and we will get back to you soon.

Re: Export to CSV fails to export all records when large number of rows returned

Posted: Mon Aug 10, 2020 8:57 am
by stephanied
Thanks for your patience. I have been unable to reproduce this. Which database connection were you using? (MySQL, Access, etc.)