[mapserver-users] SQL Server 2008 layer
Hi all Sorry for this v.basic question. Trying to load a layer from SQL 2008 R2 64bit using the msplugin_mssql2008.dll and when running shp2image it just bombs out on that layer saying neither DSN nor Server keyword supplied. Two things I can see could be the issue - accessing the plugin itself (any way to test if that is actually loaded okay?) or that the connection string is duff. The SQL instance is the default instance on the same box as the web application, I have seen various flavours of connections out there,with different starts to the string and ways to define instance. Below is what I went with PLUGIN msplugin_mssql2008.dll CONNECTION MSSQL:Server=SERVER1;uid=user1;pwd=qwerty1234;database=name1;Integrated Security=True I have the dll in the data folder for the mapfile (it does live in the mapfile folder and system32 just in case - hardwiring the path using c:\...\...\msplugin_mssql2008.dll didn't work either) I am unsure about the beginning of the connection string and the server reference (I am using the server name (as it is a default instance - works in my web apps)). Any clues much appreciated Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] SQL Server 2008 layer only partially displaying
Hi all, I have been trying to display a WMS layer from a SQL server database. Now, I managed successfully to connect to the database and some part of the layer appeared when Getmap requested but not all the polygons I should be seeing. The strange thing is every time I refresh the request different parts of the layer appear. Does anybody know why this might be? Also if I remove the Class from the Layer, nothing is displayed. Map detail below Thanks! Milen MAP NAME Spatial IMAGECOLOR 0 255 255 SIZE 600 800 IMAGETYPE png PROJECTION init=epsg:4326 #latlon on WGS84 END EXTENT 100.00 -35.00 129.00 -11.00 # lon/lat extents of WA tenements WEB IMAGEPATH /tmp/ms_tmp/ IMAGEURL /ms_tmp/ METADATA map C:/ms4w/apps/Spatial/config.map ows_schemas_location http://schemas.opengeospatial.net; ows_title Sample WMS ows_abstract Sample WMS of Spatial ows_keywordlist Spatial,WMS,Maxwell ows_onlineresource http://localhost:8080//spatial?map=C:/ms4w/apps/Spatial/config.map; wms_srs EPSG:4326 #latlon wms_feature_info_mime_type text/plain wms_feature_info_mime_type text/html wms_server_version 1.1.1 wms_formatlist image/png,image/gif,image/jpeg wms_format image/gif END #metadata END #web LAYER NAME tenements CONNECTIONTYPE PLUGIN PLUGIN C:/ms4w/Apache/specialplugins/msplugin_mssql2008.dll CONNECTION Server=.\SQL_2008;Database=LeaseCDemo2008GIS;Integrated Security=true DATA geom from dbo.WA_Tenements USING UNIQUE ID USING SRID=0 TYPE POLYGON STATUS DEFAULT METADATA ows_title tenements END #metadata PROJECTION init=epsg:4326 END EXTENT 100.00 -35.00 129.000 -11. TOLERANCE 0 MAXSCALE 1 CLASS NAME tenements STYLE COLOR 255 235 190 OUTLINECOLOR 0 0 0 END #style END #class END #Layer End #Map -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/SQL-Server-2008-layer-only-partially-displaying-tp5905621p5905621.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SQL Server 2008 layer only partially displaying
Milena, Could you inspect in the SQL Server Profiler what kind of SQL requests are happening in the subsequent requests? Best regards, Tamas 2011/1/10 Milena mgebr...@maxgeo.com Hi all, I have been trying to display a WMS layer from a SQL server database. Now, I managed successfully to connect to the database and some part of the layer appeared when Getmap requested but not all the polygons I should be seeing. The strange thing is every time I refresh the request different parts of the layer appear. Does anybody know why this might be? Also if I remove the Class from the Layer, nothing is displayed. Map detail below Thanks! Milen MAP NAME Spatial IMAGECOLOR 0 255 255 SIZE 600 800 IMAGETYPE png PROJECTION init=epsg:4326 #latlon on WGS84 END EXTENT 100.00 -35.00 129.00 -11.00 # lon/lat extents of WA tenements WEB IMAGEPATH /tmp/ms_tmp/ IMAGEURL /ms_tmp/ METADATA map C:/ms4w/apps/Spatial/config.map ows_schemas_location http://schemas.opengeospatial.net; ows_title Sample WMS ows_abstract Sample WMS of Spatial ows_keywordlist Spatial,WMS,Maxwell ows_onlineresource http://localhost:8080//spatial?map=C:/ms4w/apps/Spatial/config.map; wms_srs EPSG:4326 #latlon wms_feature_info_mime_type text/plain wms_feature_info_mime_type text/html wms_server_version 1.1.1 wms_formatlist image/png,image/gif,image/jpeg wms_format image/gif END #metadata END #web LAYER NAME tenements CONNECTIONTYPE PLUGIN PLUGIN C:/ms4w/Apache/specialplugins/msplugin_mssql2008.dll CONNECTION Server=.\SQL_2008;Database=LeaseCDemo2008GIS;Integrated Security=true DATA geom from dbo.WA_Tenements USING UNIQUE ID USING SRID=0 TYPE POLYGON STATUS DEFAULT METADATA ows_title tenements END #metadata PROJECTION init=epsg:4326 END EXTENT 100.00 -35.00 129.000 -11. TOLERANCE 0 MAXSCALE 1 CLASS NAME tenements STYLE COLOR 255 235 190 OUTLINECOLOR 0 0 0 END #style END #class END #Layer End #Map -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/SQL-Server-2008-layer-only-partially-displaying-tp5905621p5905621.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] SQL Server 2008 layer C# MapScript query help
Hi, I'm just starting out with MapServer / MapScript C#. I get Attempted to read or write protected memory when trying to retrieve the shape of the selection in a SQL Server layer. Code snippet below (adapted from example code): if (layer.queryByPoint(Map, point, mapscript.MS_SINGLE, tolerance) == (int)MS_RETURN_VALUE.MS_SUCCESS) { resultCacheObj result = layer.getResults(); if (result.numresults 0) { int shapeInd = result.getResult(0).shapeindex; layer.open(); shapeObj shape = layer.getFeature(shapeInd, -1); --Attempted to read or write protected memory string txt = ; for (int i = 0; i shape.numvalues;i++)// layer.numitems; i++) { txt += b+ layer.getItem(i) +: /b; txt += + shape.getValue(i) + br/; } etc. Additional notes: * the tolerance 0 * IIS 5 * using latest build (MSVC2008 (Win32) -stable release-1500-gdal-1-6-mapserver-5-6.zip) DLLs (including msplugin_mssql2008.dll) * VS 2008 project * the SQL Server layer geometry is points draws without problems * code works for other layers in may map Additional issue: When doing a queryByShape on the SQL Server layer and try drawQuery on the map I get Image handling error. Failed to draw layer... Am doing something wrong - is this the correct way of going about querying visualizing? Is what I trying to do possible with SQL Server layers? Any help/pointers appreciated. Thanks Will ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users