List:MySQL++« Previous MessageNext Message »
From:Nick Hastings Date:July 23 2008 7:35am
Subject:Connections using MultiResultsOption
View as plain text  
Hi all,

first, in case it is relevant, some info about my setup: I'm running
Debian unstable and corresponding MySQL v5.0 and mysqlpp v3.0 packages.

I have been happily connecting to my database without explicitly
specifying anything other than the database name:

eg.

mysqlpp::Connection c(false);
const char* db = "bm";
const char* server = 0;
const char* user = 0;
const char* password = 0;
unsigned int port = 0;
c.connect( db, server, user,  password, port );


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.

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 really would prefer to have these parameters automagically determined
as was the happening before I introduced MultiResultsOption.

I've googled and been able to find nothing on this topic. 
Does anyone know where I should look to find out how to solve this
problem? Of better yet, does anyone already know a solution?

TIA,

Nick.
Thread
Connections using MultiResultsOptionNick Hastings24 Jul
  • Re: Connections using MultiResultsOptionWarren Young24 Jul
    • Re: Connections using MultiResultsOptionNick Hastings24 Jul
      • Re: Connections using MultiResultsOptionNick Hastings25 Jul
        • Re: Connections using MultiResultsOptionWarren Young27 Nov
          • Re: Connections using MultiResultsOptionNick Hastings27 Nov