DB Error: 1 "unrecognized token: ":""

网上找到http://blog.csdn.net/heihuifeng/article/details/6561615这篇文章 ,插入的字符串需加引号',

 [_db executeUpdate:[NSString stringWithFormat:@"INSERT INTO %@  (name,img,date,isCome,msg_type,message,isNew,sendFlag,personId) VALUES('%@','%@','%@','%@','%@','%@','%@','%@','%@')",userId,friendData.m_name,friendData.m_imgUrl,data.sendTime,@"1",data.textType,data.chatFileModelJson,@"1",@"3",data.entUserId]];

由于之前没有加引号。

你可能感兴趣的:(DB Error: 1 "unrecognized token: ":"")