List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 18 2010 12:53am
Subject:Re: Detecting errors executing SQL queries
View as plain text  
On 6/10/2009 2:54 AM, Warren Young wrote:
> Martin Dubuc wrote:
>> I expected that the !query would work, but the
>> compiler must do something special because the !query doesn't work.
>
> This behavior is very weird. It must be going through some other
> conversion path, perhaps one inherited from std::ostream.

For the archives, it was due to basic_ios::operator!().  MySQL++ 3.1 
overrides this with Query::operator!(), which fixes this.

Incidentally, this works in MySQL++ 3.0:

	if (query) { ...

It's because that calls Query::operator void*() instead of 
basic_ios::operator!().
Thread
Detecting errors executing SQL queriesMartin Dubuc5 Jun
  • Re: Detecting errors executing SQL queriesWarren Young6 Jun
    • Re: Detecting errors executing SQL queriesMartin Dubuc8 Jun
      • Re: Detecting errors executing SQL queriesWarren Young8 Jun
        • Re: Detecting errors executing SQL queriesMartin Dubuc9 Jun
          • Re: Detecting errors executing SQL queriesWarren Young10 Jun
            • Re: Detecting errors executing SQL queriesWarren Young18 May