I have a dynamic query that returns around 590,000 records. It runs successfully the first time, but if I run it again, I keep getting a System.OutOfMemoryException
System.OutOfMemoryException
Perhaps you're not disposing of the previous connection/ result classes from the previous run which means their still hanging around in memory.