diff options
-rw-r--r-- | odb/mssql/error.cxx | 25 | ||||
-rw-r--r-- | odb/mssql/no-id-object-statements.hxx | 7 | ||||
-rw-r--r-- | odb/mssql/no-id-object-statements.txx | 10 | ||||
-rw-r--r-- | odb/mssql/statement.cxx | 4 |
4 files changed, 13 insertions, 33 deletions
diff --git a/odb/mssql/error.cxx b/odb/mssql/error.cxx index f947541..0c41d32 100644 --- a/odb/mssql/error.cxx +++ b/odb/mssql/error.cxx @@ -3,7 +3,6 @@ // license : ODB NCUEL; see accompanying LICENSE file #include <string> -#include <iostream> // @@ TMP #include <odb/mssql/mssql.hxx> #include <odb/mssql/error.hxx> @@ -224,30 +223,6 @@ namespace odb } e.append (native_code, sqlstate, msg); - - //@@ TMP - if (htype == SQL_HANDLE_STMT) - { - SQLLEN n; - r = SQLGetDiagField (htype, - h, - i, - SQL_DIAG_ROW_NUMBER, - &n, - 0, - 0); - - cerr << i << " " << sqlstate << " "; - - // check error - if (n == SQL_NO_ROW_NUMBER) - cerr << "not associated with any row" << endl; - else if (n == SQL_ROW_NUMBER_UNKNOWN) - cerr << "unable to determine row association" << endl; - else - cerr << "associated with " << n << endl; - } - } else e.append (0, "?????", "unable to extract information for this " diff --git a/odb/mssql/no-id-object-statements.hxx b/odb/mssql/no-id-object-statements.hxx index dc227f1..4ead693 100644 --- a/odb/mssql/no-id-object-statements.hxx +++ b/odb/mssql/no-id-object-statements.hxx @@ -49,9 +49,9 @@ namespace odb // Object image. // image_type& - image () + image (std::size_t i = 0) { - return image_; + return image_[i]; } // Insert binding. @@ -111,7 +111,8 @@ namespace odb no_id_object_statements& operator= (const no_id_object_statements&); private: - image_type image_; + image_type image_[object_traits::batch]; + SQLUSMALLINT status_[object_traits::batch]; // Select binding. // diff --git a/odb/mssql/no-id-object-statements.txx b/odb/mssql/no-id-object-statements.txx index 0d92686..65dc8e9 100644 --- a/odb/mssql/no-id-object-statements.txx +++ b/odb/mssql/no-id-object-statements.txx @@ -19,13 +19,17 @@ namespace odb no_id_object_statements (connection_type& conn) : statements_base (conn), select_image_binding_ (select_image_bind_, select_column_count), - insert_image_binding_ (insert_image_bind_, insert_column_count) + insert_image_binding_ (insert_image_bind_, + insert_column_count, + object_traits::batch, + sizeof (image_type), + status_) { - image_.version = 0; + image_[0].version = 0; select_image_version_ = 0; insert_image_version_ = 0; - select_image_binding_.change_callback = image_.change_callback (); + select_image_binding_.change_callback = image_[0].change_callback (); std::memset (insert_image_bind_, 0, sizeof (insert_image_bind_)); std::memset (select_image_bind_, 0, sizeof (select_image_bind_)); diff --git a/odb/mssql/statement.cxx b/odb/mssql/statement.cxx index 6136cf3..0dfee16 100644 --- a/odb/mssql/statement.cxx +++ b/odb/mssql/statement.cxx @@ -1350,8 +1350,6 @@ namespace odb { string s (sqlstate); - cerr << s << endl; - if (s == "23000") // Integrity contraint violation. cv = true; else if (s != "01000") // General warning. @@ -1471,10 +1469,12 @@ namespace odb // mex_->attempted (processed_); + /* cerr << "more [" << (i_) << "] " << status_[i_] << " " << SQL_SUCCEEDED (r) << endl; cerr << "more processed: " << processed_ << endl; + */ if (r == SQL_NO_DATA) { |