Changeset 13705

Show
Ignore:
Timestamp:
02/06/08 06:59:58 (3 months ago)
Author:
tamas
Message:

Support for OCI + VRT to access non spatial data (#2202)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/ogr/ogrsf_frmts/oci/ogrocisession.cpp

    r13449 r13705  
    7070    hGeometryTDO = NULL; 
    7171    hOrdinatesTDO = NULL; 
     72    hElemInfoTDO = NULL; 
    7273    pszUserid = NULL; 
    7374    pszPassword = NULL; 
     
    159160    hGeometryTDO = PinTDO( SDO_GEOMETRY ); 
    160161    if( hGeometryTDO == NULL ) 
    161         return FALSE; 
    162  
     162    { 
     163        /* If we have no MDSYS.SDO_GEOMETRY then we consider we are 
     164        working along with the VRT driver and access non spatial tables. 
     165        See #2202 for more details (Tamas Szekeres)*/ 
     166        CPLErrorReset(); 
     167    } 
     168    else 
     169    { 
    163170/* -------------------------------------------------------------------- */ 
    164171/*      Try to get the MDSYS.SDO_ORDINATE_ARRAY type object.            */ 
    165172/* -------------------------------------------------------------------- */ 
    166     hOrdinatesTDO = PinTDO( "MDSYS.SDO_ORDINATE_ARRAY" ); 
    167     if( hOrdinatesTDO == NULL ) 
    168         return FALSE; 
     173        hOrdinatesTDO = PinTDO( "MDSYS.SDO_ORDINATE_ARRAY" ); 
     174        if( hOrdinatesTDO == NULL ) 
     175            return FALSE; 
    169176 
    170177/* -------------------------------------------------------------------- */ 
    171178/*      Try to get the MDSYS.SDO_ELEM_INFO_ARRAY type object.           */ 
    172179/* -------------------------------------------------------------------- */ 
    173     hElemInfoTDO = PinTDO( "MDSYS.SDO_ELEM_INFO_ARRAY" ); 
    174     if( hElemInfoTDO == NULL ) 
    175         return FALSE; 
    176  
     180        hElemInfoTDO = PinTDO( "MDSYS.SDO_ELEM_INFO_ARRAY" ); 
     181        if( hElemInfoTDO == NULL ) 
     182            return FALSE; 
     183    } 
    177184/* -------------------------------------------------------------------- */ 
    178185/*      Record information about the session.                           */