Results 1 to 5 of 5

Thread: Displaying graphics and word documents from a database in a web page

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    South Africa
    Posts
    3

    Displaying graphics and word documents from a database in a web page

    Hi

    I'm having some difficulty in properly displaying some graphics and word documents in a web page i'm creating.

    The images and word documents are stored in a database as OLE objects. I can extract these files from the database using standard SQL but I don't know how to display them (i.e. the images). What I want to do with the word documents is have them stored in links so that when a link is clicked on, the particular document is displayed.

    If anyone has some tips or advice it would be greatly appreciated.

    Thanks,
    pozzie.
    Last edited by pozzie; Dec 29th, 2003 at 09:14 AM.

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: Displaying graphics and word documents from a database in a web page

    Originally posted by pozzie
    Hi

    I'm having some difficulty in properly displaying some graphics and word documents in a web page i'm creating.

    The images and word documents are stored in a database as OLE objects. I can extract these files from the database using standard SQL but I don't know how to display them (i.e. the images). What I want to do with the word documents is have them stored in links so that when a link is clicked on, the particular document is displayed.

    If anyone has some tips or advice it would be greatly appreciated.

    Thanks,
    pozzie.
    Use BinaryWrite, here is a tutorial on how to retrive images stored in database. For Word file just change the content type, other then that it is the same.

    Hope this helps.

    Danial

    http://www.4guysfromrolla.com/webtech/060100-1.shtml
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    South Africa
    Posts
    3
    Hey Danial

    Shot for the tut! I'm sure this is what I'm looking for! Will give it a bash. Sorry I'm replying so late - we were away over new year. Hope you had a good one!

    Pozzie.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    It would be more efficient to store the URLs to the graphics instead of the OLE objects themselves. This way you only need to to

    VB Code:
    1. <img src="<% Response.Write objrs.Fields("urltographic") %>">

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    South Africa
    Posts
    3
    Thanks for your input, Mendhak.

    I am familiar with that way of rendering graphics but the only problem with that is that the users of the website need to update it themselves, online through a back end system i'm incorporating into the site. I assumed it would be easier for them to just save the images of the products they market to the database as these may constantly change.

    regards,
    pozzie.

Posting Permissions

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



Click Here to Expand Forum to Full Width