-(void)updateStaff:(DataBaseFields*)databasefields
{
if(stfupdateStmt == nil) {
const char *sql = "update FoodBlogger Set update_date_time = ?, Stf_Mgr_Image = ?, Stf_Mgr_Text = ?, Stf_Srvr_Image = ?, Stf_Chf_Image = ?, Stf_Owr_Image= ? Where insert_date_time = ?";
if(sqlite3_prepare_v2(database, sql, -1, &stfupdateStmt, NULL) != SQLITE_OK)
NSAssert1(0, @"Error while creating update statement. '%s'", sqlite3_errmsg(database));
}
sqlite3_bind_text(stfupdateStmt, 1, [databasefields.update_datetime UTF8String], -1, SQLITE_TRANSIENT);
sqlite3_bind_blob(stfupdateStmt, 2, [databasefields.mgrImage bytes], [databasefields.mgrImage length], SQLITE_TRANSIENT);
sqlite3_bind_blob(stfupdateStmt, 3, [databasefields.srvrImage bytes], [databasefields.srvrImage length], SQLITE_TRANSIENT);
sqlite3_bind_blob(stfupdateStmt, 4, [databasefields.chfImage bytes], [databasefields.chfImage length], SQLITE_TRANSIENT);
sqlite3_bind_blob(stfupdateStmt, 5, [databasefields.owrImage bytes], [databasefields.owrImage length], SQLITE_TRANSIENT);
sqlite3_bind_text(stfupdateStmt, 6, [databasefields.insert_datetime UTF8String], -1, SQLITE_TRANSIENT);
if(SQLITE_DONE != sqlite3_step(stfupdateStmt))
NSAssert1(0, @"Error while updating. '%s'", sqlite3_errmsg(database));
sqlite3_reset(stfupdateStmt);
}
数据库类型中的图像变量是varchar.Before 2个视图正常工作。但是这个视图不起作用。所以请帮我解决这个问题。