List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 20 2009 3:05pm
Subject:Re: problem when calling mysqlpp connection object connect function after calling disconnect
View as plain text  
On May 20, 2009, at 9:04 AM, Warren Young wrote:

> See the attached patch.

Grrr, this list and attachments...

Inline this time:

Index: examples/dbinfo.cpp
===================================================================
--- examples/dbinfo.cpp	(revision 2515)
+++ examples/dbinfo.cpp	(working copy)
@@ -170,10 +170,22 @@

  	try {
  		// Connect to server, then dump a bunch of stuff we find on it
+		cout << "Up..." << endl;
  		mysqlpp::Connection con(mysqlpp::examples::db_name,
  				cmdline.server(), cmdline.user(), cmdline.pass());
+		cout << "down..." << endl;
+		con.disconnect();
+		cout << "and up again..." << endl;
+		con.connect(mysqlpp::examples::db_name,
+				cmdline.server(), cmdline.user(), cmdline.pass());
+		cout << "Here we go!" << endl;
  		show_mysql_version(con);
  		show_databases(con);
+		cout << "\nBouncing again..." << endl;
+		con.disconnect();
+		con.connect(mysqlpp::examples::db_name,
+				cmdline.server(), cmdline.user(), cmdline.pass());
+		cout << "And last stage!" << endl;
  		show_tables(con);
  	}
  	catch (const mysqlpp::BadQuery& er) {

Thread
problem when calling mysqlpp connection object connect function after calling disconnectDave Hall20 May
  • Re: problem when calling mysqlpp connection object connect function after calling disconnectWarren Young20 May
    • Re: problem when calling mysqlpp connection object connect function after calling disconnectWarren Young20 May