I have a few clients with Large Databases and in one case a Client with Multiple Companies with Large Databases. For Example the Job Cost Transactions table for 1 year of Payroll entries generates 300,000 Records.
I created a SQL Query to get the information I needed - a couple Case statements but really nothing fancy. When I use that connector I get the out of Memory Error.
So To Fix that I take that Exact SQL Query and put it in a SQL Stored Procedure - Now it runs perfectly fine - no out of memory issue. OK so I run that for a while but my one client then asks to have the same report on Multiple companies - Since I have it as a stored procedure I have to have the stored Procedure now on multiple databases - when I make a change I have to do it on 4 + databases.
So I started looking back into the Out of memory issue - And as it turns out If I create the Same SQL query in as a SQL Join (Getting the actual Join to work was a nightmare and worthy of a different discussion). But now I don't get the Out of memory Error.
Ya my reports work without getting out of memory errors - but to get them to work is a real chore.
So my Questions to Alchemex is this -
1) Why do these 3 different routines use memory so differently?
2) Are you aware of this - Since this is not a Excel Issue - No memory leak, no graphics etc?
3) Are you planning on fixing this so that SQL Query works - Which should be the place to do this?