src/Connection.cpp
branchv_0
changeset 37 3de41719d7eb
parent 36 91cb012d779a
child 38 a871779a4e3c
equal deleted inserted replaced
36:91cb012d779a 37:3de41719d7eb
    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) {