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

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
DiZzyDmon
Posts: 45
Joined: Mon Aug 06, 2007 11:04 pm

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

Post 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.
Attachments
01 Execute Query.png
01 Execute Query.png (91.73 KiB) Viewed 1205 times
02 Export to CSV.png
02 Export to CSV.png (75.93 KiB) Viewed 1205 times

User avatar
stephanied
Site Admin
Posts: 4
Joined: Fri Feb 07, 2020 9:10 am

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

Post by stephanied »

This issue is being looked into and we will get back to you soon.

User avatar
stephanied
Site Admin
Posts: 4
Joined: Fri Feb 07, 2020 9:10 am

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

Post by stephanied »

Thanks for your patience. I have been unable to reproduce this. Which database connection were you using? (MySQL, Access, etc.)