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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE object

Status
Not open for further replies.

csiwa28

Programmer
Apr 12, 2001
177
I have an SQL database (created by a third party) that contains general member information (name, address, city, etc). My goal is to be able to create a web interface to display all the members and their information. I am able to display all the fields except for one and the field is called 'MEM_PIC'. I get a 'Type Mismatch' error when I call that field. When I look in the database, all it says is 'OLE object' and not the image name. How do I display the image on the web? I am not familiar with OLE objects and any help would be greatly appreciated.
 
Sorry this didn't work. I tried this

Response.ContentType = "image/jpg"
Response.BinaryWrite(rs("MEM_PIC"))

but all I got was binary data.
 
depends on how it's stored in the db as well and how it gets there, if you just streamed the data in via binary then you should be able to binary write it...

odd example, but if you tried using fso do a file.readall, then assign that to a variable and put it into the db, then you'd have all sorts of issues, first possible truncations, secondly, it wouldn't be binary data anymore it'd be assumed ascii garbage ( same thing that happens when you print an executable to the screen ) and so on, without more information on how it's put into the db cant really inform you on how to get it out.

last side note, from experience and frequent documents on do's and don'ts of web design, it's better to house your images out of the db, and just store path info in the db.
keeps your db size down, avoids possible data corruption, and should something happen, the images are still there.


[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top