access violation in driver when used in a soap server

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Guest

access violation in driver when used in a soap server

Post by Guest » Tue 07 Feb 2006 10:04

Hello,

I develop a soap server (as an Apache module), and I have a problem when I try to use ms-sql.

The SQL statements performed in the fist SOAP call works fine,
but the program crash trying to execute a SQL statement in the
second SOAP call with the same connection.

I receive an access violation inside the dbx driver dll.

Each SQL has been tried separatly and works fine.
The same application running with Oracle works perfect.

Is there a specific problem using ms-sql from an apache module (dll)
(something with the threads, for example ?)

Thanks in advance for a response
Philippe Soupart
Ordiges S.A.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 07 Feb 2006 10:21

If you would like to use DbxSda in Windows service, console application or just at separate thread you need to call CoInitialize for each thread. Also remember to call CoUnInitialize on thread termination.

Post Reply