C++/SQLite only outputting one row of data

前端 未结 1 618
闹比i
闹比i 2021-01-28 02:19

I\'m having an issue where only one of my 5 test rows will output in C++. My code is:

#include 
#include 
#include 

        
相关标签:
1条回答
  • 2021-01-28 03:02

    Just return 0 in the end of exec function

    Explanation:

    In function 'exec" when it return nothing, the database server acts like the function is terminated by somehow (like something corrupt the function and made an error) so it just stop sending data because the call back function terminated with an error.... so when we return 0 we say that the function "exec" is working normally so it keeps sending data ... and if you return any other integer it will deal with it like the function terminated by an error and stop sending data. I faced the same issue and I solved it by making the callback function (exec) return 0.

    0 讨论(0)
提交回复
热议问题