![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I used ResUse as the result type and printed rows in a while loop, but wh= en I used this method in a class member function, it would abort after print= ing the lines, the codes in the function are: =20 mysqlpp::Query query =3D con.query(); mysqlpp::ResUse res; mysqlpp::Row row; =20 query << "select * from db_entry"; =20 res =3D query.use(); while (row =3D res.fetch_row()) { std::cout << row["id"] << std::endl; } =20 but it didn't abort if I just put them in main() without using class. Am= I missing any important thing? =20 |
|
--=20 Dell Inspiron 600m Pentium-M 1.6G 512MB, 60G ATI 9000 Mobility=20 |
#3
| |||
| |||
|
|
It seems that it had thrown out an "end of result" exception |
![]() |
| Thread Tools | |
| Display Modes | |
| |