tonyp writes:
I haven't figured out how to load a blob (e.g., image) from the shell.  I
would think there should be something like this but can't find anything:

insert into table values(file('path_to_binary_file'));

Are blobs only loadable by using SQLite from C?

Any ideas?

I, too, thought there should be something like that.
Here is the .help portion for a shell enhancement I wrote awhile ago:
.blobextract TABLE COL ROW FILE ?DB?     Extract DB blob to a file.  Table,
                         column and row must specify a blob selected by:
                         SELECT column FROM DB.table WHERE rowid = row .
                         FILE may be '-' for extraction to stdout.
.blobreplace TABLE COL ROW FILE ?DB?     Replace DB blob with file content,
                         otherwise like .blobextract except that DB blob
                         size must equal file size. (zeroblob(filesize))

--
Larry Brasfield

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

Reply via email to