sqlite3_step continually returns SQLITE_DONE, not SQLITE_ROW

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

  1. macrumors newbie

    Joined:
    Jul 26, 2008
    Location:
    Seoul, South Korea
    #1
    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
    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