I am using ADO (c++) to insert records into a SQL CE database. Compiling on Windows XP. When I comment out the "Execute" call, the memory leak goes away. The same code running on Win7 (using msado60.tlb) has no problem.
#import "msado15.DLL" no_namespace rename("EOF", "EndOfFile")
.
.
.
HRESULT hr;
_ConnectionPtr pConn = NULL;
IGlobalInterfaceTable *igt;
DWORD dwConnectionCookie;
.
.
.
//I use only ONE connection for the life of the program...
hr = igt->GetInterfaceFromGlobal(dwConnectionCookie, __uuidof(_Connection), (void **) &pConn);
if( hr == S_OK )
{
pConn->Execute((_bstr_t)(session.sSqlStatement),NULL, adExecuteNoRecords);
pConn.Release();
pConn = NULL;
}