Subject Re: [IBO] Blob fields and storing files w/pseudo directory structure
Author Dany M
Daniel Rail wrote:
> Hi,
> At March 26, 2006, 1:06 AM, Jason Wharton wrote:
>> I don't recommend that you store files in blobs. I do it occasionally but
>> its awkward and it bloats your database size and makes doing backups slow
>> and cumbersome.
> But, it depends on the application. If you need to be able to have a
> remote connection or that your application is setup in an environment
> where the users don't have access to the server other than through
> Firebird. The way that we do it for document management and not bloat
> up dramatically the database, we zip the files to store them.

Yes - I was just going to write a comment in that effect. My client have
different servers (win/linux) and different VPN and firewall solutions.

Anyway - here another comment that I wrote but it's a bit confused :)

And, might I add, if you decide to use OLE don't redo my mistake and
trust windows to automagically open/save the contained file. OLE does
not store what file type it is! It works only for some applications and
there is difficulties when you want to just save the file (like mail all
the files belonging to...). It also depends on what application is
installed on the particular workstation. Plus a computer or app that is
OLE 1 compliant only creates a "package" that seems to be impossible to
decode without actually starting the application (been to MSDN and
googled a lot and other people seem to arrive to this conclusion).

The Open and View "verbs" are not available for all application types
and often View is the same as Open so in a serious document handling
system there is no foolproof way of opening a file for viewing only and
indicating this to the user. (User A opens an exel doc for reading and
user B opens it for editing. Then User A decides to do a small change
and since excel serving an OLE cannot hint the document is readonly user
A goes ahead and does the change. Depending on read/write in the dataset
it creates all sorts of pissed of users).

Had I known all this I would have handled each application/file type
separately from the start, adding apps/types as I go. Writing my own
routine for storing temp files on disk and putting them back in the
database. Most software understands a read-only file.

Furtermore; Anyone successfully created a file from any version of a OLE
pdf? Adobe does not have a "write" automation command since it is a
reader program and OLE can not save the file (it gets corrupted). Pew.

Anyway, do put the original filename in a field when the object is saved
to the BLOB. But it won't get you all the way.

I know this is confused but so am I and so is OLE :(