Ice725 Posted November 29, 2004 Posted November 29, 2004 I have a C# class that handles all my database operations, I have methods to return DataSet, DataTable, Scalar, and Update or Deletes... based on the parameters and stored procedure name passed as arguments. Everything is worked fine. I am running a MDI program. In one of my child forms, I call my database class file to return me a datatable or dataset, but I keep getting an OutOfMemory exception. The datatable I'm trying to receive only has 4 rows, and 1 column... Any thoughts or ideas? Quote
Administrators PlausiblyDamp Posted November 29, 2004 Administrators Posted November 29, 2004 Any chance you could post the relevant code? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
*Experts* Nerseus Posted November 30, 2004 *Experts* Posted November 30, 2004 Any other details, such as what you've noticed or how soon the OOM occurs. For example, is it the first time you access the Database or after 30 minutes? If it's the first time, what's the query, XSD, and relevant code look like? Are there "special" features such as non-standard DB drivers, expression columns, etc. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Ice725 Posted December 1, 2004 Author Posted December 1, 2004 I managed to work around it by removing the ADO.NET code from my constructor into another method, which is called by the constructor. No idea why that would help anything, but it did ... I also found an error with my SqlParameter declaration. I send an array of SqlParameters to the database class, so maybe that generated the error. If I experience this problem again, I'll post... BTW, besides using task manager in windows, is there a way to view how much resources or memory your program takes up while running? Quote
*Gurus* Derek Stone Posted December 1, 2004 *Gurus* Posted December 1, 2004 BTW, besides using task manager in windows, is there a way to view how much resources or memory your program takes up while running? Purchase a .NET performance profiler. The Performance MMC plug-in is also of some help, once properly configured. Start | Run | "perfmon" Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.