sqlite3 problem..need help..urgently..HELP**

Posted by summer on Stack Overflow See other posts from Stack Overflow or by summer
Published on 2010-03-15T08:48:29Z Indexed on 2010/03/15 9:09 UTC
Read the original article Hit count: 1093

- (void) hydrateDetailViewData {
//if detail view is hydrated then do not get it from database
if(isDetailViewHydrated) return;

if(detailStmt == nil) {
    const char *sql = "select snapTitle, snapDesc from Snap where snapID =?";
    if(sqlite3_prepare_v2(database, sql, -1, &detailStmt, NULL) != SQLITE_OK)
        NSAssert1(0, @"Error while creating detail view statement. '%s'", sqlite3_errmsg(database));
    NSLog(@"SQLite= %d", sqlite3_step(detailStmt)); 

}

if (sqlite3_step(detailStmt) == SQLITE_ROW)//execute sql statement on database, and make sure it executed properly.
{
    self.snapDescription = [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 1)];
}   

looking at the above code, can someone tell me what's wrong and why is it that i can't get it to load on my detailview?i basically followed the tutorial on iphone sdk article..but yet i am having this don't know why error..need help urgently because i have been at this for days!!it's driving me crazy! i can even send my project if u guys need to take a look..help please!!

Error msg: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "DetailView"' 2010-03-15 16:35:55.202 Snap2Play[58213:20b]

© Stack Overflow or respective owner

Related posts about sqlite3

Related posts about iphone