Bho, I have a connection like this:<br><br>CONNECTIONTYPE OGR<br> CONNECTION "<OGRVRTDataSource><OGRVRTLayer name='poi'><SrcDataSource>ODBC:xxx/xxx@gisdevSql2005</SrcDataSource><br><SrcLayer>top025sc</SrcLayer>
<br><GeometryField encoding='WKB' field='the_geom'/> <SrcSQL>SELECT * FROM top025sc WHERE TOP_CL = 'T110' or TOP_CL = 'T115'<br></SrcSQL><br></OGRVRTLayer></OGRVRTDataSource>"
<br><br>And a System DSN and it's working. <br><br>Here is different:<br><SrcDataSource>ODBC:xxx/xxx@gisdevSql2005</SrcDataSource><br><br>Where gisdevSql2005 is the DSN,<br>And u have:<br><SrcDataSource>
ODBC:usr/pwd@ourdb,table_name</SrcDataSource><br><br>Which is different syntax. Try as my syntax, maybe it works.<br><br>Cheers<br> Piero<br><br><br><br><div><span class="gmail_quote">2007/7/26, Josh Hevenor <<a href="mailto:Josh.Hevenor@dpra.com">
Josh.Hevenor@dpra.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I'm trying to connect to a SQLServer 2005 table
through <span id="st" name="st" class="st">OVF</span> with little success…</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">My <span id="st" name="st" class="st">OVF</span> file</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> <OGRVRTDataSource></span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> <OGRVRTLayer
name="banner_location"></span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">
<SrcDataSource>ODBC:usr/pwd@ourdb,table_name</SrcDataSource></span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">
<SRCLayer>table_name</SRCLayer></span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">
<GeometryType>wkbPoint</GeometryType></span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">
<GeometryField encoding="PointFromColumns" x="LONGITUDE"
y="LATITUDE"/></span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">
</OGRVRTLayer></span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"></OGRVRTDataSource></span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">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. </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> shp2img
-m geoportal.map -o testing.png</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">msDrawMap(): Layer 0 (Province),
0.172s</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">msDrawMap(): Layer 1 (Major Roads),
0.046s</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">msDrawMap(): Layer 2 (our_layer),
7.157s // the <span id="st" name="st" class="st">ovf</span> layer</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">msDrawMap(): Drawing Label Cache,
0.000s</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">msDrawMap() total time: 7.375s </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I can use mapserv.exe to draw a map when the <span id="st" name="st" class="st">ovf</span> layer is
turned off. When I attempt to connect through mapserver (mapscript, php) I get
the following error</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> [MapServer
Error]: msOGRFileOpen(): Open failed for OGR connection `..\..\common\data\<span id="st" name="st" class="st">ovf</span>\our_layer.<span id="st" name="st" class="st">ovf</span>'.</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Unable to initialize ODBC connection
to DSN for usr/pwd@ourdb,table_name,</span></font></p>
<p style="text-indent: 0.5in;"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">[Microsoft][SQL Native Client]Named
Pipes Provider: Could not open a connection to SQL Server [1326].</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">When I use the 'Sql Server' odbc driver in the
connection I get the following for line 3 instead of the Named Pipes stuff</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> [Microsoft][ODBC
SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I'm using PHP 5.2.3 and </span></font>MapServer
version 4.10.2 </p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">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</span></font></p>
<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Any suggestions are much appreciated, </span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"></span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Josh Hevenor</span></font><br>
<font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Application
Developer<br>
</span></font><font face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial;">____________________________________________<br>
5230 South
Service Road<br>
Burlington, Ontario <br>
L7L 5K2 Canada<br>
</span></font><font color="black" face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial; color: black;" lang="EN-CA">Phone:
905-333-4544 ext. 19</span></font><font color="black" face="Tahoma" size="1"><span style="font-size: 7.5pt; font-family: Tahoma; color: black;" lang="EN-CA"><br>
</span></font><font color="black" face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial; color: black;" lang="EN-CA">Fax: 905-333-0455<br>
Cell:
905-320-7525</span></font><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;" lang="EN-CA"><br>
</span></font></b><strong><b><font face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial; font-weight: normal;">Email:
<a href="mailto:josh.hevenor@dpra.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">josh.hevenor@dpra.com</a></span></font></b></strong><b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; font-weight: bold;">
<br>
</span></font></b><font face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial;">Internet: <a href="http://www.dpra.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.dpra.com
</a></span></font><b><span style="font-weight: bold;"><br>
</span></b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><img src="cid:image001.jpg@01C7CF80.9B43E4F0" border="0" height="43" width="150"></span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
</span></font><strong><b><font color="silver" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: silver;">Attention:</span></font></b></strong><b><font color="silver" size="2"><span style="font-size: 10pt; color: silver; font-weight: bold;">
<br>
</span></font></b><font color="silver" size="2"><span style="font-size: 10pt; color: silver;">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.</span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
</div>
</blockquote></div><br>