Date: Wednesday, January 11, 2006 @ 17:47:12
Author: marc
Path: /cvsroot/carob/odbsequoia/src
Modified: stmt.cpp (1.4 -> 1.5) stmt.hpp (1.3 -> 1.4)
Created ODBCStatement::exec_directw() (with full access to private & protected
fields).
----------+
stmt.cpp | 22 +++++++++++++---------
stmt.hpp | 2 ++
2 files changed, 15 insertions(+), 9 deletions(-)
Index: odbsequoia/src/stmt.cpp
diff -u odbsequoia/src/stmt.cpp:1.4 odbsequoia/src/stmt.cpp:1.5
--- odbsequoia/src/stmt.cpp:1.4 Wed Jan 11 17:21:28 2006
+++ odbsequoia/src/stmt.cpp Wed Jan 11 17:47:12 2006
@@ -32,23 +32,27 @@
SQLExecDirectW(SQLHSTMT StatementHandle,
SQLWCHAR *StatementText, SQLINTEGER TextLength)
{
- SQLRETURN ret = SQL_SUCCESS;
- ODBCStatement * self_p = (ODBCStatement *)StatementHandle;
-
+ ODBCStatement * stmt = static_cast<ODBCStatement *>(StatementHandle);
+ return stmt->exec_directw(StatementText, TextLength);
+}
+
+SQLRETURN
+ODBCStatement::exec_directw(SQLWCHAR *StatementText, SQLINTEGER TextLength)
+{
try
- {
+ {
std::wstring wstext = fromSQLW(StatementText, TextLength);
- bool resultIsSet = self_p->carob_stmt->execute(wstext);
+ bool resultIsSet = carob_stmt->execute(wstext);
if (resultIsSet)
- self_p->state = S5;
+ state = S5;
else
- self_p->state = S4;
+ state = S4;
+ return SQL_SUCCESS;
}
catch (const CarobException& ce)
{
- ret = SQL_ERROR;
+ return SQL_ERROR;
}
- return ret;
}
SQLRETURN
Index: odbsequoia/src/stmt.hpp
diff -u odbsequoia/src/stmt.hpp:1.3 odbsequoia/src/stmt.hpp:1.4
--- odbsequoia/src/stmt.hpp:1.3 Mon Jan 9 11:32:27 2006
+++ odbsequoia/src/stmt.hpp Wed Jan 11 17:47:12 2006
@@ -34,6 +34,8 @@
// possible).
ODBCStatement(ODBCConnection& creator) : ODBCItem(creator)
{ state = S0; };
+ SQLRETURN
+ ODBCStatement::exec_directw(SQLWCHAR *StatementText, SQLINTEGER
TextLength);
};
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits