<br><font size=2 face="sans-serif">Hi,</font><font size=3> </font>
<br><font size=2 face="sans-serif">I already posted this problem on openlayers
list, but it might be a mapserver issue.</font>
<br>
<br><font size=2 face="sans-serif">OpenLayers.Control.WMSGetFeatureInfo
doesn't use the FILTER key in my mapfile. This filter is define with variables
like this:</font>
<br><font size=2 face="sans-serif">FILTER &quot;semcdc in (%SEMCDC%) and
rss in (%RSS%) and ordre in (%ORDRE%)&quot;</font><font size=3> </font><font size=2 face="sans-serif">.
</font>
<br>
<br><font size=2 face="sans-serif">The getMap request is succesfull but
not the GetFeatureInfo request<br>
<br>
Here is the request</font><font size=3> </font><font size=2 face="sans-serif">GetFeatureInfo<br>
/cgi-bin/mapserv.exe?map=MYMAP service=WMS&amp;version=1.1.0&amp;request=GetFeatureInfo&amp;layers=ecoles&amp;query_layers=ecoles&amp;styles=&amp;bbox=-8820221.560815%2C5721770.182129%2C-7587445.168853%2C6361395.234705&amp;srs=EPSG%3A900913&amp;feature_count=3000&amp;x=272&amp;y=457&amp;height=523&amp;width=1008&amp;info_format=text%2Fhtml</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Here is the response</font><font size=3> </font><font size=2 face="sans-serif"><br>
&lt;?xml version='1.0' encoding=&quot;ISO-8859-1&quot; standalone=&quot;no&quot;
?&gt;</font><font size=3> </font><font size=2 face="sans-serif"><br>
&lt;!DOCTYPE ServiceExceptionReport SYSTEM &quot;http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd&quot;&gt;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&lt;ServiceExceptionReport version=&quot;1.1.0&quot;&gt;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&lt;ServiceException&gt;</font><font size=3> </font><font size=2 face="sans-serif"><br>
prepare_database(): Query error. Error declaring cursor: ERROR: &nbsp;syntax
error at or near &amp;quot;%&amp;quot;</font><font size=3> </font><font size=2 face="sans-serif"><br>
LINE 1: ...:text from ecoles WHERE (semcdc in (%SEMCDC%) ...</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</font><font size=3>
</font><font size=2 face="sans-serif"><br>
With query string: DECLARE mycursor BINARY CURSOR FOR SELECT &amp;quot;taux_abs&amp;quot;::text,&amp;quot;nouv&amp;quot;::text,asbinary(force_collection(force_2d(geom900913)),&amp;#39;NDR&amp;#39;),id::text
from ecoles WHERE (semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre in
(%ORDRE%)) and (geom900913 &amp;amp;&amp;amp; setSRID( &amp;#39;BOX3D(-8493071.07981319
5795761.22549582,-8480841.15528974 5807991.15001926)&amp;#39;::BOX3D,900913)
)</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
&lt;/ServiceException&gt;</font><font size=3> </font><font size=2 face="sans-serif"><br>
&lt;/ServiceExceptionReport&gt;</font><font size=3> <br>
<br>
</font><font size=2 face="sans-serif">In OL, I have a WMS layer define
like this:</font><font size=3> </font><font size=2 face="sans-serif"><br>
new OpenLayers.Layer.WMS('ecoles', '.../cgi-bin/mapserv.exe?map=MYMAP',{layers:
'ecoles', transparent: &quot;true&quot;, format:&quot;image/gif&quot;,
SEMCDC:thisCDC, RSS: thisRSS, ORDRE: thisOrdre},{isBaseLayer: false, visibility:
false,singleTile:true,transitionEffect: 'resize'});</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
How should I query the layer?</font><font size=3> </font><font size=2 face="sans-serif"><br>
Thanks</font><font size=3> </font><font size=2 face="sans-serif"><br>
Steve</font><font size=3> </font><font size=2 face="sans-serif"><br>
</font><font size=3 color=#0066ff><i><br>
Steve Toutant, M. Sc.</i></font><font size=3><br>
Analyste en géomatique<br>
Secteur environnement<br>
Direction de la santé environnementale et de la toxicologie<br>
Institut national de santé publique du Québec<br>
945, avenue Wolfe<br>
Québec, Qc G1V 5B3 </font>
<p><font size=3>Tél.: (418) 650-5115 #5281<br>
Fax.: (418) 654-3144</font><font size=3 color=blue><u><br>
</u></font><a href=mailto:steve.toutant@inspq.qc.ca><font size=3 color=blue><u>steve.toutant@inspq.qc.ca</u></font></a><font size=3 color=blue><u><br>
</u></font><a href=http://www.inspq.qc.ca/><font size=3 color=blue><u>http://www.inspq.qc.ca</u></font></a><font size=3>
</font>
<br>
<br>