⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netstatementreply.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                break;            }        case CodePoint.CMDCHKRM:            parseCMDCHKRM();            break;        case CodePoint.DTAMCHRM:            parseDTAMCHRM();            break;        case CodePoint.OBJNSPRM:            parseOBJNSPRM();            break;        case CodePoint.RDBNACRM:            parseRDBNACRM();            break;        case CodePoint.SQLERRRM:            {                NetSqlca sqlca = parseSqlErrorCondition();                statementI.completeSqlca(sqlca);                break;            }        default:            parseCommonError(peekCP);            break;        }    }    void parseExecuteSetStatementError(StatementCallbackInterface statement) throws DisconnectException {        int peekCP = peekCodePoint();        switch (peekCP) {        case CodePoint.ABNUOWRM:            {                NetSqlca sqlca = parseAbnormalEndUow(statement.getConnectionCallbackInterface());                statement.completeSqlca(sqlca);                break;            }        case CodePoint.CMDCHKRM:            parseCMDCHKRM();            break;        case CodePoint.DTAMCHRM:            parseDTAMCHRM();            break;        case CodePoint.OBJNSPRM:            parseOBJNSPRM();            break;        case CodePoint.RDBNACRM:            parseRDBNACRM();            break;        case CodePoint.SQLERRRM:            {                NetSqlca sqlca = parseSqlErrorCondition();                statement.completeSqlca(sqlca);                break;            }        default:            parseCommonError(peekCP);            break;        }    }    //-----------------------------parse DDM Reply Messages-----------------------    // Open Query Complete Reply Message indicates to the requester that    // an OPNQRY or EXCSQLSTT command completed normally and that the query    // process has been initiated.  It also indicates the type of query protocol    // and cursor used for the query.    // When an EXCSQLSTT contains an SQL statement that invokes a stored procedure,    // and the procedure completes, an OPNQRYRM is returned for each answer set.    protected NetResultSet parseOPNQRYRM(StatementCallbackInterface statementI) throws DisconnectException {        // these need to be initialized to the correct default values.        int svrcod = CodePoint.SVRCOD_INFO;        boolean svrcodReceived = false;        int qryprctyp = 0;        boolean qryprctypReceived = false;        int sqlcsrhld = 0xF0;    // 0xF0 is false (default), 0xF1 is true.        boolean sqlcsrhldReceived = false;        int qryattscr = 0xF0;   // 0xF0 is false (default), 0xF1 is true.        boolean qryattscrReceived = false;        int qryattsns = CodePoint.QRYUNK;        boolean qryattsnsReceived = false;        int qryattupd = CodePoint.QRYUNK;        boolean qryattupdReceived = false;        long qryinsid = 0;        boolean qryinsidReceived = false;        int qryattset = 0xF0;    // 0xF0 is false (default), 0xF1 is true.        boolean qryattsetReceived = false;        parseLengthAndMatchCodePoint(CodePoint.OPNQRYRM);        //pushLengthOnCollectionStack();        int ddmLength = getDdmLength();        ensureBLayerDataInBuffer(ddmLength);        int peekCP = peekCodePoint();        int length = 0;        //while (peekCP != Reply.END_OF_COLLECTION) {        while (ddmLength > 0) {            boolean foundInPass = false;            if (peekCP == CodePoint.SVRCOD) {                foundInPass = true;                svrcodReceived = checkAndGetReceivedFlag(svrcodReceived);                length = peekedLength_;                svrcod = parseFastSVRCOD(CodePoint.SVRCOD_INFO, CodePoint.SVRCOD_SESDMG);                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.QRYPRCTYP) {                foundInPass = true;                qryprctypReceived = checkAndGetReceivedFlag(qryprctypReceived);                length = peekedLength_;                qryprctyp = parseFastQRYPRCTYP();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.SQLCSRHLD) {                // Indicates whether the requester specified the HOLD option.                // When specified, the cursor is not closed upon execution of a commit operation.                foundInPass = true;                sqlcsrhldReceived = checkAndGetReceivedFlag(sqlcsrhldReceived);                length = peekedLength_;                sqlcsrhld = parseFastSQLCSRHLD();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.QRYATTSCR) {                foundInPass = true;                qryattscrReceived = checkAndGetReceivedFlag(qryattscrReceived);                length = peekedLength_;                qryattscr = parseFastQRYATTSCR();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.QRYATTSNS) {                foundInPass = true;                qryattsnsReceived = checkAndGetReceivedFlag(qryattsnsReceived);                length = peekedLength_;                qryattsns = parseFastQRYATTSNS();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.QRYATTUPD) {                foundInPass = true;                qryattupdReceived = checkAndGetReceivedFlag(qryattupdReceived);                length = peekedLength_;                qryattupd = parseFastQRYATTUPD();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.QRYINSID) {                foundInPass = true;                qryinsidReceived = checkAndGetReceivedFlag(qryinsidReceived);                length = peekedLength_;                qryinsid = parseFastQRYINSID();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.QRYATTSET) {                foundInPass = true;                qryattsetReceived = checkAndGetReceivedFlag(qryattsetReceived);                length = peekedLength_;                qryattset = parseFastQRYATTSET();                ddmLength = adjustDdmLength(ddmLength, length);                peekCP = peekCodePoint();            }            if (!foundInPass) {                doPrmnsprmSemantics(peekCP);            }        }        checkRequiredObjects(svrcodReceived, qryprctypReceived, qryinsidReceived);        netAgent_.setSvrcod(svrcod);        // hack for now until event methods are used below        Statement statement = (Statement) statementI;        // if there is a cached Cursor object, then use the cached cursor object.        NetResultSet rs = null;        if (statement.cachedCursor_ != null) {            statement.cachedCursor_.resetDataBuffer();            ((NetCursor) statement.cachedCursor_).extdtaData_.clear();            rs = new NetResultSet(netAgent_,                    (NetStatement) statement.materialStatement_,                    statement.cachedCursor_,                    //qryprctyp, //protocolType, CodePoint.FIXROWPRC | CodePoint.LMTBLKPRC                    sqlcsrhld, //holdOption, 0xF0 for false (default) | 0xF1 for true.                    qryattscr, //scrollOption, 0xF0 for false (default) | 0xF1 for true.                    qryattsns, //sensitivity, CodePoint.QRYUNK | CodePoint.QRYINS                    qryattset,                    qryinsid, //instanceIdentifier, 0 (if not returned, check default) or number                    calculateResultSetType(qryattscr, qryattsns, statement.resultSetType_),                    calculateResultSetConcurrency(qryattupd, statement.resultSetConcurrency_),                    calculateResultSetHoldability(sqlcsrhld));        } else {            rs = new NetResultSet(netAgent_,                    (NetStatement) statement.materialStatement_,                    new NetCursor(netAgent_, qryprctyp),                    //qryprctyp, //protocolType, CodePoint.FIXROWPRC | CodePoint.LMTBLKPRC                    sqlcsrhld, //holdOption, 0xF0 for false (default) | 0xF1 for true.                    qryattscr, //scrollOption, 0xF0 for false (default) | 0xF1 for true.                    qryattsns, //sensitivity, CodePoint.QRYUNK | CodePoint.QRYINS                    qryattset,                    qryinsid, //instanceIdentifier, 0 (if not returned, check default) or number                    calculateResultSetType(qryattscr, qryattsns, statement.resultSetType_),                    calculateResultSetConcurrency(qryattupd, statement.resultSetConcurrency_),                    calculateResultSetHoldability(sqlcsrhld));        }        return rs;    }    // Also called by NetResultSetReply subclass.    // The End of Query Reply Message indicates that the query process has    // terminated in such a manner that the query or result set is now closed.    // It cannot be resumed with the CNTQRY command or closed with the CLSQRY command.    // The ENDQRYRM is always followed by an SQLCARD.    protected void parseENDQRYRM(ResultSetCallbackInterface resultSetI) throws DisconnectException {        boolean svrcodReceived = false;        int svrcod = CodePoint.SVRCOD_INFO;        boolean rdbnamReceived = false;        String rdbnam = null;        parseLengthAndMatchCodePoint(CodePoint.ENDQRYRM);        pushLengthOnCollectionStack();        int peekCP = peekCodePoint();        while (peekCP != Reply.END_OF_COLLECTION) {            boolean foundInPass = false;            if (peekCP == CodePoint.SVRCOD) {                foundInPass = true;                svrcodReceived = checkAndGetReceivedFlag(svrcodReceived);                svrcod = parseSVRCOD(CodePoint.SVRCOD_WARNING, CodePoint.SVRCOD_ERROR);                peekCP = peekCodePoint();            }            if (peekCP == CodePoint.RDBNAM) {                foundInPass = true;                rdbnamReceived = checkAndGetReceivedFlag(rdbnamReceived);                rdbnam = parseRDBNAM(true);                peekCP = peekCodePoint();            }            if (!foundInPass) {                doPrmnsprmSemantics(peekCP);            }        }        popCollectionStack();        checkRequiredObjects(svrcodReceived);        netAgent_.setSvrcod(svrcod);    }    // Query Previously Opened Reply Message is issued when an    // OPNQRY command is issued for a query that is already open.    // A previous OPNQRY command might have opened the query    // which may not be closed.    // PROTOCOL Architects an SQLSTATE of 58008 or 58009.    //    // Messages    // SQLSTATE : 58009    //     Execution failed due to a distribution protocol error that caused deallocation of the conversation.    //     SQLCODE : -30020    //     Execution failed because of a Distributed Protocol    //         Error that will affect the successful execution of subsequent    //         commands and SQL statements: Reason Code <reason-code>.    //      Some possible reason codes include:    //      121C Indicates that the user is not authorized to perform the requested command.    //      1232 The command could not be completed because of a permanent error.    //          In most cases, the server will be in the process of an abend.    //      220A The target server has received an invalid data description.    //          If a user SQLDA is specified, ensure that the fields are    //          initialized correctly. Also, ensure that the length does not    //          exceed the maximum allowed length for the data type being used.    //    //      The command or statement cannot be processed.  The current    //      transaction is rolled back and the application is disconnected    //      from the remote database.    //    //    // Returned from Server:    // SVRCOD - required  (8 - ERROR)    // RDBNAM - required    // PKGNAMCSN - required    // SRVDGN - optional    //    private void parseQRYPOPRM() throws DisconnectException {        boolean svrcodReceived = false;        int svrcod = CodePoint.SVRCOD_INFO;        boolean rdbnamReceived = false;        String rdbnam = null;        boolean pkgnamcsnReceived = false;        Object pkgnamcsn = null;        parseLengthAndMatchCodePoint(CodePoint.QRYPOPRM);        pushLengthOnCollectionStack();        int peekCP = peekCodePoint();        while (peekCP != Reply.END_OF_COLLECTION) {            boolean foundInPass = false;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -