odbc32: Add winediag message when no drivers could be found.

This commit is contained in:
André Hentschel 2015-01-21 23:16:41 +01:00 committed by Alexandre Julliard
parent 0b811eeabf
commit b5732b1c2e
1 changed files with 23 additions and 6 deletions

View File

@ -49,6 +49,7 @@ static BOOL ODBC_LoadDriverManager(void);
static BOOL ODBC_LoadDMFunctions(void);
WINE_DEFAULT_DEBUG_CHANNEL(odbc);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
static SQLRETURN (*pSQLAllocConnect)(SQLHENV,SQLHDBC*);
static SQLRETURN (*pSQLAllocEnv)(SQLHENV*);
@ -1914,11 +1915,19 @@ SQLRETURN WINAPI SQLDrivers(
SQLSMALLINT cbDriverAttrMax,
SQLSMALLINT *pcbDriverAttr)
{
TRACE("\n");
SQLRETURN ret;
TRACE("direction=%d\n", fDirection);
if (!pSQLDrivers) return SQL_ERROR;
return pSQLDrivers(henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
ret = pSQLDrivers(henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
if (ret == SQL_NO_DATA && fDirection == SQL_FETCH_FIRST)
ERR_(winediag)("No ODBC drivers could be found. "
"Check the settings for your libodbc provider.\n");
return ret;
}
@ -2647,11 +2656,19 @@ SQLRETURN WINAPI SQLDriversW(
SQLSMALLINT cbDriverAttrMax,
SQLSMALLINT *pcbDriverAttr)
{
TRACE("\n");
SQLRETURN ret;
TRACE("direction=%d\n", fDirection);
if (!pSQLDriversW) return SQL_ERROR;
return pSQLDriversW(henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
ret = pSQLDriversW(henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
if (ret == SQL_NO_DATA && fDirection == SQL_FETCH_FIRST)
ERR_(winediag)("No ODBC drivers could be found. "
"Check the settings for your libodbc provider.\n");
return ret;
}
/*************************************************************************