Commit b5732b1c authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

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

parent 0b811eea
......@@ -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,
szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
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,
szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
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;
}
/*************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment