これを比較すると、NSLog に次の ling を示す文字列があり、それ以外は常に実行されます
挿入されたレコード: -1
データが指定されたテキストと等しい場合に機能させる方法
NSLog(@"%@ ",data);
if ([data isEqualToString:@"Records inserted: -1"]) {
NSString*messageShow=[NSString stringWithFormat:@"Title name %@ already been added to Library",titleNameShow];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:messageShow delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
else {
NSString*messageShow=[NSString stringWithFormat:@"%@ added to Library",titleNameShow];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:messageShow delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}