| 105 | SQLHSTMT ODBCTestBase::stmt = SQL_NULL_HSTMT; |
| 106 | |
| 107 | void ODBCTestBase::AllocEnvConnHandles(SQLHENV& env_handle, SQLHDBC& conn_handle, |
| 108 | SQLINTEGER odbc_ver) { |
| 109 | // Allocate an environment handle |
| 110 | ASSERT_EQ(SQL_SUCCESS, SQLAllocEnv(&env_handle)); |
| 111 | |
| 112 | ASSERT_EQ( |
| 113 | SQL_SUCCESS, |
| 114 | SQLSetEnvAttr(env_handle, SQL_ATTR_ODBC_VERSION, |
| 115 | reinterpret_cast<SQLPOINTER>(static_cast<intptr_t>(odbc_ver)), 0)); |
| 116 | |
| 117 | // Allocate a connection using alloc handle |
| 118 | ASSERT_EQ(SQL_SUCCESS, SQLAllocHandle(SQL_HANDLE_DBC, env_handle, &conn_handle)); |
| 119 | } |
| 120 | |
| 121 | void ODBCTestBase::Connect(std::string connect_str, SQLHENV& env_handle, |
| 122 | SQLHDBC& conn_handle, SQLINTEGER odbc_ver) { |
no test coverage detected