ISAPI -> ADO -> MSSQL - IIS and other web servers diff
Posted: 14.03.2006, 15:52
Hi,
I have strange problem. I ported the ISAPI module from BDE to ZEOS and connecting to MSSQL via ADO or dbLib. The strange thing about ADO is that it works ok with IIS but fails with AV on other web servers (i.e. Sambar, WebWeaver).
The problem occurs in:
The call stack is as follows:
TZAdoConnection.Create() -> CoConnection.Create -> TZAdoConnection.Destroy -> TZAdoConnection.Close
Can somebody suggest why this happens - I'm new to ZEOS and would be thankfull if I could avoid digging deep into the code and understanding how ADO works, etc...
BTW: the dbLib connection works always OK - no matter what server.
Thanks in advance,
Tomasz
I have strange problem. I ported the ISAPI module from BDE to ZEOS and connecting to MSSQL via ADO or dbLib. The strange thing about ADO is that it works ok with IIS but fails with AV on other web servers (i.e. Sambar, WebWeaver).
The problem occurs in:
Code: Select all
procedure TZAdoConnection.Close;
var
LogMessage: string;
begin
if Closed then Exit;
SetAutoCommit(True);
LogMessage := Format('CLOSE CONNECTION TO "%s"', [Database]);
try
if FAdoConnection.State = adStateOpen then <<< FAdoConnection is null here!!! >>>
FAdoConnection.Close;
DriverManager.LogMessage(lcExecute, FPLainDriver.GetProtocol, LogMessage);
except
on E: Exception do
begin
DriverManager.LogError(lcExecute, FPlainDriver.GetProtocol, LogMessage, 0, E.Message);
raise;
end;
end;
inherited;
end;
TZAdoConnection.Create() -> CoConnection.Create -> TZAdoConnection.Destroy -> TZAdoConnection.Close
Can somebody suggest why this happens - I'm new to ZEOS and would be thankfull if I could avoid digging deep into the code and understanding how ADO works, etc...
BTW: the dbLib connection works always OK - no matter what server.
Thanks in advance,
Tomasz