Solved

Insufficient Memory Error

Posted on 2004-09-24
9
380 Views
Last Modified: 2010-04-05
I have a place in my program in which I have an IBDataSet. I Have a routine in which goes until end of file. Like this:

while not DataSet.eof do
begin
 // I commented everything he was doing it here to see
 //if the error stops, but it didn´t.
DataSet.Next;
end;

So the only thing is doing is going through the Data. And when I try to do something else after this routine it gives give the error: "Insufficient Memory" What can it be ? Thanx
0
Comment
Question by:fabyola
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 12

Expert Comment

by:esoftbg
ID: 12147731
Have your DataSet assigned events as:
  DataSetBeforePost(DataSet: TDataSet);
or
  DataSetAfterPost(DataSet: TDataSet);
It is possible the reason about the "Insufficient Memory" to be there ....
Just try to guess ....
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 12149448
Please ignore my above comment (It was after midnight bulgarian time and I was very tired):

Has your DataSet assigned events as:
procedure TForm1.DataSetBeforeScroll(DataSet: TDataSet);
begin
//........
end;
or
procedure TForm1.DataSetAfterScroll(DataSet: TDataSet);
begin
//........
end;

It is possible the reason about the "Insufficient Memory" to be there ....
Just try to guess ....
0
 
LVL 5

Expert Comment

by:Voodooman
ID: 12149819
Hi - comment only

Just an idea - lots of data applications write temp files trasparently - is your temp directory full?

Or is your temp directory on a drive with only small free space?

Also - remember that Error Messages are not to be relied on - the message is just what the programmer thought would be most appropriate in the circumstance - the actual error could be something completely different!

Voodooman

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:esoftbg
ID: 12149845
Ofcourse the reason for the "Insufficient Memory" could be outside your application: some spyware or some virus ....
0
 

Author Comment

by:fabyola
ID: 12158881
No it´s not a spyware or some virus because it happens on any computer. And it´s not using a Temp directory. And it also doesn´t have nothing on afterscroll or beforescroll events.
0
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12160275
what is important to know is the Exception Type
Is it an EIBError? Or just an  EAccessViolation? That's important to get a point of start....
Then also note that if you've called TIBDataset.Prepare before the loop then you have to reset the satus calling Unprepare (releasing memory). But everything said depends on the status of the IBDataset...
0
 

Author Comment

by:fabyola
ID: 12198727
I was a simple error message. It wasn´t an "EIBError" neither an "EAccessViolation" error. I also didn´t call TIBDataset.prepare. I only did an TIBDataset.Open; before doing the loop. Can it be it´s beause it´s too much data ?
0
 
LVL 22

Assisted Solution

by:Ferruccio Accalai
Ferruccio Accalai earned 62 total points
ID: 12199049
Just doing scroll to EOF isn't a believable reason for such kind of error even if there are lot of datas. What about the object (if you are using it)? Are there some datacontrols llinked like grids or edits? Or some other dataset in Master-detail?
0
 
LVL 5

Accepted Solution

by:
Voodooman earned 63 total points
ID: 12199259

Hi

According to this http://www.better-office.com/Deutsch/Produkte/Borland/InterBase/InterBase_Community/InterBase_Com_Aktuell/InterBase_Com_Aktuell__minus__25_Jul__brO_1_brC_.htm

These IBX datasets have ememory allocation problems.

Take a look at the above it might help explain and has some suggestions.

Of course you could actually be running out of memory and then out of paging space.  Looping thru recs is one of the most inefficient things you can do with a recordset.  If you were actually paging to disk you would probably not even notice if you were looping thru the recs.

What are you doing in the loop (I hope you are not putting the recs into arrays for instance - I have seen this done) - are you doing anything that would diminish resources?

Voodooman
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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