Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

okskpark

macrumors newbie
Original poster
Jul 26, 2008
9
0
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
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)];
~~~~~
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.