During my apple iphone application, I am attempting to remove a row from an SQLite database. Following the remove statement is performed the row appears to become erased properly, but once i restart the applying the row remains. I am while using code blow to remove the record. Any idea what is the issue?

NSString *deleteSQL = [NSString stringWithFormat:@"DELETE FROM table1 WHERE actId=%d", actId];

char *errorMsg;

if (database == nil) {
	NSLog(@"ERROR db not initialized but trying to delete record!!!");
}else{
	if (sqlite3_exec(database, [deleteSQL UTF8String], NULL, NULL, &errorMsg) != SQLITE_OK){
		NSAssert1(0, @"Error updating tables: %s", errorMsg);
		sqlite3_free(errorMsg);
		return NO;
	}	
}

NSLog([NSString stringWithFormat:@"DELETE Successful"]);

I have solved this issue. Although I do not understand exactly all of the particulars. The issue was the during my 'loading code' I didn't remember to call sqlite3_finalize for that claims. Unsure why but this affected in some way future card inserts and removes. Adding sqlite3_finalize towards the data loading method reduced the problem.