<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Markeringsbobletekst Tegn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.MarkeringsbobletekstTegn
{mso-style-name:"Markeringsbobletekst Tegn";
mso-style-priority:99;
mso-style-link:Markeringsbobletekst;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi again,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I'm trying to access a handful of tables in an MS/SQL 2008 database, using a Mapserver as a standalone WFS server.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I'm attempting to use the OGR method, as the mssql2008 plugin fails to load for some reason.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I managed to get it to respond to GetCapabilities and DescribeTypeName request, but GetFeature requests fails completely.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>My request is as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>http://localhost/mswfs/mapserv.exe?map=WFS.map&service=WFS&version=1.0.0&request=getfeature&typename=GO_Punkter&maxfeatures=10&bbox=711500,6183000,712500,6184000<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>The layer metadata is as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>METADATA<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "ows_title" "GO_Punkter"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "ows_srs" "EPSG:25832"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "wfs_include_items" "all"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "gml_featureid" "MI_PRINX"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "wfs_enable_request" "*"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "gml_types" "auto"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> "ows_extent" "700000 6170000 720000 6190000"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>END<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>My layer is defined as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>TYPE POINT<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>STATUS ON<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>CONNECTIONTYPE OGR<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>CONNECTION "MSSQL:Server=xxxxxxxxxxxxxxxxxxxxx,1433;Database=xxxxxxxxxxxxxxxxxxxxxx;UID=xxxxxxxxx;PWD=xxxxxxx;Trusted_Connection=No;Tables=D00001_POINTS(feature);"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>The error I get in the Mapserver error log is as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>CGI Request 1 on process 6252<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `GO_Punkter'. File not found or unsupported format.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>msWFSGetFeature(): WFS server error. ms_error->code not found<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>mapserv request processing time (msLoadMap not incl.): 0.018s<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>msFreeMap(): freeing map at 01628CF8.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I read that I could debug the connection using "ogrinfo.exe -al", but that works perfectly, and returns all features:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>C:\Mapserver.640>ogrinfo -al "MSSQL:Server=xxxxxxxxxxxxxxxxxxxxx,1433;Database=xxxxxxxxxxxxxxxxxxxxxx;UID=xxxxxxxxx;PWD=xxxxxxx;Trusted_Connection=No;Tables=D00001_POINTS(feature);"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>INFO: Open of `MSSQL:Server=xxxxxxxxxxxxxxxxxxxxx,1433;Database=xxxxxxxxxxxxxxxxxxxxxx;UID=xxxxxxxxx;PWD=xxxxxxx;Trusted_Connection=No;Tables=D00001_POINTS(feature);' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> using driver `MSSQLSpatial' successful.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Layer name: D00001_POINTS<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Geometry: Unknown (any)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Feature Count: 33541<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Extent: (705463.862800, 6177660.915000) - (715176.650800, 6184543.444000)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Layer SRS WKT:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt'>PROJCS["ETRS89 / UTM zone 32N",<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt'> </span><span lang=EN-US style='font-size:10.0pt'>GEOGCS["ETRS89",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> DATUM["European_Terrestrial_Reference_System_1989",<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> SPHEROID["GRS 1980",6378137,298.257222101,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","7019"]],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> TOWGS84[0,0,0,0,0,0,0],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","6258"]],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PRIMEM["Greenwich",0,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","8901"]],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> UNIT["degree",0.0174532925199433,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","9122"]],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","4258"]],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PROJECTION["Transverse_Mercator"],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PARAMETER["latitude_of_origin",0],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PARAMETER["central_meridian",9],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PARAMETER["scale_factor",0.9996],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PARAMETER["false_easting",500000],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> PARAMETER["false_northing",0],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> UNIT["metre",1,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","9001"]],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AXIS["Easting",EAST],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AXIS["Northing",NORTH],<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> AUTHORITY["EPSG","25832"]]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>FID Column = MI_PRINX<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>Geometry Column = feature<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>valid_from: DateTime (23.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>valid_to: DateTime (23.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>sectioncode: String (50.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>element_code: String (10.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>element_subcode: String (50.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>carename: String (50.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>mi_style: String (250.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>symbology: String (8000.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>labeltext: String (250.0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>OGRFeature(D00001_POINTS):1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> valid_from (DateTime) = (null)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> valid_to (DateTime) = (null)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> sectioncode (String) = 03-001-001-009<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> element_code (String) = 7e<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> element_subcode (String) = Legeudstyr<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> carename (String) = (null)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> mi_style (String) = Symbol (36,12615935,8,"Map Symbols",0,0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> symbology (String) = (null)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'> labeltext (String) = (null)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>etc. etc.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Can anyone point me towards a solution for this issue ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Am I missing something obvious here ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='color:#1F497D;mso-fareast-language:DA'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:DA'>Kind regards / Med venlig hilsen<br>Lars I. Nielsen<br>----------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:DA'>Landinspektør, Senior GIS Programmør og Konsulent<br>Hvenegaard og Jens Bo Landinspektører A/S<br>Rugaardsvej 55, DK-5000 Odense C<br>Denmark<br>Tel. +45 6313 5050<br><a href="http://www.hvenegaard.dk/">http://www.hvenegaard.dk</a><o:p></o:p></span></p></div></div></body></html>