Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Are occi statement objects persistent?
KM wrote:
> lovecreatesbea..._at_gmail.com wrote:
> > 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();
> > /* ... */
> > }
> > };
> >
>
Thank you. When I tried to code like above, I got memory fault (coredump). Maybe I didn't code it correctly. Received on Fri Dec 08 2006 - 08:51:08 CST