469,592 Members | 1,801 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

Memory leak with Dataset?

Hello all,

There is a message below 'Application Error... When querying data'.

What appears to be happening is that when I perform a lot of queries in
a row and bring back the information into a DataSet, the application will
crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the error
states...

Any ideas what could be happening or do I need to post the code? There is a
bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller
Nov 15 '05 #1
6 2233
It appears that, for some reason, I am running out of memory.... That is
just a guess. The problem happens more frequently when I am trying to do
multiple things at once. If I leave the application alone, it runs fine.
Don't know if this helps the analysis, but thought I mention it....

Andrew Mueller
"Andrew Mueller" <am******@instechnet.com> wrote in message
news:u$*************@tk2msftngp13.phx.gbl...
Hello all,

There is a message below 'Application Error... When querying data'.

What appears to be happening is that when I perform a lot of queries in a row and bring back the information into a DataSet, the application will
crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the error states...

Any ideas what could be happening or do I need to post the code? There is a bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller

Nov 15 '05 #2
More tests....

I ran performance monitor on memory and there was plenty left.... The
application continues to crash now whether or not I am running another
application. It appears that after it crashes one time, it is more apt to
do it again. Does garbage collection work properly? Is there some portion
of my RAM which is now somewhat corrupt (in memory)? I cannot explain why
it would do this.

It ran fine 10 times before I tried loading other applications. Once I
did this, it crashed. Once it crashed, it continued to crash each time I
ran the program.

It crashes during the portion where it retrieves information from OLEDB
and brings back a calculated value. That is the only thing that is
happening at the time.

Andrew Mueller

"Andrew Mueller" <am******@instechnet.com> wrote in message
news:u$*************@tk2msftngp13.phx.gbl...
Hello all,

There is a message below 'Application Error... When querying data'.

What appears to be happening is that when I perform a lot of queries in a row and bring back the information into a DataSet, the application will
crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the error states...

Any ideas what could be happening or do I need to post the code? There is a bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller

Nov 15 '05 #3
The error DEFINITELY happens when:

I set focus to another application. Whether that be Exporer, or
anything else, that is when it will crash for sure. No amount of error
trapping appears to catch the error.

Andrew Mueller

"Andrew Mueller" <am******@instechnet.com> wrote in message
news:u$*************@tk2msftngp13.phx.gbl...
Hello all,

There is a message below 'Application Error... When querying data'.

What appears to be happening is that when I perform a lot of queries in a row and bring back the information into a DataSet, the application will
crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the error states...

Any ideas what could be happening or do I need to post the code? There is a bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller

Nov 15 '05 #4
Can anyone verify a possible problem??

I belive that if I create new OleDbDataAdapter objects often, I get the
error that I am seeing. It only happens occassionally, though. Mainly, as
I mentioned before, when I am focusing on other applications.

Thanks in advance,

Andrew Mueller

PS - At this point, it seems to have helped that I only create one
connection and change the Select statement only. This is a change because I
added to the Method within the class so that all the data iteration is done
within the class (as opposed to in the Call)
"Andrew Mueller" <am******@instechnet.com> wrote in message
news:u$*************@tk2msftngp13.phx.gbl...
Hello all,

There is a message below 'Application Error... When querying data'.

What appears to be happening is that when I perform a lot of queries in a row and bring back the information into a DataSet, the application will
crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the error states...

Any ideas what could be happening or do I need to post the code? There is a bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller

Nov 15 '05 #5
Try trapping the Application.ThreadException event. It will give you any
exception that WindowsForms catches in its code. It might be a genuine bug,
but without more information it will be impossible to tell.
--
Justin Rogers
DigiTec Web Consultants, LLC.

"Andrew Mueller" <am******@ins3.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
The error DEFINITELY happens when:

I set focus to another application. Whether that be Exporer, or
anything else, that is when it will crash for sure. No amount of error
trapping appears to catch the error.

Andrew Mueller

"Andrew Mueller" <am******@instechnet.com> wrote in message
news:u$*************@tk2msftngp13.phx.gbl...
Hello all,

There is a message below 'Application Error... When querying data'.

What appears to be happening is that when I perform a lot of queries in
a row and bring back the information into a DataSet, the application will crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the

error
states...

Any ideas what could be happening or do I need to post the code? There

is a
bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller


Nov 15 '05 #6
I know this sounds stupid.... But, I am a novice, and I am unsure how to do
this with a service application.

It seems there are a bunch of examples on the web for Windows Forms
applications, but none for services. Can you point me in the right
direction??

Thanks in advance,

Andrew Mueller

"Justin Rogers" <Ju****@games4dotnet.com> wrote in message
news:uQ**************@tk2msftngp13.phx.gbl...
Try trapping the Application.ThreadException event. It will give you any
exception that WindowsForms catches in its code. It might be a genuine bug, but without more information it will be impossible to tell.
--
Justin Rogers
DigiTec Web Consultants, LLC.

"Andrew Mueller" <am******@ins3.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
The error DEFINITELY happens when:

I set focus to another application. Whether that be Exporer, or
anything else, that is when it will crash for sure. No amount of error
trapping appears to catch the error.

Andrew Mueller

"Andrew Mueller" <am******@instechnet.com> wrote in message
news:u$*************@tk2msftngp13.phx.gbl...
Hello all,

There is a message below 'Application Error... When querying data'.
What appears to be happening is that when I perform a lot of
queries
in
a row and bring back the information into a DataSet, the application
will crash. It will not crash every time, though.

It has a problem writing to certain memory locations, is what the

error
states...

Any ideas what could be happening or do I need to post the code?

There is
a
bit of code, so I did not want to post it right away.

Thanks in advance!!

Andrew Mueller



Nov 15 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kim Petersen | last post: by
8 posts views Thread by ranjeet.gupta | last post: by
13 posts views Thread by Nikolay Petrov | last post: by
3 posts views Thread by Emmanuel Gehin | last post: by
23 posts views Thread by James | last post: by
18 posts views Thread by diffuser78 | last post: by
5 posts views Thread by Frank Rizzo | last post: by
11 posts views Thread by Aleks Kleyn | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.