chandan wrote:
>   I would like to know how to store images inside a SQLite database
> using the SQLite command line program.

You can't, really. You'd have to write your own application to handle 
such BLOBs.

> consider the following example:
>
> create table img_tbl (
>   img_id int primary key,
>   img blob);
>
> In the above case how do I use the SQL "insert" statement to store
> images into the "img" column?

Well, the syntax you could use in sqlite3 command line utility is

insert into img_tbl(img) values(x'1234ABCD...')

where the value in parentheses is the contents of the file represented 
in hex. This is, of course, impractical except for very small blobs. 
That's why you need to write your own program to do that, using SQLite 
API.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to