<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>

I came across a problem while using python mapscript's queryByAttribute
function. I have a layer containing the fieldname "STATE" amongst
others. Issuing:
<BR>
<pre class="wiki">try:<br>   layer.queryByAttribute(map,"STA","AZ",MS_MULTIPLE)<br>except:<br>   print "attribute error"<br>   pass<br></pre>
By now the mapserver exception is caught for the faulty attribute. If a draw function is now issued:
<BR>
<pre class="wiki">map.draw()<br></pre>
The following error occurs:
<BR>
<pre class="wiki">&lt;class '_mapscript.MapServerError'&gt;: msDrawMap(): Image handling error. Failed to draw layer named 'countries'. msDBFGetItemIndex(): DBASE file error. Item 'STA' not found.<br></pre>I reproduced it many times and in many occasions. I tried to
clear any result cache but in vain. Shouldn;t mapserver handle the
situation more logically?
<BR><br /><hr />Windows Live Hotmail now works up to 70% faster. <a href='http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008' target='_new'>Sign up today.</a></body>
</html>