Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Could you post the code that is causing this problem? Much easier than people guessing as to the problem.

I wish I could. It's just that I can't find the exact cause of why the exception occured. I don't have a clue why the exception occured, that's why I'm asking in a general manner.

 

So, anything to share? :D

Amir Syafrudin
Posted
Does it not crash on a particular line? Or in a particular routine? If you step through the code in a debugger does that not help you identify the problem?

Also are you allocating any large arrays? Or using unmanaged resources?

Oh yea, I just remembered. It has something to do about a query ... and I left my code at my office :D.

 

Well, when a friend :D fixed it, he just fixed the query. He only adds an alias to one of the columnName for the select query. Then abracadabra, the exception is taken care of. But I don't think he really knows why exactly the System.OutOfMemoryException occured.

 

Actually, I'm trying to find out the exact reason why that kind of exception occured. Eventhough my program now works fine (thx to my friend that is :D), I still want to know what's behind the flaw.

 

That's all I can tell you :D.

Amir Syafrudin
Posted

The code ...

 

Well, since my office is not connected to the internet :D, this is a part of the code that I remembered.

 

The exception occured at the second line of the code below.

 

form = new Form1
form.Show()

 

So, I guess the source would be inside the Load event of Form1. Then the debugging continues inside the Form1_Load(bla .. bla ..). The error occured when I'm trying to retrieve a Dataset through a WebService.

 

ds = service.getData(param1)

 

ds is a Dataset.

service is an instance of the WebService I mentioned above.

 

The function getData was supposed to query some data from the database. But I can't post the query yet. Maybe tomorrow.

 

Thx for the help. I'll be back with more code :).

Amir Syafrudin

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...