i save an image in Database. i am trying to get the image and export it into a CSV file. I use following code to convert into string but it returns null.
int length = sqlite3_column_bytes(compiledStatement, i);
NSData *img =[NSData dataWithBytes:sqlite3_column_blob(compiledStatement, i) length:length];
text = [[NSString alloc] initWithData:img encoding:NSUTF8StringEncoding];
NSLog(@"ColName : %@, TEXT : %@",colName, text); //Text displayed is (NULL)
when i am saving the image, i convert the image to NSData and then insert it in database column. The datatype of column, in which image is saved, is "blob".
Thanks in advance.