From: Carlos G.A. <car...@ho...> - 2002-08-09 18:49:11
|
Hello: I made the implementation for SQLNumParams here is the code: Main.cpp ///// SQLNumParams ///// RETCODE SQL_API SQLNumParams (HSTMT arg0, SWORD * arg1) { /* notYetImplemented("SQLNumParams called\n"); return(SQL_SUCCESS); */ TRACE("SQLMoreResults"); return ((OdbcStatement*) arg0)->sqlNumParams(arg1); } OdbcStatement.h New declaration RETCODE sqlNumParams (SWORD *params); OdbcStatement.cpp New definition RETCODE OdbcStatement::sqlNumParams(SWORD * params) { clearErrors(); if (statement) try { *params = statement->getNumParams(); } catch (SQLException& exception) { postError ("HY000", exception); return SQL_ERROR; } else *params = 0; return sqlSuccess(); } IscConection.h New declaration in class PreparedStatement : public Statement virtual int getNumParams() = 0; IscPreparedStatement.h New declaration virtual int getNumParams(); IscPreparedStatement.cpp New definition int IscPreparedStatement::getNumParams() { return parameters.count; } IscCallableStatement.h New declaration virtual int getNumParams(); IscCallableStatement.cpp New definition int IscCallableStatement::getNumParams() { return Parent::getNumParams(); } Best regards Carlos Guzmán Álvarez _________________________________________________________________ Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com |