Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • *Experts*
Posted

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

"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
Posted

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?

  • *Gurus*
Posted
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"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...