SQLDriverConnect() gives "user breakpoint" and no more help
- From: "Jo" <JoJoTwilligo@xxxxxxxxxxx>
- Date: 16 May 2005 08:41:05 -0700
I'm having a hard time getting this SDK's ODBC library to work for me.
I've been following the guide in the MSDN, but whenever I call
SQLDriverConnect(), I can select the machine source (in this case, it
uses the MySQL Connector/ODBC) then ok the login screen, and get a
"user breakpoint" before the function can return. That's not much help,
and I'm not aware of any exceptions I can trap. Here's my code:
SQLHDBC m_sqlconnection;
SQLHENV m_sqlenv;
....
SQLRETURN nReturn = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE,
&m_sqlenv);
assert(nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO);
nReturn = SQLSetEnvAttr(m_sqlenv, SQL_ATTR_ODBC_VERSION,
(SQLPOINTER)SQL_OV_ODBC3, 0);
assert(nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO);
nReturn = SQLAllocHandle(SQL_HANDLE_DBC, m_sqlenv, &m_sqlconnection);
assert(nReturn == SQL_SUCCESS || nReturn == SQL_SUCCESS_WITH_INFO);
SQLCHAR lpszStringOut[1024];
SQLSMALLINT nOutSize;
nReturn = SQLDriverConnect(m_sqlconnection, m_hWnd, (SQLCHAR *)"", 0,
lpszStringOut, 1024, &nOutSize, SQL_DRIVER_PROMPT);
Did I forget anything?
.
- Follow-Ups:
- Prev by Date: Re: CWinThread::m_bAutoDelete
- Next by Date: Re: CSliderCtrl selection not highlighted under XP
- Previous by thread: CSliderCtrl selection not highlighted under XP
- Next by thread: Re: SQLDriverConnect() gives "user breakpoint" and no more help
- Index(es):
Relevant Pages
|
Loading