Discussion:
Simultaneous dbexpress connections in main application and a dll to same database = strange error when closing main application.
(too old to reply)
Christian Holm
2008-02-03 18:48:04 UTC
Permalink
Hi

I have a strange problem using dbxexpress in a main application (delphi32)
and in a dll called from the main application - both have active connections
(seperate) to the same database. Everything seems to run ok until I close
the main application and it results in an exception "Invalid Pointer
Operation" it breaks in the dbx-code here:

destructor TDBXDynalinkDriver.Destroy;
begin
FMethodTable.FDBXBase_Close(FDriverHandle); << this line causes the
exception when the main application closes.
FDriverHandle := nil;
FreeAndNil(FMethodTable);
inherited Destroy;
end;


This is the case regardsless of which database I Connect to - can anybody
give me a clue?!? any help would be appreciated.

Regards Christian

PS: If I disconnect the SQLConnection in the main application before making
the call to the routine in the dll, the main application closes allright...
Christian Holm
2008-02-20 06:51:49 UTC
Permalink
A small update - FYI

This problem does NOT occur when I use the CodeGear MSSQL driver - only when
using CoreLabs's driver :-((

So I suspect that the problem is likely to be related with that driver....

Regards
Christian
Post by Christian Holm
Hi
I have a strange problem using dbxexpress in a main application (delphi32)
and in a dll called from the main application - both have active
connections (seperate) to the same database. Everything seems to run ok
until I close the main application and it results in an exception "Invalid
destructor TDBXDynalinkDriver.Destroy;
begin
FMethodTable.FDBXBase_Close(FDriverHandle); << this line causes the
exception when the main application closes.
FDriverHandle := nil;
FreeAndNil(FMethodTable);
inherited Destroy;
end;
This is the case regardsless of which database I Connect to - can anybody
give me a clue?!? any help would be appreciated.
Regards Christian
PS: If I disconnect the SQLConnection in the main application before
making the call to the routine in the dll, the main application closes
allright...
Loading...