json文件怎么保存到sqlite数据库,将详细点,给高分!!! 80
2个回答
2014-03-05
展开全部
文件比较小就保存json字符串,文件很大就将文件路径保存至数据库。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
FOR EXAMPLE :
INSERT INTO mydatabase(NAME,ID) VALUES(
"[{"key1":"Value1","key2":"Value2","key3":"Value3","key4":"Value4",
"key5":"Value5","key6":"Value6","key7":"Value7", "key8":"Value8"},
{"key1":"Value1","key2":"Value2","key3":"Value3","key4":"Value4",
"key5":"Value5","key6":"Value6","key7":"Value7", "key8":"Value8"}]",
ID);
NSString *statement = [[NSString alloc]initWithFormat:@"INSERT INTO mydatabase(Name,ID) VALUES('%@',%d)",Name,ID];
INSERT INTO mydatabase(NAME,ID) VALUES(
"[{"key1":"Value1","key2":"Value2","key3":"Value3","key4":"Value4",
"key5":"Value5","key6":"Value6","key7":"Value7", "key8":"Value8"},
{"key1":"Value1","key2":"Value2","key3":"Value3","key4":"Value4",
"key5":"Value5","key6":"Value6","key7":"Value7", "key8":"Value8"}]",
ID);
NSString *statement = [[NSString alloc]initWithFormat:@"INSERT INTO mydatabase(Name,ID) VALUES('%@',%d)",Name,ID];
追问
代码啥意思,完整点说一下
追答
存入数据库的的语言啊,第一部分是数据库存入的语言,那个你不知道??
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询