aboutsummaryrefslogtreecommitdiff
path: root/odb/mssql/connection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/mssql/connection.cxx')
-rw-r--r--odb/mssql/connection.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/odb/mssql/connection.cxx b/odb/mssql/connection.cxx
index 3ba10ba..1609b80 100644
--- a/odb/mssql/connection.cxx
+++ b/odb/mssql/connection.cxx
@@ -25,8 +25,9 @@ namespace odb
connection (database_type& db)
: odb::connection (db),
db_ (db),
- state_ (state_disconnected)
+ state_ (state_disconnected),
// statement_cache_ (new statement_cache_type (*this))
+ long_buffer_ (0)
{
SQLRETURN r;
@@ -46,7 +47,7 @@ namespace odb
//
r = SQLSetConnectAttr (handle_,
SQL_ATTR_AUTOCOMMIT,
- SQL_AUTOCOMMIT_OFF,
+ (SQLPOINTER) SQL_AUTOCOMMIT_OFF,
0);
if (!SQL_SUCCEEDED (r))
@@ -55,6 +56,16 @@ namespace odb
//
translate_error (r, handle_, SQL_HANDLE_DBC);
+ // Enable Multiple Active Result Sets (MARS).
+ //
+ r = SQLSetConnectAttr (handle_,
+ SQL_COPT_SS_MARS_ENABLED,
+ (SQLPOINTER) SQL_MARS_ENABLED_YES,
+ SQL_IS_UINTEGER);
+
+ if (!SQL_SUCCEEDED (r))
+ translate_error (r, handle_, SQL_HANDLE_DBC);
+
// Connect.
//
{
@@ -84,8 +95,9 @@ namespace odb
: odb::connection (db),
db_ (db),
handle_ (handle),
- state_ (state_connected)
+ state_ (state_connected),
// statement_cache_ (new statement_cache_type (*this))
+ long_buffer_ (0)
{
}
@@ -109,8 +121,6 @@ namespace odb
unsigned long long connection::
execute (const char* s, std::size_t n)
{
- /*
- @@
{
odb::tracer* t;
if ((t = transaction_tracer ()) ||
@@ -121,7 +131,6 @@ namespace odb
t->execute (*this, str.c_str ());
}
}
- */
SQLRETURN r;