ODBC for SQL Server 2000 not working

Steve White swhite at URGTECH.CO.UK
Fri Nov 17 09:48:54 EST 2006


I'm running SQL Server 2000 on a windows 2003 box. I've created an ovf file
and tested that it returns data, all good.
When I try to use this in my mapfile it doesn't return anything.

LAYER
	NAME 				Test
	TYPE				POINT
	LABELCACHE 			ON
	CONNECTIONTYPE		OGR
	CONNECTION			"<OGRVRTDataSource>
					    <OGRVRTLayer name='test'>
	
<SrcDataSource>ODBC:user/pwd at DSNName</SrcDataSource> 
					 	<SrcSQL>EXEC
GM_GetSingleRecord 2076</SrcSQL> 
	
<GeometryType>wkbPoint</GeometryType> 
					        <LayerSRS>WGS84</LayerSRS>
						<GeometryField
encoding='PointFromColumns' y='Latitude' x='Longitude'/> 
					    </OGRVRTLayer>
					</OGRVRTDataSource>"
	METADATA
        "wms_title"			"test"
    	"gml_include_items" "all"
    	"wms_include_items" "all"
    END

	PROJECTION
		"init=epsg:4326"
	END

	STATUS				ON
	DATA 				"test"
	TEMPLATE
"E:\Inetpub\wwwroot\Map\Data\test_query_template.html"
	CLASS
		SYMBOL 'circle'
		SIZE 7 
		COLOR 			0 0 0
		METADATA

		 "wms_feature_info_mime_type" "text/html"

        END # end of class metadata

    TEMPLATE
"E:\Inetpub\wwwroot\Map\Data\test_query_template.html"

  END # end of class

END #end of layer

It's almost as if mapserver can't use my system DSN.

If I fire a GetFeatureInfo request on that layer I get this error:
msOGRFileNextShape(): OGR error. SetAttributeFilter() not supported on
ExecuteSQL() results.

I'm running out of ideas on this.

Can anyone help me out?

Thanks,
Steve

-- 
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.431 / Virus Database: 268.14.6/536 - Release Date: 16/11/2006
15:51
 



More information about the mapserver-users mailing list