--- "Koetter, Thomas Theodor" <[EMAIL PROTECTED]> wrote:
> Hi Jeff,
>
> > -----Original Message-----
[...]
> > Finally, it always claims that I've leaked the SQLHENV and
> > the SQLHDBC.
>
> This Purify does not report. I used the driver manager 3.520.9030.0
> which should be part of the current MDAC 2.7. Do you have the same?
The "Product Version" of my odbc32.dll is 3.520.6019.0 - I'm not sure
how to check the overall MDAC version, but I will try installing MDAC
2.7 and see if I get different results.
> Of course there still might be (or shall I say: are) bugs
> and maybe resource leaks in the ODBC driver. If you think that you
> have found one, please try to exhibit the leak by a small program
> for bug fixing.
I did attach a program to the original post. Even if some of the other
"leaks" are not problems, I can't explain away the 5-handle leak I get
every time I execute the program, which I will re-attach below:
#include "stdafx.h"
int main(int argc,char* argv[])
{
SQLRETURN nResult;
SQLHENV hEnvHandle;
SQLHDBC hDBHandle;
nResult = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE,
&hEnvHandle);
nResult = SQLSetEnvAttr(hEnvHandle, SQL_ATTR_ODBC_VERSION,
(SQLPOINTER) SQL_OV_ODBC3, SQL_IS_INTEGER);
nResult = SQLAllocHandle(SQL_HANDLE_DBC, hEnvHandle, &hDBHandle);
SQLSMALLINT ConnInSize;
SQLUSMALLINT DriverCompInd;
SQLCHAR ConnOut[1500];
SQLSMALLINT ConnOutMaxSize;
SQLSMALLINT ConnOutSize;
SQLHWND WinHandle;
char szConnect[2048];
strcpy(szConnect, "DRIVER={SAP
DB};SERVERNODE=localhost;SERVERDB=lddtest;UID=lexadmin;PWD=lexadmin;OPTION=3");
ConnInSize = strlen(szConnect);
DriverCompInd = SQL_DRIVER_NOPROMPT;
ConnOutSize = 0;
ConnOutMaxSize = 0;
WinHandle = NULL;
nResult = SQLDriverConnect(hDBHandle,
WinHandle,
(SQLCHAR*)szConnect,
ConnInSize,
ConnOut,
ConnOutMaxSize,
&ConnOutSize,
DriverCompInd);
nResult= SQLDisconnect(hDBHandle);
nResult = SQLFreeHandle(SQL_HANDLE_DBC, hDBHandle);
nResult = SQLFreeHandle(SQL_HANDLE_ENV, hEnvHandle);
return(0);
}
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general