[mapserver-users] queryByAttributes returns no result with OGR/ODBC data source

Dejan.Gambin at pula.hr Dejan.Gambin at pula.hr
Sun May 17 17:50:54 EDT 2009


Hi,

I am using OGR Virtual Spatial Data to connect to MS Access database using 
ODBC. Database has X/Y columns. I have created .ovf file like this:

<OGRVRTDataSource>
        <OGRVRTLayer name="krk">
        <SrcDataSource>ODBC:@Krk</SrcDataSource>
        <FID>ID</FID>
        <SrcLayer>Dozvole</SrcLayer>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="KoordinataX" 
y="KoordinataY"/>
        </OGRVRTLayer>
</OGRVRTDataSource>

It is all working fine and the points are showing on the map (using 
p.mapper). Alos, ogrinfo with -where clause is working fine. But the 
attribute query gives no result, whichever field I query. Query string is 
like:

( [KOORDINATAX] = 5460870 )

This syntax works fine with shape files and also wit OGR layers based on 
MapInfo files. But not with ODBC/Access.

I am using ms4w 2.2.7

Any help?

regards, dejan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090517/b6ea712a/attachment.html


More information about the mapserver-users mailing list