From 1df33cc9d9a7804c78788d5717435ede44855ca0 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 11 Jun 2010 09:03:42 +0000 Subject: 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 --- libodbcpp/command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libodbcpp/command.cpp') 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 -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"); -- cgit v1.2.3