<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 "x
coord" and "y coord". 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"><OGRVRTDataSource></font>
<br><font size=2 face="sans-serif"> <OGRVRTLayer
name="krk"></font>
<br><font size=2 face="sans-serif"> <SrcDataSource>ODBC:@Krk</SrcDataSource></font>
<br><font size=2 face="sans-serif"> <SrcLayer>baza</SrcLayer></font>
<br><font size=2 face="sans-serif"> <GeometryType>wkbPoint</GeometryType></font>
<br><font size=2 face="sans-serif"> <GeometryField
encoding="PointFromColumns" x="x koord" y="y koord"/></font>
<br><font size=2 face="sans-serif"> </OGRVRTLayer></font>
<br><font size=2 face="sans-serif"></OGRVRTDataSource></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"> CONNECTION "krk.ovf"</font>
<br><font size=2 face="sans-serif"> CONNECTIONTYPE OGR</font>
<br><font size=2 face="sans-serif"> NAME "krk"</font>
<br><font size=2 face="sans-serif"> DATA "krk"</font>
<br><font size=2 face="sans-serif"> STATUS ON</font>
<br><font size=2 face="sans-serif"> TYPE
POINT</font>
<br><font size=2 face="sans-serif"> METADATA </font>
<br><font size=2 face="sans-serif"> "DESCRIPTION"
"KC"</font>
<br><font size=2 face="sans-serif"> "LAYER_ENCODING"
"WINDOWS-1250"</font>
<br><font size=2 face="sans-serif"> END # Metadata </font>
<br><font size=2 face="sans-serif"> CLASS</font>
<br><font size=2 face="sans-serif"> Name 'Kc broj'</font>
<br><font size=2 face="sans-serif"> COLOR 0 0 0</font>
<br><font size=2 face="sans-serif"> SYMBOL 'circle'</font>
<br><font size=2 face="sans-serif"> SIZE 10</font>
<br><font size=2 face="sans-serif"> TEMPLATE void</font>
<br><font size=2 face="sans-serif"> END # 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 "krk".</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>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"> 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...". Also, my php error log file says:</font>
<br>
<br><font size=2 face="sans-serif">[27-Jan-2009 16:21:45] PHP Warning:
[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"> 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 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 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 3.
Init_map->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 4.
Init_map->_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 5.
Init_groups->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 6.
Init_groups->_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 7.
Init_groups->_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 8.
ms_layer_obj->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>