[mapserver-users] queryByAttribute in C# mapscript

Tamas Szekeres szekerest at gmail.com
Tue Mar 24 11:41:34 EDT 2009


You might want to test with the:

"('[Name]'='value')"

expression syntax.

Best regards,

Tamas




2009/3/24 Murty Maganti <MMaganti at oriongis.com>

>  Hi
>
>
>
> Here is the entry in map file (removed CLASS portion)
>
>
>
>   LAYER
>
>     CONNECTION "vmonp03,port:5154,dmtigdb,dmtigdb,password"
>
>     CONNECTIONTYPE PLUGIN
>
>     PLUGIN  "msplugin_sde_92.dll"
>
>     DATA "DMTIGDB.CANLUR,SHAPE,SDE.DEFAULT"
>
>     NAME "Canlur"
>
>     PROCESSING "CLOSE_CONNECTION=DEFER"
>
>
>
>  CLASS
>
>   ----------
>
>   END
>
>
>
> END
>
>
>
> I think the parsing error is coming from query expression. If I use
> PARCELD=123, then it writes ‘Parsing error near(PARCELID)’ to log.
>
>
>
> Thanks
>
> Murty
>
> *From:* Tamas Szekeres [mailto:szekerest at gmail.com]
> *Sent:* Tuesday, March 24, 2009 11:17 AM
> *To:* Murty Maganti
> *Cc:* mapserver-users at lists.osgeo.org
> *Subject:* Re: [mapserver-users] queryByAttribute in C# mapscript
>
>
>
> How is your mapfile looking like. Parsing error near (OBJECTID) seems a bit
> strange here....
>
> Best regards,
>
> Tamas
>
>
>
>  2009/3/24 Murty Maganti <MMaganti at oriongis.com>
>
> Hi
>
>
>
> I am using queryByAttribute on a SDE layer with a simple expression,
> ‘OBJECTID = 750’. The method returns MS_FAILURE, though it is valid
> expression. I can run same query in ArcCatalog and get the result back.
>
>
>
> What do I need to verify here. I usually I check that there is template
> name defined and maxscaledenom is set to -1. What else I am missing.
>
>
>
> This is what is logged by map server
>
>
>
> [Mon Mar 23 18:02:25 2009].834000
> msConnPoolRequest(Canlur,vmonp03,port:5154,dmtigdb,dmtigdb,password) -> got
> 1D49DFF8
>
> [Mon Mar 23 18:02:25 2009].834000 msSDELayerOpen(): Layer Canlur specified
> version SDE.DEFAULT.
>
> [Mon Mar 23 18:02:25 2009].834000 msSDEGetLayerInfo(): Looking for layer by
> TESTGDB.CANLUR, SHAPE, vmonp03,port:5154,dmtigdb,dmtigdb,password
>
> [Mon Mar 23 18:02:25 2009].834000 msSDEGetLayerId(): Matched layer to id
> 112.
>
> [Mon Mar 23 18:02:25 2009].834000 Getting all column information in
> msSDELayerInitItemInfo
>
> [Mon Mar 23 18:02:25 2009].834000 msSDELayerInitItemInfo(): getting info
> for OBJECTID
>
> [Mon Mar 23 18:02:25 2009].834000 msSDELayerInitItemInfo(): getting info
> for CATEGORY
>
> [Mon Mar 23 18:02:25 2009].834000 msSDELayerInitItemInfo(): getting info
> for SHAPE
>
> [Mon Mar 23 18:02:25 2009].834000 msSDELayerInitItemInfo(): getting info
> for OID
>
> [Mon Mar 23 18:02:35 2009].338000 getSymbol(): Symbol definition error.
> Parsing error near (OBJECTID):(line 831)
>
> [Mon Mar 23 18:02:35 2009].370000 msQueryByAttributes(): Search returned no
> results. No matching record(s) found.
>
>
>
> I used another field PARCELID, which is also numeric but still does not
> work.
>
>
>
> Thanks
>
> Murty
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090324/ce7647e4/attachment-0001.html


More information about the mapserver-users mailing list