On 2016/04/28 8:27 PM, deltagamma1 at gmx.net wrote: > What is a convenient way to store the path from a external blob (jpg, > pdf) ? > How can I retrieve this blob ? > Is there a Frontend which opens the jpg directly from the listed > table-content ? > > If I store the blob directly in the sqlite, is there a way to open the > blob directly with the respective programm (e.g. irfanview or a pdf with > acroread) ? I just discovered recently sqlitespeed, but do not know how > to handle the problems described above.
A blob is just a set of bytes to the DB engine, it usually knows nothing about what those bytes represent. Some DB admin tools or GUIs may include ways to display the bytes (if they can detect that they are some standard format). Some other programs, such as Irfanview, might happily display images from a DB, but it would likely need a very specific schema to go on. Typically, you would be writing a program that uses the SQLite API to store blobs and retrieve them from some byte or stream you choose, into and from the formats you choose. What I do is save both the blob and the file name (and perhaps the original path if you want to treat it as a backup) in separate columns (fields) and then, once I would like to open it, I just recreate the file (in whatever destination I would like, the TEMP folder is a good idea) with the correct file name, and then execute/open it - which should have your system open it with whatever program is registered to open such a file. SQLite is not really concerned with what is in your blobs - just how to best store and retrieve them. Your program can do all kinds of magic with the blobs and SQLite will ensure you can save and load them fast and easy. Best of luck, Ryan