odbc32: Add winediag message when no drivers could be found.
This commit is contained in:
parent
0b811eeabf
commit
b5732b1c2e
|
@ -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;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
Loading…
Reference in New Issue