I'm encountering an issue where once I've set an attribute filter on an ESRI personal geodatabase, I cannot clear that filter. If I pass NULL to SetAttributeFilter, the filter is internally set to "", which makes future queries return zero results instead of all rows. Examining the personal geodatabase driver code, I find:<div>
<br></div><div><div>OGRErr OGRPGeoTableLayer::SetAttributeFilter( const char *pszQuery )</div><div>{</div><div> if( (pszQuery == NULL && this->pszQuery == NULL)</div><div> || (pszQuery != NULL && this->pszQuery != NULL </div>
<div> && EQUAL(pszQuery,this->pszQuery)) )</div><div> return OGRERR_NONE;</div><div><br></div><div> CPLFree( this->pszQuery );</div><div> this->pszQuery = CPLStrdup( pszQuery );</div>
<div><br></div><div> ClearStatement();</div><div><br></div><div> return OGRERR_NONE;</div><div>}</div><div><br></div><div>Around the line, "this->pszQuery = CPLStrdup( pszQuery );" should there be an additional bit of logic that sets this->pszQuery to NULL if pszQuery is NULL? I've searched this mailing list and find no reference to this. Is there a possible work around? Thanks.</div>
<div><br></div><div><br></div><div><br></div>-- <br><a href="http://www.operationliberate.com/">http://www.operationliberate.com/</a><br>
</div>