<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Geometry_columns</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello all</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Wrote a few days ago but did not get any replay so I try again.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I upgradede mapserver from 4.8.4 to version 5.2 and gdal from 1.3.2. to 1.5.2</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Now I get this error </FONT>
<BR><FONT SIZE=2 FACE="Courier New">Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named 'ODBC'. in c:\inetpub\wwwroot\jar3\xmlkort.php on line 591</FONT></P>
<P><FONT SIZE=2 FACE="Courier New">Warning: [MapServer Error]: msOGRFileNextShape(): No column definitions found for table 'test', layer not usable. in c:\inetpub\wwwroot\jar3\xmlkort.php on line 591 Fatal error: Call to a member function on a non-object in c:\inetpub\wwwroot\jar3\xmlkort.php on line 621</FONT></P>
<P><FONT SIZE=2 FACE="Courier New">I found out that I had a row i geometry_columns that did not have a view with that name, this was not a problem in mapserver 4.8.4</FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Courier New">found in mapogr.cpp</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">static</FONT><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">int</FONT><FONT SIZE=2 FACE="Courier New"> </FONT>
<BR><FONT SIZE=2 FACE="Courier New">msOGRFileNextShape(layerObj *layer, shapeObj *shape,</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> msOGRFileInfo *psInfo )</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">that this code has been changed</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">***** cut out *****</FONT>
<BR><FONT SIZE=2 FACE="Courier New">**** from 5.2 ****</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">if</FONT><FONT SIZE=2 FACE="Courier New">( (hFeature = OGR_L_GetNextFeature( psInfo->hLayer )) == NULL )</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">if</FONT><FONT SIZE=2 FACE="Courier New">( CPLGetLastErrorType() == CE_Failure )</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> msSetError(MS_OGRERR, </FONT><FONT COLOR="#800000" SIZE=2 FACE="Courier New">"%s"</FONT><FONT SIZE=2 FACE="Courier New">, </FONT><FONT COLOR="#800000" SIZE=2 FACE="Courier New">"msOGRFileNextShape()"</FONT><FONT SIZE=2 FACE="Courier New">,</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> CPLGetLastErrorMsg() );</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> RELEASE_OGR_LOCK;</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">return</FONT><FONT SIZE=2 FACE="Courier New"> MS_FAILURE;</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">else</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> RELEASE_OGR_LOCK;</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">if</FONT><FONT SIZE=2 FACE="Courier New"> (layer->debug >= MS_DEBUGLEVEL_VV)</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> msDebug(</FONT><FONT COLOR="#800000" SIZE=2 FACE="Courier New">"msOGRFileNextShape: Returning MS_DONE (no more shapes)\n"</FONT><FONT SIZE=2 FACE="Courier New"> );</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">return</FONT><FONT SIZE=2 FACE="Courier New"> MS_DONE; </FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">// No more features to read</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">***** cut out *****</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Courier New">***** cut out *****</FONT>
<BR><FONT SIZE=2 FACE="Courier New">*** from 4.8.4 ****</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">if</FONT><FONT SIZE=2 FACE="Courier New">( (poFeature = psInfo->poLayer->GetNextFeature()) == NULL )</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">return</FONT><FONT SIZE=2 FACE="Courier New"> MS_DONE; </FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">// No more features to read</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">***** cut out *****</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Courier New">do you see any problem in changing the code to </FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">if</FONT><FONT SIZE=2 FACE="Courier New">( (hFeature = OGR_L_GetNextFeature( psInfo->hLayer )) == NULL )</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">return</FONT><FONT SIZE=2 FACE="Courier New"> MS_DONE; </FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">// No more features to read</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
<BR><FONT SIZE=2 FACE="Courier New">so that it doesnot check all rows in geometry_columns</FONT>
<BR><FONT SIZE=2 FACE="Courier New">and is there a reason why all rows in geometry_columns should have a matching view ?</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Jeppe Lund Andersen</FONT>
</P>
</BODY>
</HTML>