@Hector
- (void)saveImage {
sqlite3_stmt *compiledStmt;
sqlite3 *db;
if(sqlite3_open([dbPath UTF8String], &db)==SQLITE_OK){
const char *insertSQL="insert into Image(Image) VALUES(?)";
if(sqlite3_prepare_v2(db,insertSQL, -1, &compiledStmt, NULL) == SQLITE_OK){
UIImage *image = [UIImage imageNamed:@"farmhouse.png"];
NSData *imageData=UIImagePNGRepresentation(image);
sqlite3_bind_blob(compiledStmt, 1, [imageData bytes], [imageData length], SQLITE_TRANSIENT);
sqlite3_step(compiledStmt);
char *errMsg;