BLOB help

faceman

Registered User.
Local time
Today, 19:36
Joined
Feb 11, 2003
Messages
20
I am trying to make a photo album database. I have done alot of research on the different methods of obtaining this. I don't really like the storing of the paths as I can not really secure the photos. I also do not want the database bloating associated with embedding the files in the OLE field. So that pretty much leaves the 3rd option of using BLOBs.

I found the thread that has some sample code from Ritchieroo, but I can't get it to work. I can get it to create the temp file and display the photo for the first record, but it displays that photo for all of the records instead of changing. Can someone who is more familiar with this post either a sample database with this implemented or post your code for me to look at?

Or if nothing else, point me to links of other resources that may explain this a little more for me. I would really rather learn how to do it than to just ask for a handout of someone else's code.


Thanks for any help that can be provided,

Faceman
 
May need a bit more info on "Blobs". Never heard of them.

Anyway, with normal pics ets you may need some code on the form - current to refresh the image.
HTH
Dave
 
RE: BLOB Help

BLOBs are Binary Large Objects. It will store the image in binary form(actual image size) to keep the db size from bloating. So if you store a 50kb jpg, the actual size in the OLE field will be 50kb instead of the embedded size of 400kb or whatever. If you embed the images into the OLE field, it will only take a couple of small jpgs to bloat your database to an unreasonable size. I do not want that to happen. The part I need help with is you have to extract the BLOB from the OLE field to a temporary file, then link the control to the file. I can achieve this for the first record, but when I go to the next record, it does not update the temporary file to match the next BLOB. It just displays the first one. How do I get it to refresh the temp file as I scroll through the records?
 
Faceman,
For that you need a snipet of code to refresh the Image Control.Picture property to Null. First position your Image Control to your recordset that contains the image. The write an If/Else statement like ---> If Not (rs BOF And rs EOF) Then imgImageControl.Picture = ("ImageBLOB") Else imgImageControl.Picture = Nothing

If you send me your code and what type of database and control you are using I can help, since I struggled with this for a while in my app. Send to amccleese@ProCompSoftware.com or amhippi@yahoo.com and I will respond.
 

Users who are viewing this thread

Back
Top Bottom