Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread save files in Blobfields or not?
Thu, Oct 6 2011 7:33 AMPermanent Link

Thomas Grimm

Hello,

i am planning a new application. it should be be able run it local mode, also in net work environment as a FileServer application and as Client/Server setup.

Further, it should be possible to link records to external files like doc, pdf, jpg etc. These files should be accessible (read, write) on any client computer. So saving the local path to a file in the database is not a solution, cause these paths are not accessible from other clients.

idea-blob: saving the files in a blob field in the database. so they become accessible for all clients. if a user wants to read the file, lets say a pdf, i would save it to a local directory and then open it locally.

alternative, idea-file: copy/move the files to special folder on the server, rename the files to a unique name, save the original filename and the new filename to the database. at client side, setting up a path to the server in UNC adding the new filename, these files were accessible also in network environment.

idea-bolb dislikes:
i often read here about blob field corruption, more then other corruption reasons. i am working for years now with, since V2.12, but only used memofield till now, which made no problems so far. So i have no experiences about blobfields.

if a file is saved from the blobfield to a local folder, and it is changed by the user through its parent application, lets say Excel, how get i the information that file is updated to update it (save the newer version) in the database?

idea-file dislikes:
in the case of a ClientServer installation, it is not really Client server like!
How about Database Backups? Files would not be included.
Is every user/client in all environments constellations (os, user rights) allowed to write files at the server - side?

What do you think is the best approach. Do you have any experiences with one or both solutions?
Thu, Oct 6 2011 8:26 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Thomas


I've done it both ways in both DBISAM and ElevateDB and I prefer the idea of using blobs (which are the same as memo fields) mailnly for the backup / deletion aspects. In DBISAM I never used BLOBS but stuck to MEMOs, in ElevateDB I'm using BLOBs.

I write the file to the local temporary directory having first checked to see if one's already there and if so deleted it and use ShellExecute to open it, add it to a list of files that get deleted when the app is closed..

You have identified the single biggest problem which is how to recognise that the file has been altered and update it in the database. Unfortunately there's no good answer. One possibility is a separate thread which checks files in a watch list to see if the modified date has been altered (hopefully the watch list wouldn't be that big so the files could be checked frequently) and if an alteration is found update the database.

Roy Lambert [Team Elevate]
Image