FreeTDS API: src/odbc/error_export.h Source File

FreeTDS API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
error_export.h
1 #undef tdsdump_log
2
3 #ifdef ENABLE_ODBC_WIDE
4 static SQLRETURN _SQLGetDiagRec(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, ODBC_CHAR * szSqlStat, SQLINTEGER * pfNativeError, ODBC_CHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg, int wide);
5 SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDiagRec(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLCHAR * szSqlStat, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg) {
6 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDiagRec(%d, %p, %d, %p, %p, %p, %d, %p)\n", (int) handleType, handle, (int) numRecord, szSqlStat, pfNativeError, szErrorMsg, (int) cbErrorMsgMax, pcbErrorMsg);
7 return _SQLGetDiagRec(handleType, handle, numRecord, (ODBC_CHAR*) szSqlStat, pfNativeError, (ODBC_CHAR*) szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 0);
8 }
9 SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDiagRecW(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLWCHAR * szSqlStat, SQLINTEGER * pfNativeError, SQLWCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg) {
10 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDiagRecW(%d, %p, %d, %p, %p, %p, %d, %p)\n", (int) handleType, handle, (int) numRecord, szSqlStat, pfNativeError, szErrorMsg, (int) cbErrorMsgMax, pcbErrorMsg);
11 return _SQLGetDiagRec(handleType, handle, numRecord, (ODBC_CHAR*) szSqlStat, pfNativeError, (ODBC_CHAR*) szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 1);
12 }
13 #else
14 SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDiagRec(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLCHAR * szSqlStat, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg) {
15 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDiagRec(%d, %p, %d, %p, %p, %p, %d, %p)\n", (int) handleType, handle, (int) numRecord, szSqlStat, pfNativeError, szErrorMsg, (int) cbErrorMsgMax, pcbErrorMsg);
16 return _SQLGetDiagRec(handleType, handle, numRecord, szSqlStat, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg);
17 }
18 #endif
19
20 #ifdef ENABLE_ODBC_WIDE
21 static SQLRETURN _SQLError(SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, ODBC_CHAR * szSqlStat, SQLINTEGER * pfNativeError, ODBC_CHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg, int wide);
22 SQLRETURN ODBC_PUBLIC ODBC_API SQLError(SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR * szSqlStat, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg) {
23 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLError(%p, %p, %p, %p, %p, %p, %d, %p)\n", henv, hdbc, hstmt, szSqlStat, pfNativeError, szErrorMsg, (int) cbErrorMsgMax, pcbErrorMsg);
24 return _SQLError(henv, hdbc, hstmt, (ODBC_CHAR*) szSqlStat, pfNativeError, (ODBC_CHAR*) szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 0);
25 }
26 SQLRETURN ODBC_PUBLIC ODBC_API SQLErrorW(SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLWCHAR * szSqlStat, SQLINTEGER * pfNativeError, SQLWCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg) {
27 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLErrorW(%p, %p, %p, %p, %p, %p, %d, %p)\n", henv, hdbc, hstmt, szSqlStat, pfNativeError, szErrorMsg, (int) cbErrorMsgMax, pcbErrorMsg);
28 return _SQLError(henv, hdbc, hstmt, (ODBC_CHAR*) szSqlStat, pfNativeError, (ODBC_CHAR*) szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 1);
29 }
30 #else
31 SQLRETURN ODBC_PUBLIC ODBC_API SQLError(SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR * szSqlStat, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT FAR* pcbErrorMsg) {
32 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLError(%p, %p, %p, %p, %p, %p, %d, %p)\n", henv, hdbc, hstmt, szSqlStat, pfNativeError, szErrorMsg, (int) cbErrorMsgMax, pcbErrorMsg);
33 return _SQLError(henv, hdbc, hstmt, szSqlStat, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg);
34 }
35 #endif
36
37 #ifdef ENABLE_ODBC_WIDE
38 static SQLRETURN _SQLGetDiagField(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLSMALLINT diagIdentifier, SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT * pcbBuffer, int wide);
39 SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDiagField(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLSMALLINT diagIdentifier, SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT * pcbBuffer) {
40 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDiagField(%d, %p, %d, %d, %p, %d, %p)\n", (int) handleType, handle, (int) numRecord, (int) diagIdentifier, buffer, (int) cbBuffer, pcbBuffer);
41 return _SQLGetDiagField(handleType, handle, numRecord, diagIdentifier, buffer, cbBuffer, pcbBuffer, 0);
42 }
43 SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDiagFieldW(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLSMALLINT diagIdentifier, SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT * pcbBuffer) {
44 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDiagFieldW(%d, %p, %d, %d, %p, %d, %p)\n", (int) handleType, handle, (int) numRecord, (int) diagIdentifier, buffer, (int) cbBuffer, pcbBuffer);
45 return _SQLGetDiagField(handleType, handle, numRecord, diagIdentifier, buffer, cbBuffer, pcbBuffer, 1);
46 }
47 #else
48 SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDiagField(SQLSMALLINT handleType, SQLHANDLE handle, SQLSMALLINT numRecord, SQLSMALLINT diagIdentifier, SQLPOINTER buffer, SQLSMALLINT cbBuffer, SQLSMALLINT * pcbBuffer) {
49 TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDiagField(%d, %p, %d, %d, %p, %d, %p)\n", (int) handleType, handle, (int) numRecord, (int) diagIdentifier, buffer, (int) cbBuffer, pcbBuffer);
50 return _SQLGetDiagField(handleType, handle, numRecord, diagIdentifier, buffer, cbBuffer, pcbBuffer);
51 }
52 #endif
53
54 #define tdsdump_log TDSDUMP_LOG_FAST