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 -> Re: OCCI question

Re: OCCI question

From: Dave Hau <davehau-no-spam-123_at_no-spam.netscape.net>
Date: Sun, 05 Oct 2003 08:16:24 GMT
Message-ID: <srQfb.9068$nO5.5744@newssvr33.news.prodigy.com>


This can happen if there's a bug in the OCCI shared library causing heap or stack corruption. Patch your client to 9.2.0.4 and see if it goes away.

HTH,
Dave

"agzis" <agzis_at_yahoo.com> wrote in message news:6594f651.0310041744.240e2534_at_posting.google.com...
> Hi,
> I have code :header and source files.
> Header is:
> #include <occi.h>
>
> using namespace oracle::occi;
> using namespace std;
>
> class OraTest
> {
> public:
> OraTest(string sid, string user, string pwd) throw (SQLException);
> virtual ~OraTest() throw (SQLException);
>
> void displayAllRows ();
>
> private:
>
> Environment * m_pEnvironment;
> Connection * m_pConnection;
>
>
> OraTest(); //disallow this ctor
>
> };
>
> Source is:
> #include "stdafx.h"
>
> #include "..\INCLUDE\OraTest1.h"
>
> //////////////////////////////////////////////////////////////////////
> // Construction/Destruction
> //////////////////////////////////////////////////////////////////////
>
> OraTest::OraTest(string sid, string user, string pwd) throw
> (SQLException) {
> m_pEnvironment = Environment::createEnvironment(Environment::DEFAULT);
> m_pConnection = m_pEnvironment->createConnection (user, pwd, sid);
> }
>
>
> OraTest::~OraTest() throw (SQLException){
> m_pEnvironment->terminateConnection(m_pConnection);
> Environment::terminateEnvironment(m_pEnvironment);
> }
>
> /**
> * displaying all the rows in the table
> */
> void OraTest::displayAllRows (){
> Statement *stmt = m_pConnection->createStatement (
> "SELECT table_name FROM user_tables where rownum=2");
> stmt->execute ();
> ResultSet *rs = stmt->getResultSet ();
>
>
> while (rs->next ())
> {
> ::MessageBox (NULL, rs->getString(1).c_str(), "displayAllRows",
> MB_OK);
> }
> stmt->closeResultSet (rs);
> m_pConnection->terminateStatement (stmt);
> }
> ///////////
> Call routine is:
> int APIENTRY WinMain(HINSTANCE hInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpCmdLine,
> int nCmdShow)
> {
> // TODO: Place code here.
>
> try {
> OraTest *pOraTest = new OraTest ("PCTS","scott", "tiger");
> pOraTest->displayAllRows ();
>
> delete (pOraTest);
> }
> catch (SQLException e) {
>
> ::MessageBox(NULL, e.getMessage().c_str(), "SQLException",MB_OK);
> }
>
> return 0;
> }
> //////////////
>
> When I call function displayAllRows() i receive message in a place
> m_pConnection->terminateStatement (stmt). Messsage is "User breakpoint
> called from code at 0x77f75a58" in NTDLL.
>
>
> Why this happened and how to get rid of it? Thank you in advance.
>
> Alex.
Received on Sun Oct 05 2003 - 03:16:24 CDT

Original text of this message

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