Quantcast
Channel: SQL Server Compact Forum
Viewing all articles
Browse latest Browse all 193

ADO c++ Memory Leak

$
0
0

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;
}


Viewing all articles
Browse latest Browse all 193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>