List:MySQL++« Previous MessageNext Message »
From:Attila Date:January 16 2009 8:10pm
Subject:Re: Connect exception
View as plain text  
Thanks, I actually decided to destroy the connection object and recreate :)

I read somewhere in the documentation that a second call to connect() will
disconnect the connection and reconnect.

This is not true, because it will cause the exception (even without
explicitly calling disconnect())


On Fri, Jan 16, 2009 at 3:01 PM, Warren Young <mysqlpp@stripped> wrote:

> Attila wrote:
>> Any ideas why I would get a problem with calling connect() ?
> disconnect() is all but destroying the working bits underlying the
> Connection object, on the theory that you're not going to use it again.  It
> wouldn't be hard to change DBDriver::connect() to rebuild these things
> (mysql_init(), etc.) if it sees that they've been wiped out by a
> disconnect() call.  Patches thoughtfully considered.
> Alternately, you can do as most people seem to do, which is destroy the
> Connection object and create a new one.  Same effect, while avoiding this
> limitation.
> --
> MySQL++ Mailing List
> For list archives:
> To unsubscribe:

Software Developer

Connect exceptionAttila16 Jan
  • Re: Connect exceptionWarren Young16 Jan
    • Re: Connect exceptionAttila16 Jan