[mapserver-users] ODBC OGR MS SQL CONNECTION
ibrahimsaricicek
ibrahimsaricicek at gmail.com
Tue Mar 30 07:56:00 PDT 2010
Dear all,
This definition works,
CONNECTIONTYPE OGR
CONNECTION "
<OGRVRTDataSource>
<OGRVRTLayer name='Araclar'>
<SrcDataSource>ODBC:webuser/webuser at MsSql</SrcDataSource>
<SrcSQL>SELECT TOP 10 * FROM MUGPSDATALOG</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding='PointFromColumns' x='LONGITUDE'
y='LATITUDE'></GeometryField>
</OGRVRTLayer>
</OGRVRTDataSource>"
This doesn't and syas; msDrawMap(): Image handling error. Failed to draw
layer named 'Araclar'. msOGRFileOpen(): OGR error. Open failed for OGR
connection in layer `Araclar'. Parse error at EOF, not all elements have
been closed, starting with SrcSQL
CONNECTIONTYPE OGR
CONNECTION "
<OGRVRTDataSource>
<OGRVRTLayer name='Araclar'>
<SrcDataSource>ODBC:webuser/webuser at MsSql</SrcDataSource>
<SrcSQL>SELECT MOBILEUNIT.MUID, MOBILEUNIT.PLATE,
MUGPSDATALOG.LONGITUDE, MUGPSDATALOG.LATITUDE FROM MOBILEUNIT INNER JOIN
MUGPSDATALOG ON MOBILEUNIT.MUID=MUGPSDATALOG.MUID WHERE
MUGPSDATALOG.EVENTLOGID IN(SELECT MAX(EVENTLOGID) FROM MUFLEET INNER JOIN
MUGROUP ON MUFLEET.FLEETID = MUGROUP.FLEETID INNER JOIN MOBILEUNIT ON
MUGROUP.GROUPID = MOBILEUNIT.GROUPID INNER JOIN MUGPSDATALOG ON
MOBILEUNIT.MUID=MUGPSDATALOG.MUID where MUFLEET.FLEETID=37144 group by
MOBILEUNIT.MUID) ORDER BY MOBILEUNIT.PLATE</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding='PointFromColumns' x='LONGITUDE'
y='LATITUDE'></GeometryField>
</OGRVRTLayer>
</OGRVRTDataSource>"
But why?
And why ogr connection is too slow? Is there a way for speeding-up?
Regards...
--
View this message in context: http://n2.nabble.com/ODBC-OGR-MS-SQL-CONNECTION-tp4824960p4824960.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list