Store png/pdf file in sqlite [duplicate]
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??)
精彩评论