Estack overflow error - ADO components - Delphi 6 indy & ADO components - win98 
Author Message
 Estack overflow error - ADO components - Delphi 6 indy & ADO components - win98

Hi

My client application was suffering from occasional 'list out of bounds'
errors. Even though there were no problems with any of the arrays being
used. However, I 'tidied up' some of the code involving the ADO components
and now I get 'estack overflow' on about approxamtly 30% of machines trying
to run my application. The machines are trying to access the database
simultanously.

All my routines involving database work now look like:
try ADOQuery.Close;
except showmessage('cannot close query');
end;
try ADOQuery.sql.clear;
except showmessage('cant clear');
end;
try ADOQuery.sql.add('select forename,surname where userName =?');
except showmessage('cant add');
end;
try ADOQuery.Parameters[0].value := user;
except showmessage('cant set parameters');
end;

However I still get crashes without any of the messages showing.

I have searched on the net and found some refernces to this error suggesting
that it could be an error in the ADO componets. and that changing the
application exception handler in the ADODB.dcu to:
    procedure ApplicationHandleException(Sender: TObject);
    begin
           // Assigned(Classes.ApplicationHandleException) then
           // ApplicationHandleException(Sender);
           // change made to original source 9/6/2001
          Application.HandleException(Sender);
    end;
may help.

Do people aggree? Do i change the ADODB.dcu by simply editing the ADODB.pas
file and building my application?

My app also has calls to functions to get station info(see below) and Indy
udp server component.

Thanks for any help given.

Dave

function getStationName:string;
var
stationName    : string;
stationNameLen : Dword;
begin
stationNameLen := 255;
  SetLength(stationName, stationNameLen);
  If GetComputerName(PChar(stationName), stationNameLen) Then
    Result := Copy(stationName,1,stationNameLen - 1)
  Else
    Result := 'Unknown';
End;

Function GetUserFromWindows: string;
Var
  UserName    : string;
  UserNameLen : Dword;
Begin
  form1.Text:='getting username';
  UserNameLen := 255;
  SetLength(userName, UserNameLen);
  If GetUserName(PChar(UserName), UserNameLen) Then
    Result := Copy(UserName,1,UserNameLen - 1)
  Else
    Result := 'Unknown';
End;



Thu, 15 Sep 2005 23:37:38 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB ADO component in Delphi ?

2. Component ADO!

3. ADO components and MS Access

4. Which DAO or ADO component

5. ADO Components

6. ADO et Report Component

7. Which ADO component to choose

8. Record locking with ADO Express, ADO 2.5 and Access 2000 .mdb files

9. Removing&recreating indexes (MS-SQL, Delphi 5, ADO)

10. Problem with ADO & ACCESS

11. ADO errors

12. Paradox Datenbanken aus Delphi 4 unter Delphi 5 mit ADO anbinden

 

 
Powered by phpBB® Forum Software