ODBC for SQL Server 2000 not working

Steve White swhite at URGTECH.CO.UK
Fri Nov 17 10:21:40 EST 2006


Further investigations using SQL Profiler shows that it is hitting the DB
and running the command.

However, I still get this error msg on the map:

msOGRFileNextShape(): OGR error. SetAttributeFilter() not supported on
ExecuteSQL() results.

This happens for GetMap and GetFeatureInfo requests.

Any clues on what's going wrong?

Thanks,
Steve

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Steve White
Sent: 17 November 2006 14:49
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] ODBC for SQL Server 2000 not working

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
 

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

-- 
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