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