sqlite - ios 二进制数据存储数据库问题求助
黄舟
黄舟 2017-04-17 11:12:24
0
2
692
NSString *insertSQL = [[NSString alloc] initWithFormat:@"insert into weiguanjia collection values data"];

如果要存储data数据这条sql语句应该怎样写啊这样写不对啊求助

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
伊谢尔伦

sqlite3_bind_blob(insertstmt, 10, [Data bytes], [Data length], SQLITE_TRANSIENT);

Different databases have different interfaces. For sqlite, just make a bind like this. The sql statement is written normally

巴扎黑

Putting large blobs into sqlite will greatly increase the footprint. It is recommended to add a path field, use the field name primary key as the file name, write the blob as a physical file, and only store a path in the database

And if you want us to help you, at least don’t write the code without parentheses

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template