wolivier69
asked on
System.OutOfMemoryException When Running a Query
I get a System.OutOfMemoryExceptio n When running this as a stored procedure in visual studio.net 2010 but runs in SSMS. Is there a way to get it to run properly in a visual studio application?
WITH Children(PRINTUSERNAME,StaffNumber,Senior)
AS(
SELECT Distinct PRINTUSERNAME, StaffNumber,Senior
From StaffPrintingDetailsInferno where StaffNumber = @Root
UNION all
SELECT m.PRINTUSERNAME, m.StaffNumber, m.Senior FROM StaffPrintingDetailsInferno m
INNER JOIN children l
ON l.StaffNumber = m.Senior
)
SELECT * FROM Children
When are you getting that exception? Is this a run-time exception? Did you install 2010 SP1?
ASKER
its when i test and execute the stored procedure. I havent put sp1 on as yet
ASKER
It works for some people but for others where the data is alot eg 3.5million lines it bombs out
Can you give me some idea of what you are working with (attach a .png screen shot)? I am guessing that you are using the database tools from the IDE...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you have time, I would suggest look at installing SP1 (on a testbed if possible), and that error should go away (if I understand your question correctly).
ASKER
Just didnt have time to try get it to work so broke it down and tried something else