summaryrefslogtreecommitdiff
path: root/libodbcpp/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libodbcpp/connection.cpp')
-rw-r--r--libodbcpp/connection.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libodbcpp/connection.cpp b/libodbcpp/connection.cpp
index 087fc69..8619201 100644
--- a/libodbcpp/connection.cpp
+++ b/libodbcpp/connection.cpp
@@ -100,6 +100,15 @@ ODBC::Connection::~Connection()
}
}
+void
+ODBC::Connection::finish() const
+{
+ if (txDepth != 0) {
+ rollbackTx();
+ throw Error("Transaction still open");
+ }
+}
+
int
ODBC::Connection::beginTx() const
{