Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Are occi statement objects persistent?

Are occi statement objects persistent?

From: <lovecreatesbea..._at_gmail.com>
Date: 7 Dec 2006 17:59:28 -0800
Message-ID: <1165543168.180577.222170@73g2000cwn.googlegroups.com>


Can creating, using and terminating a member statement objects span multiple C++ functions in a class?

Can I write code like the following?

class COgFileSize{

private:

    Connection *m_pConn;
    Statement *m_pStm;

public:

    COgFileSize(){

        m_pStm = m_pConn->createStatement();
}

    ~COgFileSize(){

        m_pStm = m_pConn->terminateStatement(m_pStm);
}

    void Process(){

        m_pStm->setSQL("SELECT count(*) FROM dual;");
        ResultSet *rs = m_pStm->executeQuery();
        /* ... */

}

}; Received on Thu Dec 07 2006 - 19:59:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US