Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP MySQL Blob Problem

Status
Not open for further replies.

Bignewbie

Programmer
Feb 22, 2001
351
PH
Hi People,

My problem is this... I have images already in my webserver, about 500 of them, in 80x80 sizes. I would like to store them in the database as blobs. How can i do that? I read in some tutorials that i need to use an upload form but these images are already in the webserver and therefore isnt needed to be uploaded, or am i missing some important aspect of putting images into mysql blobs?

Thanks in advance!



biggie




The Man of Tomorrow is forged by his battles today.
 
I can't honestly recommend storing images as BLOBs in any database let alone MySQL. It can and does cause a quite significant performance hit.

Store the path to the image in a varchar field is the best way.


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Chris,

I know what you mean, but that is not a decision for me to decide. My "superiors" decided on this even at my recommendations that we store the path into the database instead of the images themselves as blob. Now, im stuck with this task! We have debated on this again over the weekend and unfortunately they wouldn't listen.

Is there a way to do this in ASP? im beginning to think and blob can be stored into the db only when it is uploaded first. Am i right in my assumption?

Help guys!


biggie

The Man of Tomorrow is forged by his battles today.
 
yep you have to upload it as binary data into the db first. However, when I tested this, (client wanted pics that couldn't be hot-linked) while it worked ok with Access and MS SQL for some reason it never worked with MySQL. (Didn't try too hard though) Upload was fine and you could view the image in the MySQL client, display never worked in any browser.
(maybe having to license MS SQL will convince them <grin>)

Article and code
StarDeveloper


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top