[mapserver-users] Re: ODBC OGR MS SQL CONNECTION

Frank Warmerdam warmerdam at pobox.com
Wed Mar 31 02:46:33 EDT 2010


ibrahimsaricicek wrote:
> I've changed like this  
> 
> CONNECTION "
>   <OGRVRTDataSource>
>     <OGRVRTLayer name='Araclar'>
>         <SrcDataSource>ODBC:webuser/webuser at MsSql,AracView</SrcDataSource>
>         <SrcSQL>SELECT * FROM AracView</SrcSQL>
>         <GeometryType>wkbPoint</GeometryType>
>         <GeometryField encoding='PointFromColumns' x='LONGITUDE'
> y='LATITUDE'></GeometryField>
>     </OGRVRTLayer>
> </OGRVRTDataSource>"
> 
> And result;
> 
> 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 SrcDataSource 
> 
> Is there a problem while using comma?

Ibrahim,

I vaguely recall that if you do not include a DATA statement declaring the
layer you want to operate from OGR, then the connection string is parsed
using a comma to identify the layer.  So try your existing connection
string, but add:

DATA "Araclar"

and see if that helps.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list