Displaying Images from Access Table

Results 1 to 3 of 3

Thread: Displaying Images from Access Table

  1. #1
    Robert Penn Guest

    Default Displaying Images from Access Table

    I am trying to figure out how to display a picture on a web page<BR>that is stored in an access table using ASP. I have one table<BR>tblTeams) with two fields (ID and Logo). I have tried the example <BR>below, but it just doesn&#039t want to work. The web page returns a<BR>broken picture frame with no error messages. I have been able to<BR>return the ID field without a problem. Everything is working<BR>correctly until I try to display the logo field. I am using <BR>Microsoft Personal Web Server and Access 97.<BR><BR>&#060;%<BR>Response.Expires = 0 <BR>Response.Buffer = TRUE <BR>Response.Clear <BR>Response.ContentType = "image/gif" <BR><BR>Set cn = Server.CreateObject("ADODB.Connection") <BR>cn.Open "teams", "", "" <BR>Set rs = cn.Execute("SELECT logo FROM tblTeams") <BR>Response.BinaryWrite rs("logo") <BR>Response.End <BR>&#037;&#062;<BR><BR>I have also read...<BR>"This relies on the fact that the picture in the database field<BR>contains no extra information other than the picture itself.<BR>MOST methods of placing images into database fields will also <BR>place bogus information (OLE Headers). i.e. if you try to use <BR>this with Access it will NOT work because Access puts OLE<BR>Headers around pictures in it&#039s BLOB&#039s. If you desire to display<BR>pictures from Access BLOB&#039s you will need to parse out the extra <BR>information and only display the raw contents of the BLOB."<BR><BR>I guess this might be my problem. I&#039m not sure on how to store a "BLOB" and how to parse out the extra information.<BR><BR>Any help would be greatly appreciated. Thanks.<BR><BR>Robert Penn<BR>rpenn@kpmg.com

  2. #2
    devonian Guest

    Default RE: Displaying Images from Access Table

    You could just put the hyperlink text into the db field and call it as a variable and place it in your page.

  3. #3
    Lee Fairbanks Guest

    Default RE: Displaying Images from Access Table

    I am trying to do the same thing but I don&#039t understand "call it as a variable" Could you explain a little more?<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
  •