Hello again

I'm on the hunt for some sample code that will show me how to use my SQL Blob 
fields 
to store images or documents.

For a while I entertained the idea of keeping the images and documents in a sub-
directory and simply referencing the file names but then I realised I was going 
to get 
into trouble with synchronising the SQL data with the files on disk. For 
example, what if 
somebody manually deleted one of the files, suddenly I need a bunch of 
conditions to 
handle these inconsistencies.

So, I decided I needed to bite the proverbial bullet and grasp the Blob by 
it's....whatever 
a Blob has to grab hold of...and conquer my fears. 

>From my reading of Blobs in the SQL manual (MySQL 4.1) I can simply treat them 
>like 
objects and populate them into forms etc without any problem.  So how do I get 
the 
image to appear on the html page?  Is it as simple as:
<html:img name="attributeName" property="myblob" /> ?

How do I upload an image and capture it into a form?

Regarding the SQL management of blobs, I'm assuming that it is better to create 
a 
separate table for these with two columns, ID (int auto_increment) and IMAGE 
(blob), 
and then to use the ID to reference the image on the other tables where it is 
linked. 
Does this sound right to you?

Thanks again for the guidance.

Kind regards
Murray



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.18/90 - Release Date: 5/09/2005


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to