List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 6 2011 1:19pm
Subject:Re: BadFieldName exception with % character
View as plain text  
On 7/6/2011 6:56 AM, Access-Dev wrote:
> If I remove the "%" character in the WHERE condition I'dont get this error

If you remove the % characters, your result set is almost certainly 
empty, so you will skip past the code that is actually causing the 
exception.

> Looks like query templating is interfering here, can I disable this
> feature ?

If you do not call Query::parse(), you do not activate the feature.  It 
is not automatic.

BadFieldName means you are asking MySQL++ to return information about a 
field by name, and the result set does not contain any information about 
the named field.

If you look at the call stack when the exception is thrown, I think you 
will find that it happens on a MySQL++ call *after* the use() or 
store().  Something like res["foo"] is a MySQL++ call, and would cause 
this symptom, since there is no "foo" column in the query.
Thread
BadFieldName exception with % characterAccess-Dev6 Jul
  • Re: BadFieldName exception with % characterWarren Young6 Jul
    • Re: BadFieldName exception with % characterAccess-Dev6 Jul
      • Re: BadFieldName exception with % characterJonathan Wakely6 Jul