Date: Monday, March 20, 2006 @ 22:02:42
  Author: marc
    Path: /cvsroot/carob/odbsequoia/src

Modified: stmt.cpp (1.21 -> 1.22) stmt.hpp (1.16 -> 1.17)

Implemented SQLCloseCursor() skeleton (just changing the state for now).


----------+
 stmt.cpp |   25 +++++++++++++++++++++++++
 stmt.hpp |    3 +++
 2 files changed, 28 insertions(+)


Index: odbsequoia/src/stmt.cpp
diff -u odbsequoia/src/stmt.cpp:1.21 odbsequoia/src/stmt.cpp:1.22
--- odbsequoia/src/stmt.cpp:1.21        Thu Mar  9 18:56:30 2006
+++ odbsequoia/src/stmt.cpp     Mon Mar 20 22:02:42 2006
@@ -192,6 +192,31 @@
 
 
 SQLRETURN
+SQLCloseCursor(SQLHSTMT     StatementHandle)
+{
+    ODBCStatement * self_p = objectify(StatementHandle);
+    self_p->clear_diags();
+
+    _PROTECT_SQLRETURN(self_p, close_cursor());
+
+}
+
+SQLRETURN
+ODBCStatement::close_cursor()
+{
+    if (!in_state_cursor())
+        throw ODBSeqException(L"24000", L"Invalid state");
+
+    state = S1;
+
+    // TODO: close carob_stmt->getResultSet() IF ANY
+
+    // FIXME: state = S3 if was prepared ?!
+    return SQL_SUCCESS;
+
+}
+
+SQLRETURN
 ODBCStatement::get_header_diag_fieldw(SQLSMALLINT DiagIdentifier,
                                       SQLPOINTER DiagInfoPtr,
                                       SQLSMALLINT BufferLength,
Index: odbsequoia/src/stmt.hpp
diff -u odbsequoia/src/stmt.hpp:1.16 odbsequoia/src/stmt.hpp:1.17
--- odbsequoia/src/stmt.hpp:1.16        Thu Mar  9 18:56:30 2006
+++ odbsequoia/src/stmt.hpp     Mon Mar 20 22:02:42 2006
@@ -70,6 +70,9 @@
     SQLRETURN
     num_result_cols(SQLSMALLINT * num_cols);
 
+    SQLRETURN
+    close_cursor();
+
     const std::wstring&
     get_carob_diagids() const
     {   // the owning connection has the prefix/knows the source 

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

Reply via email to