fix for trie index
[csql.git] / src / odbc / odbcEnv.h
blob8b45459f908673bd9b8b8da28da10dda052a880b
1 // Class CSqlOdbcEnv
2 // Description: Environment Handle manager.
4 #ifndef _ODBC_ENV_H_
5 #define _ODBC_ENV_H_
7 // State's of Environment Handle.
8 typedef enum
9 {
10 E0, // Environment in unallocated state. (DriverManager)
11 E1, // Allocated Environment , hdbc in unallocated state.
12 E2 // Allocated Environment , allocated hdbc.
13 } EnvState_t ;
15 class CSqlOdbcEnv
17 CSqlOdbcEnv(void); // Should not create obj without SQLAllocHandle
19 public:
20 // Top 2 variable declaration should not be moved down.
21 int handleType_; // Handle type.
22 CSqlOdbcError err_; // Last error info.
24 EnvState_t state_; // Environment State.
25 List dbcList_; // Connection handle list.
27 // Environment Attributes
28 SQLUINTEGER odbcVersion_;
30 // State Transition
31 // Check whether we can continue executing SQLxxxx API.
32 SQLRETURN chkStateForSQLFreeHandle( void );
33 SQLRETURN chkStateForSQLSetEnvAttr( void );
35 // ODBC API's
36 static SQLRETURN SQLAllocHandle(
37 SQLHANDLE inputHandle, // IN
38 SQLHANDLE *outputHandle ); // OUT
40 static SQLRETURN SQLFreeHandle(
41 SQLHANDLE inputHandle); // IN
43 SQLRETURN SQLEndTran(
44 SQLSMALLINT completionType);// IN
46 SQLRETURN SQLSetEnvAttr(
47 SQLINTEGER attribute, // IN
48 SQLPOINTER value, // IN
49 SQLINTEGER stringLength); // IN
51 SQLRETURN SQLGetEnvAttr(
52 SQLINTEGER attribute, // IN
53 SQLPOINTER value, // OUT
54 SQLINTEGER bufferLength, // IN
55 SQLINTEGER *stringLength); // OUT
57 // Other's
58 };
60 #endif // _ODBC_ENV_H_