Adding data in sqlite table
I am adding data in sq lite table which i get from XML i have table with id and image
   

 when i run insert statement it gives error unrecongnised selecter send UIImage UTF8String
      
     -(IBAction)addButton{
        Coffee *coffeeObj = [[Coffee alloc] initWithPrimaryKey:0];
       coffeeObj.image = collectionImage;
    
 
      [appDelegate addCoffee:coffeeObj];

     }



           - (void) addCoffee {
 
           if(addStmt == nil) {
          const char *sql = "insert into Diary(image) Values(?)";
          if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK)
          NSAssert1(0, @"Error while creating add statement. '%s'",                   sqlite3_errmsg(database));
            }
    
        sqlite3_bind_text(addStmt, 1, [image UTF8String], -1, SQLITE_TRANSIENT);

 
       if(SQLITE_DONE != sqlite3_step(addStmt))
       NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database));
       else
      //SQLite provides a method to get the last primary key inserted by using               sqlite3_last_insert_rowid
             coffeeID = sqlite3_last_insert_rowid(database);
 
           //Reset the add statement.
           sqlite3_reset(addStmt);
          }
Adding data in sqlite table
===

I am adding data in sq lite table which i get from XML i have table with id and image
   

 when i run insert statement it gives error unrecongnised selecter send UIImage UTF8String
      
     -(IBAction)addButton{
        Coffee *coffeeObj = [[Coffee alloc] initWithPrimaryKey:0];
       coffeeObj.image = collectionImage;
    
 
      [appDelegate addCoffee:coffeeObj];

     }



           - (void) addCoffee {
 
           if(addStmt == nil) {
          const char *sql = "insert into Diary(image) Values(?)";
          if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK)
          NSAssert1(0, @"Error while creating add statement. '%s'",                   sqlite3_errmsg(database));
            }
    
        sqlite3_bind_text(addStmt, 1, [image UTF8String], -1, SQLITE_TRANSIENT);

 
       if(SQLITE_DONE != sqlite3_step(addStmt))
       NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database));
       else
      //SQLite provides a method to get the last primary key inserted by using               sqlite3_last_insert_rowid
             coffeeID = sqlite3_last_insert_rowid(database);
 
           //Reset the add statement.
           sqlite3_reset(addStmt);
          }