こんにちは、sqlite データベースのレコードを更新するために update ステートメントを使用しています。私のコードで何が間違っているのか教えてください。どこが間違っているのか理解できません。私は以下のコードを使用しています
sqlite3 *database;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0];
NSString *filePath = [documentsPath stringByAppendingPathComponent:@"Notes.sqlite"];
sqlite3_stmt *updateStmt = nil;
if(sqlite3_open([filePath UTF8String], &database) == SQLITE_OK)
{
const char *sql = [[NSString stringWithFormat:@"update Notess Set Name=? Where NoteId = %@",_notesId] UTF8String];
if(sqlite3_prepare_v2(database, sql, -1, &updateStmt, NULL) != SQLITE_OK)
NSLog(@"Error while creating update statement. %s", sqlite3_errmsg(database));
}else{
}
sqlite3_bind_text(updateStmt, 1, [textVew.text UTF8String], -1, SQLITE_TRANSIENT);
sqlite3_finalize(updateStmt);
sqlite3_close(database);