开发者

Store png/pdf file in sqlite [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

Reading and writing images to an SQLite DB for iPhone use

How to store pdf,png file in sqlite.

is this possible to store pdf and png file?

Please help me out.

if you have 开发者_StackOverflow中文版any idea please share with me.

Thanks you,


There is a BLOB data type so I guess you can:

http://www.sqlite.org/datatype3.html


You can store a PDF or PNG file in a BLOB field.

first create the table

create table Blubber ( PK int primary key , BITSINK blob );

then use insert to add the data.

insert into Blubber (PK,BITSINK) 
values (1, 'your blob goes here, best to use bind variables though!');

Tell us what language you are using for advice how to use bind variable.

EDIT just saw this is taged iPhone, the language would be the appropriate C dialect (objective c??)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜