trying to compile getting error Xcode
===

working with this tutorial, 

http://www.iphonesdkarticles.com/2008/10/sqlite-tutorial-selecting-data.html

trying to connect to DB, but I get stuck on this point:

    #import "ToDos.h"
    #import "AppDelegate.h"
    
    static sqlite3 *database = nil;
    
    @implementation ToDos
    @synthesize todoID, title, descr, isDirty, isDetailViewHydrated;
    
    - (void) dealloc    {
    
    }
    
    + (void) getInitialDataToDisplay:(NSString *)dbPath {
        
    	AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    
    	if (sqlite3_open([dbPath UTF8String], database) == SQLITE_OK) {
    		
    //		const char *sql = "select * from todos";
    //		sqlite3_stmt *selectstmt;
    //		if(sqlite3_prepare_v2(database, sql, -1, &selectstmt, NULL) == SQLITE_OK) {
    //			
    //			while(sqlite3_step(selectstmt) == SQLITE_ROW) {
    //				
    //				NSInteger primaryKey = sqlite3_column_int(selectstmt, 0);
    //				ToDos *coffeeObj = [[ToDos alloc] initWithPrimaryKey:primaryKey];
    //				coffeeObj.title = [NSString stringWithUTF8String:(char *)sqlite3_column_text(selectstmt, 1)];
    //				
    //				coffeeObj.isDirty = NO;
    //				
    //				[appDelegate.todosArray addObject:coffeeObj];
    //				// [coffeeObj release];
    //			}
    //		}
    	}
    	else
    		sqlite3_close(database); //Even though the open call failed, close the database connection to release all the memory.
    }
    
    - (id) initWithPrimaryKey:(NSInteger) pk {
        // [super init];
        todoID = pk;
        
        isDetailViewHydrated = NO;
        
        return self;
    }
    
    @end


The problem seams to be in pointer....

static sqlite3 *database = nil;

and

if (sqlite3_open([dbPath UTF8String], database) == SQLITE_OK) {

but here is the error message while trying to start the app

![enter image description here][1]

The same code is in the tutorial an it works :)

  [1]: http://i.stack.imgur.com/G2Lz1.png