probably this thread is not only specific to Database...
I wrote a project where a SOAP Server called by a web interface runs some operations on a db and then answer to the client. I'm using Delphi 2007 and MSSQL.
I'm testing this project on windows XP and I try to deploy my SOAP Server either internally in IIS (like ISAPI dll or also like CGI exe) or like a winnt service.
In any case sometimes I have problems with db connection, I say "sometimes" because the error is not constant but occasional. The exception is exactly in the opening of db connection.
To open/close the db I use this simplecode (that I already used in many applications with no problems):
procedure TDataMod1.OpenDB;
begin
try
if not ADOConnection1.Connected then
begin
ADOConnection1.Open;
end;
except
on E:Exception do
begin
raise Exception.Create('Exception opening DB: '+E.Message)
end;
end;
end;
Mostly the eexception is an horrible "Access violation at address 01173E02 in module 'WebService.dll'. Read of address 00000058", otherwise also a strange "Operation is not allowed when the object is open" even if I tested the Connected value (I try also with ADOConnection1.State=[ADODB.stClosed].
When this error occurs then I receive many exceptions and it gets worse to the unavailability of SOAP Server.
A particular feature is that making some tests on Windows 2003 (so IIS 6) it is more stable and there are no errors connecting to the db.
Could you give me any advice on this problem?
And also a hint: : which is the best provider to connect toMSSQL? SQL Native Client or OLE DB Provider?
Thanks Bye