From a2f1af1a1d347a1f6ccf052b1d747ad84ff0679e Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 15 Apr 2015 18:05:07 +0000 Subject: [PATCH] [ODBC32] Sync with Wine Staging 1.7.37. CORE-9246 svn path=/trunk/; revision=67200 --- reactos/dll/win32/odbc32/proxyodbc.c | 29 ++++++++++++++++++++++------ reactos/media/doc/README.WINE | 2 +- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/reactos/dll/win32/odbc32/proxyodbc.c b/reactos/dll/win32/odbc32/proxyodbc.c index a386a62fac7..f0e0921ebd8 100644 --- a/reactos/dll/win32/odbc32/proxyodbc.c +++ b/reactos/dll/win32/odbc32/proxyodbc.c @@ -54,6 +54,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*); @@ -1919,11 +1920,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; } @@ -2652,11 +2661,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; } /************************************************************************* diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 71fb8881d61..7b0e18b9227 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -143,7 +143,7 @@ reactos/dll/win32/npptools # Synced to Wine-1.7.27 reactos/dll/win32/ntdsapi # Synced to WineStaging-1.7.37 reactos/dll/win32/ntprint # Synced to Wine-1.7.27 reactos/dll/win32/objsel # Synced to Wine-1.7.27 -reactos/dll/win32/odbc32 # Synced to Wine-1.7.27. Depends on port of Linux ODBC. +reactos/dll/win32/odbc32 # Synced to WineStaging-1.7.37. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to Wine-1.7.27 reactos/dll/win32/ole32 # Synced to WineStaging-1.7.37 reactos/dll/win32/oleacc # Synced to Wine-1.7.27