List:MySQL++« Previous MessageNext Message »
From:Rieu Nicolas Date:July 12 2006 5:23pm
Subject:Problem of memory with Row ???
View as plain text  
Hello all.

 

The following program (very simple) crashes at the first time it achieves
the end (}) of the block < for > 

------------------------------------------------------

Connection conn ("database","host","user","password");

 

Query query = conn.query();

query << "SELECT * FROM table ";

   

Result res = query.store();

 

if (res.size() > 0) {

  cout<<"res.size(): "<<res.size()<<endl;

 

  for (int cpt = 0; cpt < res.size(); cpt++) {

  cout<<"cpt : "<<cpt<<endl;

 

  Row row = res.at(cpt);

 

  }

}

----------------------------------

Result of execution :

 

Res.size() : 6

cpt: 0

 

----- it crashes and doesn't display cpt: 1, cpt: 2 .. ------

It seems to be a problem of freezing memory with < row > ???

 

Can you help me please ???

Did it happen to anyone else ?

 

Nicolas Rieu.



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.


Thread
Problem of memory with Row ???Rieu Nicolas12 Jul
  • RE: Problem of memory with Row ???Rieu Nicolas12 Jul
  • Re: Problem of memory with Row ???Warren Young18 Jul
    • RE: Problem of memory with Row ???Rieu Nicolas20 Jul
      • Re: Problem of memory with Row ???Warren Young21 Jul
      • SOLVED: Problem of memory with Row ???Rieu Nicolas14 Sep