List:MySQL++« Previous MessageNext Message »
From:Rieu Nicolas Date:June 16 2006 8:24am
Subject:Destruction of the Connection fails
View as plain text  
I've got the same problem than mazah_82

At the end of the block, the program doesn't terminate correctly:
The program displays (cout)
But it stops before displaying 3

Here is my code:
  Connection & conn = BdParam::getConnexion(); // see later: I explain how
								// to

  // Creation de la requete à partir de la connexion
  Query query = conn.query();
  query << "select BAL_LAT "
        << "from BALISE "
        << "where BAL_PK_NOM_BALISE = '" << arNomBase << "'";
  // execution de la requete
  Result res =;


  if (res.size() > 0) {

  	Row row =;

      double l =;


How do I create the connection to the database ? :

I've got a static class "BdParam", which defines a static Connection (con)

// declaration of the connection
Connection BdParam::con=Connection(use_exceptions);

// method implementing the connection
Connection & BdParam::getConnexion() {

  return BdParam::con;

Is anyone able to notice I made a mistake or not?
Thanks a lot for replying, please.


This message contains information that may be privileged or confidential and is the
property of the Capgemini Group. It is intended only for the person to whom it is
addressed. If you are not the intended recipient,  you are not authorized to read, print,
retain, copy, disseminate,  distribute, or use this message or any part thereof. If you
receive this  message in error, please notify the sender immediately and delete all 
copies of this message.

Destruction of the Connection failsRieu Nicolas16 Jun
  • Re: Destruction of the Connection failsWarren Young17 Jun