<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I need to connect to Access database
that has (among the other columns) spatial data in two columns named &quot;x
coord&quot; and &quot;y coord&quot;. I am trying to implement Virtual Spatial
Data according to http://www.mapserver.org/input/vector/VirtualSpatialData.html.
</font>
<br>
<br><font size=2 face="sans-serif">I have made ovf file like this:</font>
<br>
<br><font size=2 face="sans-serif">&lt;OGRVRTDataSource&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;OGRVRTLayer
name=&quot;krk&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;SrcDataSource&gt;ODBC:@Krk&lt;/SrcDataSource&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;SrcLayer&gt;baza&lt;/SrcLayer&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;GeometryField
encoding=&quot;PointFromColumns&quot; x=&quot;x koord&quot; y=&quot;y koord&quot;/&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/OGRVRTLayer&gt;</font>
<br><font size=2 face="sans-serif">&lt;/OGRVRTDataSource&gt;</font>
<br>
<br><font size=2 face="sans-serif">and map file layer like this (using
p.mapper):</font>
<br>
<br><font size=2 face="sans-serif">LAYER # kc</font>
<br><font size=2 face="sans-serif">&nbsp; CONNECTION &quot;krk.ovf&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; CONNECTIONTYPE OGR</font>
<br><font size=2 face="sans-serif">&nbsp; NAME &nbsp;&quot;krk&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; DATA &nbsp;&quot;krk&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; STATUS &nbsp; &nbsp; &nbsp; ON</font>
<br><font size=2 face="sans-serif">&nbsp; TYPE &nbsp; &nbsp; &nbsp; &nbsp;
POINT</font>
<br><font size=2 face="sans-serif">&nbsp; METADATA </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &quot;DESCRIPTION&quot;
&quot;KC&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &quot;LAYER_ENCODING&quot;
&quot;WINDOWS-1250&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; END &nbsp;# Metadata </font>
<br><font size=2 face="sans-serif">&nbsp; CLASS</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; Name 'Kc broj'</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; COLOR 0 0 0</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; SYMBOL 'circle'</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; SIZE 10</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; TEMPLATE void</font>
<br><font size=2 face="sans-serif">&nbsp; END &nbsp;# Class</font>
<br><font size=2 face="sans-serif">END</font>
<br>
<br><font size=2 face="sans-serif">I have also made use and system dsn
connection named &quot;krk&quot;.</font>
<br>
<br><font size=2 face="sans-serif">Testing with ogrinfo works fine, for
example:</font>
<br>
<br><font size=2 face="sans-serif">C:\Projekti\GIS\WebGIS\podaci\krk&gt;ogrinfo
krk.ovf krk|more</font>
<br><font size=2 face="sans-serif">ERROR 4: Update access not supported
for VRT datasources.</font>
<br><font size=2 face="sans-serif">Had to open data source read-only.</font>
<br><font size=2 face="sans-serif">INFO: Open of `krk.ovf'</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; using driver `VRT'
successful.</font>
<br>
<br><font size=2 face="sans-serif">Layer name: krk</font>
<br><font size=2 face="sans-serif">Geometry: Point</font>
<br><font size=2 face="sans-serif">Feature Count: 2</font>
<br><font size=2 face="sans-serif">Extent: (5000450.000000, 4997536.000000)
- (5196390.000000, 5000300.000000)</font>
<br><font size=2 face="sans-serif">Layer SRS WKT:</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">...</font>
<br>
<br><font size=2 face="sans-serif">But trying to run on web I am getting
internal server error: CGI/FastCGI has encountered a problem and needs
to close...&quot;. Also, my php error log file says:</font>
<br>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP Warning:
&nbsp;[MapServer Error]: msOGRFileOpen(): Open failed for OGR connection
`C:/Projekti/GIS/WebGIS/podaci/krk/krk.ovf'.</font>
<br><font size=2 face="sans-serif">Unable to initialize ODBC connection
to DSN for @Krk,</font>
<br><font size=2 face="sans-serif">[Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed</font>
<br>
<br><font size=2 face="sans-serif">&nbsp;in C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\initgroups.php
on line 239</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP Stack trace:</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 1.
{main}() C:\ms4w\apps\pmapper\pmapper-3.2.0\map.phtml:0</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 2.
include_once() C:\ms4w\apps\pmapper\pmapper-3.2.0\map.phtml:51</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 3.
Init_map-&gt;initAllParameters() C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\init\init.php:34</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 4.
Init_map-&gt;_initGroups() C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\init\initmap.php:60</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 5.
Init_groups-&gt;Init_groups() C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\init\initmap.php:292</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 6.
Init_groups-&gt;_createGroups() C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\initgroups.php:48</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 7.
Init_groups-&gt;_initResultFields() C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\initgroups.php:117</font>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP &nbsp; 8.
ms_layer_obj-&gt;open() C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\initgroups.php:239</font>
<br>
<br><font size=2 face="sans-serif">Any help would be greatly appreciated</font>
<br>
<br><font size=2 face="sans-serif">Thanks very much</font>
<br>
<br><font size=2 face="sans-serif">regards, dejan</font>