protected function setStmtError($stmt = null)
    {
        if ($stmt) {
            $this->setErrorCode(db2_stmt_error($stmt));
            $this->setErrorMsg(db2_stmt_errormsg($stmt));
        } else {
            $this->setErrorCode(db2_stmt_error());
            $this->setErrorMsg(db2_stmt_errormsg());
        }        
    }
protected function setStmtError($stmt = null)
    {
        if ($stmt) {
            $this->setErrorCode(db2_stmt_error($stmt));
            $this->setErrorMsg(db2_stmt_errormsg($stmt));
        } else {
            $this->setErrorCode(db2_stmt_error());
            $this->setErrorMsg(db2_stmt_errormsg());
        }        
    }
protected function setStmtError ( $ stmt = null ) { if ( $ stmt ) { $ this -> setErrorCode ( db2_stmt_error ( $ stmt ) ) ; $ this -> setErrorMsg ( db2_stmt_errormsg ( $ stmt ) ) ; } else { $ this -> setErrorCode ( db2_stmt_error ( ) ) ; $ this -> setErrorMsg ( db2_stmt_errormsg ( ) ) ; } }
set error code and message based on last db2 prepare or execute error.

@todo: consider using GET DIAGNOSTICS for even more message text:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzala%2Frzalafinder.htm

@param null $stmt
set error code and message based on last db2 prepare or execute error .