QueryInterface for interface Borland.Vcl.IMalloc failed
Posted: Fri 22 Sep 2006 06:39
Hi
I am getting the above error when running SDAC (VCL.NET) within a .NET Web Service (using Cassini Web Server). It is working correctly when only a single client call is established, but when a second concurrent call occurs, the error appears.
It is happening when attempting to open a new connection when one is already open. If I wait until it has finished, there is no problem..
As you can see from the stack trace below, I have encapsulated the call into a thread in order to apply the STA Apartment State (this cannot be applied to the service itself, thus I fork a new 'worker' thread to perform the work.
Can you please advise what this issue means, and what the solution might be.
Thanks
Ben Laan
--
Version: SDAC 3.70.3.29 for Delphi 2005.
CoreLab.Sdac, Version 3.70.3.3029
CoreLab.Dac, Version 5.70.1.3033
--
at CoreLab.Sdac.Units.OLEDBIntf.CoGetMalloc(Int32 dwMemContext, IMalloc& malloc)
at CoreLab.Sdac.TOLEDBConnection..ctor()
at CoreLab.Sdac.TMSConnection.GetOLEDBConnection()
at CoreLab.Sdac.TMSConnection.CreateIConnection()
at CoreLab.Dac.TCustomDAConnection.DoConnect()
at CoreLab.Dac.TCustomDAConnection.PerformConnect(Boolean Retry)
at CoreLab.Dac.TCustomDAConnection.SetConnected(Boolean Value)
at Borland.Vcl.TCustomConnection.Open()
at HSL.HAMBS.TSingleThreadedApartmentProcess.ThreadExecute() in ..\..\..\STACompartmentModel.pas:line 88
I am getting the above error when running SDAC (VCL.NET) within a .NET Web Service (using Cassini Web Server). It is working correctly when only a single client call is established, but when a second concurrent call occurs, the error appears.
It is happening when attempting to open a new connection when one is already open. If I wait until it has finished, there is no problem..
As you can see from the stack trace below, I have encapsulated the call into a thread in order to apply the STA Apartment State (this cannot be applied to the service itself, thus I fork a new 'worker' thread to perform the work.
Can you please advise what this issue means, and what the solution might be.
Thanks
Ben Laan
--
Version: SDAC 3.70.3.29 for Delphi 2005.
CoreLab.Sdac, Version 3.70.3.3029
CoreLab.Dac, Version 5.70.1.3033
--
at CoreLab.Sdac.Units.OLEDBIntf.CoGetMalloc(Int32 dwMemContext, IMalloc& malloc)
at CoreLab.Sdac.TOLEDBConnection..ctor()
at CoreLab.Sdac.TMSConnection.GetOLEDBConnection()
at CoreLab.Sdac.TMSConnection.CreateIConnection()
at CoreLab.Dac.TCustomDAConnection.DoConnect()
at CoreLab.Dac.TCustomDAConnection.PerformConnect(Boolean Retry)
at CoreLab.Dac.TCustomDAConnection.SetConnected(Boolean Value)
at Borland.Vcl.TCustomConnection.Open()
at HSL.HAMBS.TSingleThreadedApartmentProcess.ThreadExecute() in ..\..\..\STACompartmentModel.pas:line 88