From c853481c254bcafeeca394faa9f4bb5205d4daa0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Jan 2012 16:12:11 +0200 Subject: Free direct statement before disconnecting --- odb/mssql/connection.cxx | 1 + odb/mssql/connection.hxx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/odb/mssql/connection.cxx b/odb/mssql/connection.cxx index 2f882c3..401d701 100644 --- a/odb/mssql/connection.cxx +++ b/odb/mssql/connection.cxx @@ -105,6 +105,7 @@ namespace odb // Deallocate prepared statements before we close the connection. // statement_cache_.reset (); + direct_stmt_.reset (); if (state_ != state_disconnected) SQLDisconnect (handle_); // Ignore any errors. diff --git a/odb/mssql/connection.hxx b/odb/mssql/connection.hxx index 73c00fd..f10aaae 100644 --- a/odb/mssql/connection.hxx +++ b/odb/mssql/connection.hxx @@ -128,8 +128,7 @@ namespace odb state_failed } state_; - // Statement handle for direct execution. It should be after the - // connection handle to be destroyed in the correct order. + // Statement handle for direct execution. // auto_handle direct_stmt_; -- cgit v1.1