equal
deleted
inserted
replaced
32 // TODO: transaction control |
32 // TODO: transaction control |
33 } |
33 } |
34 |
34 |
35 Connection::~Connection() { |
35 Connection::~Connection() { |
36 SQLRETURN result = SQLDisconnect(connection); |
36 SQLRETURN result = SQLDisconnect(connection); |
37 // FIXME: nevyhazovat výjimky z destruktorů |
37 // FIXME: do not throw exception from destructor |
38 if (OdbcCommon::isNotSuccessful(result)) throw SqlException(L"Unable to disconnect: " + std::to_wstring(result)); |
38 if (OdbcCommon::isNotSuccessful(result)) throw SqlException(L"Unable to disconnect: " + std::to_wstring(result)); |
39 OdbcCommon::freeHandle(SQL_HANDLE_DBC, connection); |
39 OdbcCommon::freeHandle(SQL_HANDLE_DBC, connection); |
40 } |
40 } |
41 |
41 |
42 PreparedStatement* Connection::prepareStatement(relpipe::reader::string_t sql) { |
42 PreparedStatement* Connection::prepareStatement(relpipe::reader::string_t sql) { |