summaryrefslogtreecommitdiff
path: root/libodbcpp/command.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-06-11 09:03:42 +0000
committerrandomdan <randomdan@localhost>2010-06-11 09:03:42 +0000
commit1df33cc9d9a7804c78788d5717435ede44855ca0 (patch)
treeb78e66de0a9f7d6bb39038d6f628cbc871ffa652 /libodbcpp/command.cpp
parentInitial workings of project2 - renders gentoobrowse homepage (diff)
downloadlibdbpp-odbc-1df33cc9d9a7804c78788d5717435ede44855ca0.tar.bz2
libdbpp-odbc-1df33cc9d9a7804c78788d5717435ede44855ca0.tar.xz
libdbpp-odbc-1df33cc9d9a7804c78788d5717435ede44855ca0.zip
Use Glib::ustring in libodbcpp for data and std::string for non-data
Add support for parameters in SqlViews Uses parameters to implement category browse and search
Diffstat (limited to 'libodbcpp/command.cpp')
-rw-r--r--libodbcpp/command.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libodbcpp/command.cpp b/libodbcpp/command.cpp
index 217954e..4ceb825 100644
--- a/libodbcpp/command.cpp
+++ b/libodbcpp/command.cpp
@@ -3,7 +3,7 @@
#include "param.h"
#include <sqlext.h>
-ODBC::Command::Command(const Connection& c, String s) :
+ODBC::Command::Command(const Connection & c, const std::string & s) :
sql(s),
connection(c)
{
@@ -11,7 +11,7 @@ ODBC::Command::Command(const Connection& c, String s) :
if (rc != SQL_SUCCESS) {
throw Error(rc, SQL_HANDLE_STMT, hStmt, "Allocate statement handle");
}
- rc = SQLPrepare(hStmt, sql, sql.size());
+ rc = SQLPrepare(hStmt, (SQLCHAR*)sql.c_str(), sql.length());
if (rc != SQL_SUCCESS) {
SQLFreeHandle(SQL_HANDLE_STMT, hStmt);
throw Error(rc, SQL_HANDLE_STMT, hStmt, "Prepare statement");