Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

System.OutOfMemoryException When Running a Query

Posted on 2011-04-28
7
Medium Priority
?
846 Views
Last Modified: 2013-12-23
I get a System.OutOfMemoryException 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

Open in new window

0
Comment
Question by:wolivier69
  • 4
  • 3
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35488653
When are you getting that exception?  Is this a run-time exception?  Did you install 2010 SP1?
0
 

Author Comment

by:wolivier69
ID: 35489293
its when i test and execute the stored procedure. I havent put sp1 on as yet
0
 

Author Comment

by:wolivier69
ID: 35489493
It works for some people but for others where the data is alot eg 3.5million lines it bombs out
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 35492233
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...
0
 

Accepted Solution

by:
wolivier69 earned 0 total points
ID: 35689627
decided to get the info out in a different way as what had took too much time
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35690556
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).
0
 

Author Closing Comment

by:wolivier69
ID: 35718365
Just didnt have time to try get it to work so broke it down and tried something else
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question