Opened 11 years ago

Closed 11 years ago

#4063 closed defect (fixed)

Unable to write oracle layers with no attributes beyond geometry and fid

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: OCI


The following command:

ogr2ogr -update $OCI_DSNAME $OCI_DSNAME -sql "SELECT SDO_AGGR_MBR (ora_geometry) as ora_geometry from polygon" -nln xxx -overwrite

fails with error:

ORA-01036: illegal variable name/number
in OCIBindByName()

However, adding a dummy extra attribute in the select statement will make it work.

Change History (1)

comment:1 by warmerdam, 11 years ago

Milestone: 1.8.1
Resolution: fixed
Status: newclosed

This is just a flaw in the logic of OGROCITableLayer::AllocAndBindForWrite(int eType) that assumed there would always be some variables other than the fid and geometry. Corrected in trunk (r22297) and 1.8 branch (r22298).

Note: See TracTickets for help on using tickets.