Board index » delphi » ADO connection from Active Server Object app

ADO connection from Active Server Object app

Hi

I'm trying to make a webapplication using IIS 4.0, ASP and
Delphi 5. The ASP code calls a Delphi 5 ActiveX DLL and the DLL is
supposed to communicate with a database. The problem is that I'm not
able
to connect to the SQL Server 7 database from within my AxtiveX DLL.
The parts of the DLL that do not communicate with the database work just
as they should.

I built a test desktop application using the very same ADO components
and it
runs fine (even on the machine where IIS runs). I've seen references to
CoInitialize and CoUninitialize but that did not help either.

The question remains: How do I connect to a SQL Server 7 database
using Delphi 5 ADO components from within an Active Server Object
running under IIS 4?

BTW the errormessages I get is 'Access violation at address 01A14D5A in
module 'AspD.dll'. Read of address 00000050'

Regards,

Johan

 

Re:ADO connection from Active Server Object app


Well, it turned out to ba a SUE (Stupid User Error). I placed the ADO
components
in a DataModule but it did not occur to me that the module would not be
automatically created in a DLL as it happens in normal stand alone EXE.
Now I create the DataModule in the begin end block of the DLL and
everything seems to work.
Quote
Johan Sundstr?m wrote:
> The question remains: How do I connect to a SQL Server 7 database
> using Delphi 5 ADO components from within an Active Server Object
> running under IIS 4?

> BTW the errormessages I get is 'Access violation at address 01A14D5A in
> module 'AspD.dll'. Read of address 00000050'

> Regards,

> Johan

Other Threads