Problem with c++ class CDatabase function GetConnect() - by Frekers

Status : 

  Duplicate<br /><br />
		This item appears to be a duplicate of another existing Connect or internal item.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 765395 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 9/29/2012 2:02:49 PM
Access Restriction Public


The funciton GetConnect() returns always empty string (connection to database is okay).

the function BOOL CDatabase::Connect(DWORD dwOptions) has changed (see below), the variable  m_strConnect is set to empty string:

DATA_BLOB connectBlob;
connectBlob.pbData = (BYTE *)(LPCTSTR)m_strConnect;
connectBlob.cbData = (DWORD)(AtlStrLen(m_strConnect) + 1) * sizeof(TCHAR);
	if (CryptProtectData(&connectBlob, NULL, NULL, NULL, NULL, 0, &m_blobConnect))
		SecureZeroMemory((BYTE *)(LPCTSTR)m_strConnect, m_strConnect.GetLength() * sizeof(TCHAR));

The functiont GetConnect() returns the variable m_strConnect, which is empty. In some cases I need the connection string in my application.
Sign in to post a comment.
Posted by Microsoft on 12/18/2012 at 11:01 AM

Thanks for the report. This issue has been fixed in MFC for the next major release of Visual Studio.

Pat Brenner
Visual C++ Libraries Development
Posted by Macy [MSFT] on 10/1/2012 at 12:47 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Macy [MSFT] on 9/30/2012 at 6:23 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(