1 #ifndef _SQLUCODE_H 2 #define _SQLUCODE_H 3 4 #include <sqlext.h> 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 #define SQL_WCHAR (-8) 9 #define SQL_WVARCHAR (-9) 10 #define SQL_WLONGVARCHAR (-10) 11 #define SQL_C_WCHAR SQL_WCHAR 12 #define SQL_SQLSTATE_SIZEW 10 13 #ifdef UNICODE 14 #define SQL_C_TCHAR SQL_C_WCHAR 15 #else 16 #define SQL_C_TCHAR SQL_C_CHAR 17 #endif 18 #ifndef RC_INVOKED 19 SQLRETURN SQL_API SQLBrowseConnectA(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); 20 SQLRETURN SQL_API SQLBrowseConnectW(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); 21 SQLRETURN SQL_API SQLColAttributeA(SQLHSTMT,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); 22 SQLRETURN SQL_API SQLColAttributeW(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); 23 SQLRETURN SQL_API SQLColAttributesA(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); 24 SQLRETURN SQL_API SQLColAttributesW(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); 25 SQLRETURN SQL_API SQLColumnPrivilegesA( SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLCHAR*,SQLSMALLINT ); 26 SQLRETURN SQL_API SQLColumnPrivilegesW( SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ); 27 SQLRETURN SQL_API SQLColumnsA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLCHAR*,SQLSMALLINT ); 28 SQLRETURN SQL_API SQLColumnsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ,SQLWCHAR*,SQLSMALLINT ); 29 SQLRETURN SQL_API SQLConnectA(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); 30 SQLRETURN SQL_API SQLConnectW(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); 31 SQLRETURN SQL_API SQLDataSourcesA(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); 32 SQLRETURN SQL_API SQLDataSourcesW(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); 33 SQLRETURN SQL_API SQLDescribeColA(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); 34 SQLRETURN SQL_API SQLDescribeColW(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); 35 SQLRETURN SQL_API SQLDriverConnectA(SQLHDBC,SQLHWND,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT); 36 SQLRETURN SQL_API SQLDriverConnectW(SQLHDBC,SQLHWND,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT); 37 SQLRETURN SQL_API SQLDriversA(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); 38 SQLRETURN SQL_API SQLDriversW(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); 39 SQLRETURN SQL_API SQLErrorA(SQLHENV,SQLHDBC,SQLHSTMT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); 40 SQLRETURN SQL_API SQLErrorW(SQLHENV,SQLHDBC,SQLHSTMT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); 41 SQLRETURN SQL_API SQLExecDirectA(SQLHSTMT,SQLCHAR*,SQLINTEGER); 42 SQLRETURN SQL_API SQLExecDirectW(SQLHSTMT,SQLWCHAR*,SQLINTEGER); 43 SQLRETURN SQL_API SQLForeignKeysA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); 44 SQLRETURN SQL_API SQLForeignKeysW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); 45 SQLRETURN SQL_API SQLGetConnectAttrA(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); 46 SQLRETURN SQL_API SQLGetConnectAttrW(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); 47 SQLRETURN SQL_API SQLGetConnectOptionA(SQLHDBC,SQLUSMALLINT,SQLPOINTER); 48 SQLRETURN SQL_API SQLGetConnectOptionW(SQLHDBC,SQLUSMALLINT,SQLPOINTER); 49 SQLRETURN SQL_API SQLGetCursorNameA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); 50 SQLRETURN SQL_API SQLGetCursorNameW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); 51 SQLRETURN SQL_API SQLGetInfoA(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); 52 SQLRETURN SQL_API SQLGetInfoW(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); 53 SQLRETURN SQL_API SQLGetTypeInfoA(SQLHSTMT,SQLSMALLINT); 54 SQLRETURN SQL_API SQLGetTypeInfoW(SQLHSTMT,SQLSMALLINT); 55 SQLRETURN SQL_API SQLNativeSqlA(SQLHDBC,SQLCHAR*,SQLINTEGER,SQLCHAR*,SQLINTEGER,SQLINTEGER*); 56 SQLRETURN SQL_API SQLNativeSqlW(SQLHDBC,SQLWCHAR*,SQLINTEGER,SQLWCHAR*,SQLINTEGER,SQLINTEGER*); 57 SQLRETURN SQL_API SQLPrepareA(SQLHSTMT,SQLCHAR*,SQLINTEGER); 58 SQLRETURN SQL_API SQLPrepareW(SQLHSTMT,SQLWCHAR*,SQLINTEGER); 59 SQLRETURN SQL_API SQLPrimaryKeysA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ); 60 SQLRETURN SQL_API SQLPrimaryKeysW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); 61 SQLRETURN SQL_API SQLProcedureColumnsA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); 62 SQLRETURN SQL_API SQLProcedureColumnsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); 63 SQLRETURN SQL_API SQLProceduresA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); 64 SQLRETURN SQL_API SQLProceduresW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); 65 SQLRETURN SQL_API SQLSetConnectAttrA(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER); 66 SQLRETURN SQL_API SQLSetConnectAttrW(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER); 67 SQLRETURN SQL_API SQLSetConnectOptionA(SQLHDBC,SQLUSMALLINT,SQLULEN); 68 SQLRETURN SQL_API SQLSetConnectOptionW(SQLHDBC,SQLUSMALLINT,SQLULEN); 69 SQLRETURN SQL_API SQLSetCursorNameA(SQLHSTMT,SQLCHAR*,SQLSMALLINT); 70 SQLRETURN SQL_API SQLSetCursorNameW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT); 71 SQLRETURN SQL_API SQLSpecialColumnsA(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT); 72 SQLRETURN SQL_API SQLSpecialColumnsW(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT); 73 SQLRETURN SQL_API SQLStatisticsA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT); 74 SQLRETURN SQL_API SQLStatisticsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT); 75 SQLRETURN SQL_API SQLTablePrivilegesA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); 76 SQLRETURN SQL_API SQLTablePrivilegesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ); 77 SQLRETURN SQL_API SQLTablesA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); 78 SQLRETURN SQL_API SQLTablesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); 79 #if (ODBCVER >= 0x0300) 80 SQLRETURN SQL_API SQLGetDescFieldA(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*); 81 SQLRETURN SQL_API SQLGetDescFieldW(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*); 82 SQLRETURN SQL_API SQLSetDescFieldA(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER); 83 SQLRETURN SQL_API SQLSetDescFieldW(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER); 84 SQLRETURN SQL_API SQLGetDescRecA(SQLHDESC,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*); 85 SQLRETURN SQL_API SQLGetDescRecW(SQLHDESC,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*); 86 SQLRETURN SQL_API SQLGetDiagFieldA(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); 87 SQLRETURN SQL_API SQLGetDiagFieldW(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); 88 SQLRETURN SQL_API SQLGetDiagRecA(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); 89 SQLRETURN SQL_API SQLGetDiagRecW(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); 90 SQLRETURN SQL_API SQLGetStmtAttrA(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); 91 SQLRETURN SQL_API SQLGetStmtAttrW(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); 92 SQLRETURN SQL_API SQLSetStmtAttrA(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER); 93 SQLRETURN SQL_API SQLSetStmtAttrW(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER); 94 #endif /* (ODBCVER >= 0x0300) */ 95 96 #if defined (UNICODE) && !defined (SQL_NOUNICODEMAP) 97 #define SQLBrowseConnect SQLBrowseConnectW 98 #define SQLColAttribute SQLColAttributeW 99 #define SQLColAttributes SQLColAttributesW 100 #define SQLColumnPrivileges SQLColumnPrivilegesW 101 #define SQLColumns SQLColumnsW 102 #define SQLConnect SQLConnectW 103 #define SQLDataSources SQLDataSourcesW 104 #define SQLDescribeCol SQLDescribeColW 105 #define SQLDriverConnect SQLDriverConnectW 106 #define SQLDrivers SQLDriversW 107 #define SQLError SQLErrorW 108 #define SQLExecDirect SQLExecDirectW 109 #define SQLForeignKeys SQLForeignKeysW 110 #define SQLGetConnectAttr SQLGetConnectAttrW 111 #define SQLGetConnectOption SQLGetConnectOptionW 112 #define SQLGetCursorName SQLGetCursorNameW 113 #define SQLGetDescField SQLGetDescFieldW 114 #define SQLGetDescRec SQLGetDescRecW 115 #define SQLGetDiagField SQLGetDiagFieldW 116 #define SQLGetDiagRec SQLGetDiagRecW 117 #define SQLGetInfo SQLGetInfoW 118 #define SQLGetStmtAttr SQLGetStmtAttrW 119 #define SQLGetTypeInfo SQLGetTypeInfoW 120 #define SQLNativeSql SQLNativeSqlW 121 #define SQLPrepare SQLPrepareW 122 #define SQLPrimaryKeys SQLPrimaryKeysW 123 #define SQLProcedureColumns SQLProcedureColumnsW 124 #define SQLProcedures SQLProceduresW 125 #define SQLSetConnectAttr SQLSetConnectAttrW 126 #define SQLSetConnectOption SQLSetConnectOptionW 127 #define SQLSetCursorName SQLSetCursorNameW 128 #define SQLSetDescField SQLSetDescFieldW 129 #define SQLSetStmtAttr SQLSetStmtAttrW 130 #define SQLSpecialColumns SQLSpecialColumnsW 131 #define SQLStatistics SQLStatisticsW 132 #define SQLTablePrivileges SQLTablePrivilegesW 133 #define SQLTables SQLTablesW 134 #endif /* UNICODE && ! SQL_NOUNICODEMAP */ 135 #endif /* RC_INVOKED */ 136 #ifdef __cplusplus 137 } 138 #endif /* __cplusplus*/ 139 #endif /* ndef _SQLUCODE_H */ 140