I am using Delphi 5, SAP DI API for SAP 2004.
On a users machine, when we try to connect, we get an error "Access violation at 02271d4a in module observerdll.dll read address 00000000".
Anyone know why they could be getting this error? And what I need to do to fix it?
thanks
Bill
The problem is I have not been able to reproduce the problem on any of the machines in my office, this is only happening on a client machine. They have just the SAP client, and our program that uses the DI API.
I have instructed my client to search for that dll, and try to rename it, and rerun it. Not sure whether this will fix it or not.
Here is some example code I am using, I do not at this time know the exact point where the error is returning from, I assume from the Connect function.
function TtcSAP.Connect: string;
begin
// return empty on success
Result := '';
try
// make sure it was created
if not Assigned(oCompany) then
begin
Result := 'Error creating Company object.';
Exit;
end;
if oCompany.Connected then
oCompany.Disconnect;
// Specify the user name and password
oCompany.UserName := sUserName;
oCompany.Password := sPassword;
oCompany.DbUserName := sDbUserName;
oCompany.DbPassword := sDbPassword;
oCompany.UseTrusted := bUseTrusted;
// misc settins
oCompany.language := ln_English;
// Specify the Company database
oCompany.CompanyDB := sCompanyDB;
// specify the server
oCompany.Server := sServer;
// connect (0 = success)
if oCompany.Connect() <> 0 then
begin
Result := GetLastError;
if Trim(Result) = '' then
Result := 'Connection failed.';
end;
except
on E: Exception do
Result := E.Message;
end;
end;
Some more info..
The client did NOT find observerdll.dll on his machine. He does have the DI Server installed and running (not sure if that has anything to do with it).
They are running SBO 6.70.178, 2004A, SP: 00 PL: 09
Message was edited by: Bill Vanselow
Message was edited by: Bill Vanselow
Add a comment