I am moving my program from OCCI 10g and Visual Studio 2005 (VC8) to OCCI 11g and Visual Studio 2008 (VC9). I have downloaded the new instant client and SDK files (220.127.116.11), and everything builds OK. Using OCCI 11g, my program can write a spatial table to our Oracle Spatial 10g database, but when I try to read the data back, I get an access violation reading a spatial object (SDO_GEOMETRY). I am able to read the spatial table I created using OCCI 11g successfully using an earlier version of my application that uses Instant Client 10g.
I used OTT from 10g to create the class that wraps SDO_GEOMETRY. I tried generating new code from OTT in 11g, but the result matched the code generated in 10g.
The crash happens in a call to oracle::occi::ResultSet::GetObject(), and the top method in the call stack that has source code is:
// Note: this is part of the object wrapper generated by OTT.
void SdoGeometryBase::readSQL(void ctxOCCI_)
SdoGeometryBase *objOCCI_ = new(ctxOCCI_) SdoGeometryBase(ctxOCCI_);
oracle::occi::AnyData streamOCCI_(ctxOCCI_); <--- Access violation happens on this call.
This happens on the first attempt to read an SDO_GEOMETRY object.
Has anyone run into a similar problem?
I am bumping this thread in hopes that someone might have run into this same problem or be able to give me some suggestions as to how to go about solving it. My program can connect to the database and query the list of tables or other non-spatial data, but when I try to read an SDO_GEOMETRY object I get the crash described below. The crash happens on both Windows XP and Windows 7. As far as I can tell, I am using the latest instant client and SDK files for Oracle 11g.
Were there any changes between 10g and 11g that would force me to change my code?
Hi, would it be possible for you to post the SDO_GEOMETRY.h / SDO_GEOMETRY.c / SDO_GEOMETRY.cpp files as produced by ott. I sort of have working code to extract the spatial data but desperately needs those definitions, and my ott installation appearantly does not work.