  | | | Subject: Re: Problem with "mysqlpp:Result " | Subject: Re: Problem with "mysqlpp:Result " 2007-10-24 - By Guowen Han
Back There are two problems I can see. 1. there is no end control for variable i 2. res is a vector (i guess), res.at(i) will out of boundary when i is exceed the size
ALeX <logocomune@(protected)> 10/24/2007 06:29 AM
To plusplus@(protected) cc
Subject Problem with "mysqlpp:Result"
I have this little problem, if i use this code of exemple: if (res) { mysqlpp::Row row; mysqlpp::Row::size_type i; for (i = 0; row = res.at(i); ++i) { cout << '\t' << row.at(0) << endl; } } My executable stop with "This application has requested the Runtime to terminate it in an unusual way.Please contact the application's support team for more information."
I solve with this trick... if (res) { mysqlpp::Row row; mysqlpp::Row::size_type i; for (i = 0; i < res.size(); ++i){ row = res.at(i); out << '\t' << row.at(0) << endl; }
My question is why the first code rise errors?
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=ghan@(protected)
-- ---- ---- ---- ---- ---- ---- ---- --- __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ___ DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
|
|
 |