sqlite3_step continually returns SQLITE_DONE, not SQLITE_ROW

Discussion in 'iOS Programming' started by okskpark, Nov 10, 2008.

  1. okskpark macrumors newbie

    Jul 26, 2008
    Seoul, South Korea
    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)];

Share This Page