BDE "Invalid cursor handle"

My application is developped under Delphi 4 and use BDE tu connect to a MS
Sql Server 7.0.

Sometime i receive a strange "Invalid cursor handle" which will cause an
ENoResultSet exception. I have a TQuery which run a stored procedure that
return a result set. I think the problem is in BDE, but for the moment i con
not think to rewrite the application using ADO or something else. I can
avoid this error with this code, but i think this is not a solution....

var StillTry: Boolean;
....

              StillTry := True;
              NrRetry  := 5;
              while StillTry do
              try
                 Active := True;
                 StillTry := False;
              except
                 on E: ENoResultSet do begin
                   StillTry := True;
                   if NrRetry < 1 then
                      raise;
                   Dec(NrRetry);
                 end;
                 on E: Exception do
                   raise;
//                    raise Exception.Create('Error :
'+E.Message+#13#10+E.ClassName);
              end;

    If anybody know something about this please let me know !

Thanx in advance,
Bogdan Dragulin