Changeset 13756

Show
Ignore:
Timestamp:
02/11/08 08:13:18 (3 months ago)
Author:
tamas
Message:

Prevent from calling CPLError when SDO_GEOMETRY is missing (non spatial) (#2202)

Files:

Legend:

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

    r13705 r13756  
    158158/*      Try to get the MDSYS.SDO_GEOMETRY type object.                  */ 
    159159/* -------------------------------------------------------------------- */ 
    160     hGeometryTDO = PinTDO( SDO_GEOMETRY ); 
    161     if( hGeometryTDO == NULL ) 
    162     { 
    163         /* If we have no MDSYS.SDO_GEOMETRY then we consider we are 
     160    /* If we have no MDSYS.SDO_GEOMETRY then we consider we are 
    164161        working along with the VRT driver and access non spatial tables. 
    165162        See #2202 for more details (Tamas Szekeres)*/ 
    166         CPLErrorReset(); 
    167     } 
    168     else 
    169     { 
     163    if (OCIDescribeAny(hSvcCtx, hError,  
     164                       (text *) SDO_GEOMETRY, (ub4) strlen(SDO_GEOMETRY),  
     165                       OCI_OTYPE_NAME, (ub1)1, (ub1)OCI_PTYPE_TYPE,  
     166                       hDescribe ) != OCI_ERROR) 
     167    { 
     168        hGeometryTDO = PinTDO( SDO_GEOMETRY ); 
     169        if( hGeometryTDO == NULL ) 
     170            return FALSE; 
     171 
    170172/* -------------------------------------------------------------------- */ 
    171173/*      Try to get the MDSYS.SDO_ORDINATE_ARRAY type object.            */