From: Warren Young Date: July 24 2008 7:44am Subject: Re: Connections using MultiResultsOption List-Archive: http://lists.mysql.com/plusplus/7799 Message-Id: MIME-Version: 1.0 (Apple Message framework v928.1) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jul 23, 2008, at 1:35 AM, Nick Hastings wrote: > My understanding is that the server is defaulting to localhost, the > user > name is coming for my login username, password from my ~/.my.cnf and > the > default port 3306 is assumed. Yes. > However now I want to use mysql procedures in my queries so I added > c.set_option(new mysqlpp::MultiResultsOption( true ) ); > before tue c.connect() call. However, after doing this I found > that I am unable to connect to the database unless I explicitly define > all of server, user, password (and maybe port). I don't see why that would be the case. Options are processed immediately in set_option(), and they don't affect the connect() call's behavior. I suggest that you enable (and catch) exceptions, since they can indicate problems better, and get the problem distilled down to a single line's difference: a program that connects fine with the default options when the MultiResultsOption line is commented out, and fails with it enabled. You may want to do this to one of the examples, rather than to your own program, because they're known to be correct. If it still fails in that case, post the text of any exceptions you get.