Re: Why all the connections?



Vitali Kalinin wrote:

> I meant that DbGo is just a wrapper around ADO and I am almost sure
> that if you will port yours test case to VB, you will get same
> results. Also I personally think that yours test case is good example
> of No-No technique with ADO.
>

I fully agree that the test case is not an example of good technique
but its the fastest way to show the problem :-) I have tried to use
VB/VS 2005 and can get that to work without getting all the connections.

I have done a lot of investigation and here are a few quotes from MS KB
articles:

- "Pooling will not be enabled if you call CoCreateInstance directly on
the CLSID of the data provider."

- "Do not use IDBInitialize::Uninitialize. Use IDBInitialize::Release
instead. If you call Uninitialize, the connection you were using will
be flushed from the pool. This is because the user can change the
properties of the connection after calling Uninitialize."

Looking at the following code in ADO.PAS Borland is not following these
"tips" and this is the problem I think....

//
*********************************************************************//
// Interface: IDBInitialize
// GUID: {0C733A8B-2A1C-11CE-ADE5-00AA0044773D}
//
*********************************************************************//
IDBInitialize = interface(IUnknown)
['{0C733A8B-2A1C-11CE-ADE5-00AA0044773D}']
function Initialize: HResult; stdcall;
function Uninitialize: HResult; stdcall;
end;

Anyway, thanks for your input. I do hope someone from Borland will have
the time to look at it eventually.

--
Lars Sondergaard
.



Relevant Pages

  • Re: C++ support for ADO
    ... TESTHR(pConn.CreateInstance(__uuidof(Connection))); ... In answer to your question I'm interested in ADO not the ADO.net. ... data classes for working with ADO/OLE DB. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.oledb)
  • Re: How to make the app run?????
    ... throwing an error if the connection never was opened, ... How can i tell if i'm using ADO as in VB or .Net ADO ?? ... First of all, it was not shown to my customer, I took it to a very nice ... How do you get in "installed" on client computer? ...
    (microsoft.public.dotnet.general)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.ado)