Forum Replies Created

Viewing 2 posts - 1 through 3 (of 3 total)

  • RE: SQLConnectDriver Memory Leak

    Sorry, this code is copy from two functions and I didn't change tha name hdbc to hdbc1 when I paste in the forum. But that isn't the problem, because in...

  • RE: SQLConnectDriver Memory Leak

    Example:

    ret = SQLAllocHandle (SQL_HANDLE_DBC, henv1, &hdbc1);

     if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO)

     {   

      if (ret == SQL_ERROR || ret == SQL_INVALID_HANDLE)

      {

       hdbc1=NULL;

       return FALSE;

      }

     } 

     sprintf (ConnStrIn,

       "DRIVER={SQL Server};SERVER=%s;UID=%s;PWD=%s;DATABASE=%s;",

       ServerName,

       UserName,

       Authentication,

       BDName);

     

     ret = SQLDriverConnect(hdbc1,      // Connection...

Viewing 2 posts - 1 through 3 (of 3 total)