Date: Tuesday, January 17, 2006 @ 16:01:45
  Author: marc
    Path: /cvsroot/carob/odbsequoia/src

Modified: stmt.cpp (1.7 -> 1.8) stmt.hpp (1.6 -> 1.7)

Implemented ODBCStatement::get_header_diag_fieldw(..., SQL_DIAG_ROW_COUNT,...)


----------+
 stmt.cpp |   24 ++++++++++++++++++++++++
 stmt.hpp |    8 +++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)


Index: odbsequoia/src/stmt.cpp
diff -u odbsequoia/src/stmt.cpp:1.7 odbsequoia/src/stmt.cpp:1.8
--- odbsequoia/src/stmt.cpp:1.7 Tue Jan 17 14:23:04 2006
+++ odbsequoia/src/stmt.cpp     Tue Jan 17 16:01:45 2006
@@ -78,6 +78,30 @@
 }
 
 
+SQLRETURN
+ODBCStatement::get_header_diag_fieldw(SQLSMALLINT DiagIdentifier,
+                                      SQLPOINTER DiagInfoPtr,
+                                      SQLSMALLINT BufferLength,
+                                      SQLSMALLINT * StringLengthPtr)
+    const
+{
+    // here we implement the DiagIdentifiers that are specific to statements
+    switch(DiagIdentifier) {
+    case SQL_DIAG_ROW_COUNT: // same thing as SQLRowCount above (the
+                             // spec says we should not live so long).
+        * (SQLLEN *) DiagInfoPtr = this->carob_stmt->getUpdateCount();
+        return SQL_SUCCESS;
+
+    // fall back on super class for common cases
+    default:
+        return ODBCItem::get_header_diag_fieldw(DiagIdentifier,
+                                                DiagInfoPtr,
+                                                BufferLength, StringLengthPtr);
+    }
+
+}
+
+
 
 /*
  * Local Variables:
Index: odbsequoia/src/stmt.hpp
diff -u odbsequoia/src/stmt.hpp:1.6 odbsequoia/src/stmt.hpp:1.7
--- odbsequoia/src/stmt.hpp:1.6 Tue Jan 17 14:23:04 2006
+++ odbsequoia/src/stmt.hpp     Tue Jan 17 16:01:45 2006
@@ -38,7 +38,13 @@
     ODBCStatement(const ODBCConnection& creator) : ODBCItem(creator)
     { state = S0; };
     SQLRETURN
-    ODBCStatement::exec_directw(const SQLWCHAR *StatementText, SQLINTEGER 
TextLength);
+    exec_directw(const SQLWCHAR *StatementText, SQLINTEGER TextLength);
+protected:
+    SQLRETURN
+    get_header_diag_fieldw(SQLSMALLINT DiagIdentifier,
+                           SQLPOINTER DiagInfoPtr,
+                           SQLSMALLINT BufferLength, SQLSMALLINT * 
StringLengthPtr)
+        const;
 };
 
 

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to