On 8/22/05, ZeeGeek <zeegeek@stripped> wrote:
> I used ResUse as the result type and printed rows in a while loop, but when
> I used this method in a class member function, it would abort after printing
> the lines, the codes in the function are:
>
> mysqlpp::Query query = con.query();
> mysqlpp::ResUse res;
> mysqlpp::Row row;
>
> query << "select * from db_entry";
>
> res = query.use();
> while (row = res.fetch_row()) {
> std::cout << row["id"] << std::endl;
> }
>
> but it didn't abort if I just put them in main() without using class. Am I
> missing any important thing?
>
It seems that it had thrown out an "end of result" exception and I
didn't catch it so it aborted, but I still don't know why it just
happened when in class member functions.
> --
> Dell Inspiron 600m
> Pentium-M 1.6G
> 512MB, 60G
> ATI 9000 Mobility
--
Dell Inspiron 600m
Pentium-M 1.6G
512MB, 60G
ATI 9000 Mobility