-1
有插入图像与其他领域的代码:无法将图像添加到sqlite数据库?
UIImage *image1 = [UIImage imageNamed:@"recette.jpg"];
NSData *image2 = UIImagePNGRepresentation(image1);
if (sqlite3_open(dbpath, &contactDB) == SQLITE_OK)
{
NSString *insertSQL = [NSString stringWithFormat: @"INSERT INTO CONTACTS (name, address, phone,image) VALUES (\"%@\", \"%@\", \"%@\", \"%@\")", name.text, address.text, phone.text,image2];
认为
我什么都没有丢失,因为它的工作原理没有像我只是放一些代码来解释,这不是整个代码 – user1426954