SOCI Logo Get SOCI at SourceForge.net. Fast, secure and Free Open Source software downloads

ref-counted-statement.cpp

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
00003 // Distributed under the Boost Software License, Version 1.0.
00004 // (See accompanying file LICENSE_1_0.txt or copy at
00005 // http://www.boost.org/LICENSE_1_0.txt)
00006 //
00007 
00008 #define SOCI_SOURCE
00009 #include "ref-counted-statement.h"
00010 #include "session.h"
00011 
00012 using namespace soci;
00013 using namespace soci::details;
00014 
00015 void ref_counted_statement::final_action()
00016 {
00017     try
00018     {
00019         st_.alloc();
00020         st_.prepare(session_.get_query_stream().str(), st_one_time_query);
00021         st_.define_and_bind();
00022 
00023         const bool gotData = st_.execute(true);
00024         session_.set_got_data(gotData);
00025     }
00026     catch (...)
00027     {
00028         st_.clean_up();
00029         throw;
00030     }
00031 
00032     st_.clean_up();
00033 }
00034 
00035 std::ostringstream & ref_counted_statement_base::get_query_stream()
00036 {
00037     return session_.get_query_stream();
00038 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
SourceForge Logo

Generated on Sun Oct 3 2010 17:42:17 for EXTRAS-SOCI by Doxygen 1.7.1