View Full Version : sqlite3_step continually returns SQLITE_DONE, not SQLITE_ROW

Nov 10, 2008, 08:07 PM
I put my sql file to Resource folder.
And I checked there is few data through the terminal.
But sqlite3_step never give SQLITE_ROW. :confused:
Now I don't know what I have to do.

help me, plz.

here is my code

if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) {
#pragma mark [[money part]]
const char *moneySqlStatement = "SELECT * FROM money";
sqlite3_stmt *compiledStatement;

if(sqlite3_prepare_v2(database, moneySqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
while( sqlite3_step(compiledStatement) == SQLITE_ROW) {
NSString *mTitle = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];