HI,
I had created the database i.e., sqlite database ... i had added the method to update the column using the following code
//Set the encrypted key
-(void)SetEncryptedKey:(NSData*)key
{
int sqlite3_busy_timeout(sqlite3*, int ms);
int a = sqlite3_busy_timeout(db, 10000000);
NSLog(@" a = %i",a);
char* err;
NSString *keystring = [[NSString alloc]initWithData:key encoding:NSASCIIStringEncoding];
NSString *sql = [NSString stringWithFormat:@"update ApplicationContext set Encryptedkey = '%@' ",keystring ];
NSLog(@"sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err) is %i",sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err));
if(sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err) != SQLITE_OK)
{
sqlite3_close(db);
NSAssert(0, @"TABL FAILED TO UPDATE ENCRYPTED KEY");
}
sqlite3_finalize(addStmt);
}
but sometimes it will crash saying sigabrt @ this line NSAssert(0, @"TABL FAILED TO UPDATE ENCRYPTED KEY");
and NSLog(@"sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err) is %i",sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err)); value is 1 it is coming...
It comes only few times //// please any one tell me what is my mistake?
0 •