[mapserver-users] Re: Getfeatureinfo and MSsql 2008 server

James Perrins james.perrins at gmail.com
Fri Mar 5 05:11:07 PST 2010


Don't know if this is relevant - but it seems related:

GetFeatureInfo requests returning a service exception (with no
details) using MapServer 5.6 against SQL Server data (WKT).

A significant factor seems to be having more than one layer based on
the same SQL view and using the same geometry field. This causes it to
go bananas and request the wrong stuff. I’ve wired each layer to its
own view and all works fine ?



Also, this setting used to be required I believe: CONFIG "ODBC_OGR_FID" "UID"
But now it just errors - so best left out !




On Tue, Mar 2, 2010 at 11:01 PM, Tamas Szekeres <szekerest at gmail.com> wrote:
> Paul
>
> It would be helpful to have some test data to reproduce your problem.
>
> In the meantime I've found an issue with regards of the query handling in
> the sql2008 driver and working on a fix right now, however I'm not sure if
> it is related to the problem of yours.
>
> Best regards,
>
> Tamas
>
>
> 2010/3/2 Paul james <pauljame at gmail.com>
>>
>> Hi ...
>>
>> I have the same error here using Getfeature and Mssql2008... Works fine
>> with Postgis connection ...
>>
>> My last test was using Getfeature with a Point Layer... The message
>> returned was :
>>
>> Content-type: application/vnd.ogc.se_xml
>>
>> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
>> <!DOCTYPE ServiceExceptionReport SYSTEM
>> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
>> <ServiceExceptionReport version="1.1.1">
>> <ServiceException>
>> </ServiceException>
>> </ServiceExceptionReport>
>>
>> No error reported using DEBUG mode...
>>
>> The query generated was :
>>
>> SELECT convert(varchar(max), oid),convert(varchar(max),
>> id),the_geom.STAsBinary(),convert(varchar(20), oid) from viw_test WHERE
>> the_geom.STIntersects(Geometry::STGeomFromText('POLYGON((-62.4340041752662
>> -11.1071026733531,-61.8187697837838 -11.1071026733531,-61.8187697837838
>> -10.4918682818707,-62.4340041752662 -10.4918682818707,-62.4340041752662
>> -11.1071026733531))',0)) = 1
>>
>> That query executed in Analyser return the right result:
>> 0x010100000000917EFB3A104FC061A6ED5F598925C0
>>
>> Using CGI NQuery also doesnt work, returning :
>> Content-type: text/html
>>
>> If you need more details, let me know...
>>
>> Paul
>>
>>
>>
>> On Tue, Mar 2, 2010 at 5:34 AM, Afroz Kannancheri <afrozk at gmail.com>
>> wrote:
>>>
>>> Dear Tamas,
>>>  Heres the debug log obtained when i clicked on the polygon
>>>
>>> [Tue Mar 02 12:28:47 2010].113000 msMSSQL2008LayerOpen called
>>> datastatement:
>>> geom from region1 USING UNIQUE id USING SRID=4326
>>> [Tue Mar 02 12:28:47 2010].113000 MSMSSQL2008LayerOpen -- shared
>>> connection
>>> not available.
>>> [Tue Mar 02 12:28:47 2010].957000
>>>
>>> msConnPoolRegister(region1,server=3.254.254.34;uid=sa;pwd=pwd;database=map;Integrated
>>> Security=false,01E39FC0)
>>> [Tue Mar 02 12:28:47 2010].957000 msMSSQL2008LayerParseData: unique
>>> column =
>>> id, srid='4326', geom_column_name = geom, table_name=region1
>>> [Tue Mar 02 12:28:47 2010].957000 msMSSQL2008LayerFreeItemInfo called
>>> [Tue Mar 02 12:28:47 2010].957000 in msMSSQL2008LayerGetItems  (find
>>> column
>>> names)
>>> [Tue Mar 02 12:28:48 2010].113000 msMSSQL2008LayerInitItemInfo called
>>> [Tue Mar 02 12:28:48 2010].113000 msMSSQL2008LayerInitItemInfo called
>>> [Tue Mar 02 12:28:48 2010].113000 msMSSQL2008LayerWhichShapes called
>>> [Tue Mar 02 12:28:48 2010].113000 query_string_temp:SELECT
>>> convert(varchar(max), ID),convert(varchar(max),
>>> name),convert(varchar(max),
>>> flag1),convert(varchar(max), flag2),convert(varchar(max),
>>> flag3),geom.STAsBinary(),convert(varchar(20), id) from region1 WHERE
>>> geom.STIntersects(Geometry::STGeomFromText('POLYGON((55.4843749962207
>>> -4.59960928778372,56.5390624973545 -4.59960928778372,56.5390624973545
>>> -3.54492178664993,55.4843749962207 -3.54492178664993,55.4843749962207
>>> -4.59960928778372))',4326)) = 1
>>> [Tue Mar 02 12:28:48 2010].394000 msMSSQL2008LayerClose datastatement:
>>> geom
>>> from region1 USING UNIQUE id USING SRID=4326
>>> [Tue Mar 02 12:28:48 2010].394000
>>>
>>> msConnPoolRelease(region1,server=3.254.254.34;uid=sa;pwd=pwd;database=map;Integrated
>>> Security=false,01E39FC0)
>>> [Tue Mar 02 12:28:48 2010].394000
>>>
>>> msConnPoolClose(server=3.254.254.34;uid=sa;pwd=pwd;database=map;Integrated
>>> Security=false,01E39FC0)
>>> [Tue Mar 02 12:28:48 2010].410000 freeLayer(): freeing layer at 01E15180.
>>>
>>> Thnx
>>> Afroz
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/Getfeatureinfo-and-MSsql-2008-server-tp4631781p4659685.html
>>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



-- 
Dr James Perrins
exeGesIS SDM Ltd
Great House Barn
New Street, Talgarth
Powys LD3 0AH.
Direct Line: 01646 686650
Tel: 01874 711145
Fax: 01874 711156
Email: JamesP at esdm.co.uk

This E-mail and any files transmitted with it are private and intended
solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient, the E-mail and any
files have been transmitted to you in error and any copying,
distribution or other use of the information contained in them is
strictly prohibited.

Nothing in this E-mail message amounts to a contractual or other legal
commitment on the part of exeGesIS SDM Ltd unless confirmed by a
signed communication.

exeGesIS SDM Ltd will make every effort to keep its network free of
viruses. However, the recipient of this message will need to scan this
message, and any attachments, for viruses, as exeGesIS SDM Ltd can
take no responsibility for any computer virus that might be
transferred by this e-mail.



More information about the MapServer-users mailing list