I've created a function which inserts into an ODBC database.
The statement executes without errors, but nothing is inserted into the database...
I tried tracing the ODBC-operarions, but it says that everything returns SQL_SUCCESS..Code:short DbConnection::Execute(char *strSql){ short sRes(0); void *hStmt; if(this->m_isOpen=FALSE || SQLAllocHandle(SQL_HANDLE_STMT, this->m_hDbc, &hStmt)!=SQL_SUCCESS || SQLExecDirect(hStmt, (UCHAR*)strSql, SQL_NTS)!=SQL_SUCCESS || SQLEndTran(SQL_HANDLE_DBC, this->m_hDbc, SQL_COMMIT)!=SQL_SUCCESS){ this->errMsg(hStmt); sRes=0; }else sRes=1; SQLFreeHandle(SQL_HANDLE_STMT, hStmt); return(sRes); }
Any clues?



LinkBack URL
About LinkBacks


