Thanks for your feedback, everyone. This one is proving very vexing. I added additional defensive coding to check the row counts before proceeding. It doesn't make a difference.
If I try @jrfondren 's suggestion to run compile with `nim -d:release --stackTrace:on --lineTrace:on c src/BuildEcDataLoadFiles.nim`, the entire program runs lickety-split with no problems. That's awesome. But if I remove the stackTrace and lineTrace options, I get the same failure. The failure is _instant_. I don't even get the usual ODBC messages from leaving reporting on, so I am reasonably sure that it's not related to any of the later work with accessing SQL results. I don't even get to that point. Really struggling to understand what semantics would be causing the change in outcomes if the stackTrace symbols are left in.