diff options
author | randomdan <randomdan@localhost> | 2011-02-17 20:42:53 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-17 20:42:53 +0000 |
commit | e960e424ae4b8e5a9387760c2d2e5475167b18d8 (patch) | |
tree | 2be0e276c10f95b04edbf975b076afeec848313e /libodbcpp/connection.cpp | |
parent | Fix the case when a bound buffer is too small and it's reported as success wi... (diff) | |
download | libdbpp-odbc-e960e424ae4b8e5a9387760c2d2e5475167b18d8.tar.bz2 libdbpp-odbc-e960e424ae4b8e5a9387760c2d2e5475167b18d8.tar.xz libdbpp-odbc-e960e424ae4b8e5a9387760c2d2e5475167b18d8.zip |
Add check function for when a connection is finished with, but you don't want to close it
Use prepared statements only for modifications, use fetch instead for selects (doesn't load an entire record set)
Support varchar oid
Diffstat (limited to 'libodbcpp/connection.cpp')
-rw-r--r-- | libodbcpp/connection.cpp | 9 |
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 { |