dbTalk Databases Forums  

mysql++ i mysqlpp::Query problem

comp.databases.mysql comp.databases.mysql


Discuss mysql++ i mysqlpp::Query problem in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default mysql++ i mysqlpp::Query problem - 07-25-2006 , 08:24 AM






Hello all!
I've a problem with mysql++-2.1.1 examples. Compiler compiles properly
but when I create Query object program crashes (when it is running).

This constructor (creating connection) works well:

mysqlpp::Connection con("information_schema",
"localhost","root","pass",3306);

//creating new database works properly too
//con.create_db("nowa_db");

,but when I add next line (it compiles well)
mysqlpp::Query query = con.query();

program (Visual C++) shows error in sreambuf file:


virtual __CLR_OR_THIS_CALL ~basic_streambuf()
{ // destroy the object
_DELETE_CRT(_Plocale);
}


So if you have any ideas write, please
Thanks a lot.


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: mysql++ i mysqlpp::Query problem - 07-26-2006 , 05:02 AM






I found out that the problem is in destructor of Query object
When I create this dynamic:

mysqlpp::Query *and = new mysqlpp::Query(baza.query());

...and I don't use delete - program works

Other objects i.e.

mysqlpp::Result
mysqlpp::Row

have to be create dynamic too.

It seems to be a problem in destructors. Can anyone help me?

I use mysql++-2.1.1, VC++ 2005


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.