Oracle queryByAttributes

Hallgren Johan E jhhal at WMDATA.COM
Sat Nov 24 02:10:06 EST 2007


Hello

 

I have a problem with MapServer 5.0 and Oracle when using
queryByAttributes.

 

Before I could use the following syntax;

oLayerObj.queryByAttributes(m_MapObj, "OBJECTID", "OBJECTID = 75",
mapscript.MS_MULTIPLE);

 

Now it does not work. 

 

The debug error is;

<ERROR>mapscript_csharp<br/>msOracleSpatialLayerWhichShapes():
OracleSpatial error. Error: ORA-00933: SQL command not properly ended

 . Query statement: SELECT OBJECTID, OBJECTID, shape FROM (SELECT shape,
NAMN, OBJECTID FROM SDO_KOMMUN) WHERE  OBJECTID =  OBJECTID = 75  AND
SDO_FILTER( shape, MDSYS.SDO_GEOMETRY(2003, NULL,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(119497
3,6083188,1973312,7687503) ),'querytype=window') = 'TRUE' . Check your
data statement.</ERROR>

 

Look at the where statement: 

WHERE  OBJECTID =  OBJECTID = 75  

 

Hmmm

 

I couldn't se other than I send in the correct string but something
happens. 

 

My mapfile look like this:

  LAYER

    NAME SDO_KOMMUN_O

    TYPE POLYGON

    STATUS ON

    CONNECTION "wmgis/wmgis01 at wmsi1394"

    CONNECTIONTYPE oraclespatial 

    DATA "shape FROM (SELECT shape, NAMN, OBJECTID FROM SDO_KOMMUN)
USING UNIQUE OBJECTID VERSION 10g" 

    TEMPLATE "c:\temp\template.txt"

    DEBUG on

    CLASS

      OUTLINECOLOR 0 0 255

      COLOR 100 100 255

    END

  END

 


I'm using mapcript in the csharp environment.

 

Is there any change here in new 5.0 release?

 

/Johan

 


___________________________________


Johan Hallgren


 

WM-data, Logica CMG

Pelle Bergs backe 3

Box 1938, 791 19 Falun

Tel (och mobil): 023-547 46 (int: +46-2354746)

johan.e.hallgren at wmdata.com
<blocked::mailto:johan.e.hallgren at wmdata.com> 

http://www.wmdata.se
<blocked::https://webaccess.wmdata.com/exchweb/bin/redir.asp?URL=http://
www.wmdata.se/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20071124/3b45c7ef/attachment.html


More information about the mapserver-dev mailing list