fabyola
asked on
Insufficient Memory Error
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
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
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 ....
Has your DataSet assigned events as:
procedure TForm1.DataSetBeforeScroll
begin
//........
end;
or
procedure TForm1.DataSetAfterScroll(
begin
//........
end;
It is possible the reason about the "Insufficient Memory" to be there ....
Just try to guess ....
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
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
Ofcourse the reason for the "Insufficient Memory" could be outside your application: some spyware or some virus ....
ASKER
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.
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...
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...
ASKER
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 ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
DataSetBeforePost(DataSet:
or
DataSetAfterPost(DataSet: TDataSet);
It is possible the reason about the "Insufficient Memory" to be there ....
Just try to guess ....