Showing Image on web Page from DB

Results 1 to 3 of 3

Thread: Showing Image on web Page from DB

  1. #1
    Sachin Guest

    Default Showing Image on web Page from DB

    I have a BLOB field in my database, which contains a Image. Using ADO I want to open a recordset and dislay this image on the html page. I dont want to get this image in a intermediate file, I want to directly render it on the page. How can I do it?<BR><BR>Thanking in anticipation<BR>Sachin

  2. #2
    Ian Stallings Guest

    Default RE: Showing Image on web Page from DB

    Using a DB to store images is not<BR>a good idea, usually a reference<BR>to the url is faster and more scalable<BR>but here is the code:<BR><BR>&#060;%<BR><BR>Response.Buffer = TRUE<BR><BR>&#039change content type to refelct image type<BR>Response.ContentType = "image/gif"<BR><BR>&#039insert DB info here<BR>Set oConn = Server.CreateObject(ADODB.Connection)<BR>oConn.Ope n "imagetable"<BR>Set oRec = oConn.Execute("SELECT * FROM logos WHERE image=&#039whatever&#039<BR><BR><BR>Response.Binar yWrite oRec("image")<BR>Response.End<BR>&#037;&#062;<BR>< BR><BR>I hope this helps. But 40,000 users pulling BLOBS<BR>from a DB 24x7 is not efficient. use a logo path<BR>instead.<BR><BR><BR>

  3. #3
    Rouben Guest

    Default RE: Showing Image on web Page from DB

    This code does not show how to read an image file<BR>into a table column.<BR>Where can I get sample code?<BR>Specifically, Oracle 8 blob, via VB script in ASP<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •