SQLServer 2005 via ovf
Josh Hevenor
Josh.Hevenor at DPRA.COM
Thu Jul 26 09:29:27 PDT 2007
I'm trying to connect to a SQLServer 2005 table through OVF with little
success...
My OVF file
<OGRVRTDataSource>
<OGRVRTLayer name="banner_location">
<SrcDataSource>ODBC:usr/pwd at ourdb,table_name</SrcDataSource>
<SRCLayer>table_name</SRCLayer>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding="PointFromColumns"
x="LONGITUDE" y="LATITUDE"/>
</OGRVRTLayer>
</OGRVRTDataSource>
Our mapfile just has a background (province) polygon layer and this
point layer. When I use shp2img there is no error reported but my points
aren't on the image.
shp2img -m geoportal.map -o testing.png
msDrawMap(): Layer 0 (Province), 0.172s
msDrawMap(): Layer 1 (Major Roads), 0.046s
msDrawMap(): Layer 2 (our_layer), 7.157s // the ovf layer
msDrawMap(): Drawing Label Cache, 0.000s
msDrawMap() total time: 7.375s
I can use mapserv.exe to draw a map when the ovf layer is turned off.
When I attempt to connect through mapserver (mapscript, php) I get the
following error
[MapServer Error]: msOGRFileOpen(): Open failed for OGR
connection `..\..\common\data\ovf\our_layer.ovf'.
Unable to initialize ODBC connection to DSN for
usr/pwd at ourdb,table_name,
[Microsoft][SQL Native Client]Named Pipes Provider: Could not open a
connection to SQL Server [1326].
When I use the 'Sql Server' odbc driver in the connection I get the
following for line 3 instead of the Named Pipes stuff
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does
not exist or access denied.
I'm using PHP 5.2.3 and MapServer version 4.10.2
OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
Any suggestions are much appreciated,
Josh Hevenor
Application Developer
____________________________________________
5230 South Service Road
Burlington, Ontario
L7L 5K2 Canada
Phone: 905-333-4544 ext. 19
Fax: 905-333-0455
Cell: 905-320-7525
Email: josh.hevenor at dpra.com
Internet: http://www.dpra.com
Attention:
Privileged/Confidential Information may be contained in this message.
Disclosure to any person other than the named recipient is unauthorized.
If you are not the intended recipient, please delete all copies of this
information and kindly notify the sender by reply email. Opinions,
conclusions and other information in this message that do not relate to
the official business of DPRA shall be understood as neither given nor
endorsed by it. DPRA and any of its subsidiaries reserve the right to
monitor all e-mail communications through its networks. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070726/0c376f53/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3247 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070726/0c376f53/attachment.jpg>
More information about the MapServer-users
mailing list