Displaying Images from Databases on ASP Page

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Displaying Images from Databases on ASP Page

    have been searching for two complete days now on how to
    display images from a database on the webpage using ASP.

    I found a script giving some details that I need to create
    an ActiveX dll which I did. Then did all the neccessary
    examples of how to impleement it in ASP.

    However it still does not run. The instructions did not
    tell me anything as to where I should put the dll file. I
    tried by putting it in the same folder as the scrip and
    then in Winnt but both did not work.

    It is a simple affair. Make a connection to the database,
    get the image, and display. The Active X part comes in
    because of the additional header info that was placed with
    the image when it was stored in the database.

    I have followed the exact examples as shown by microsoft
    but it doesn't work! I even used the same sample northwind
    databse as them but even then no positive results.

    And I have struggled with it so far, now it doesn't seem
    to be worthwhile giving the idea up.

    What I have deduced is that maybe the dll has not been
    properly registered and that is why it does not allow the
    createobject thing to execute.

    Can you help please.

    The instructions are at
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-[/url]
    us;175261

    Ashish Sharma
    Computer Programmer
    Information Technology Services
    Fiji School of Medicine
    Ph: 3311700 ext 1503 Fax:3303469
    Email: [email]a.sharma@fsm.ac.fj[/email]
    Ashish Sharma Guest

  2. Similar Questions and Discussions

    1. Images in Databases - what is the best way?
      Hi, Really just looking at some advice here. What is the best, most efficient, way to store images? The way I've worked so far is to store...
    2. displaying images
      i am tying to display images dynamically on a product detail page based on a user selection on a page which displays a list of products. i am using...
    3. [PHP] images in databases & Flash via PHP
      Saving Images in MySQL http://www.weberdev.com/ViewArticle.php3?ArticleID=3 Sincerely berber Visit http://www.weberdev.com/ Today!!! To...
    4. images in databases & Flash via PHP
      I was wondering - are there any good tutorials/examples of serving & updating images from a mySQL database via PHP? I assume this is possible, but...
    5. background images not displaying when swf is on page
      Don Hinshaw wrote: Have you tried adding a doctype? -- Dan Vendel - *GOF* http://www.vendel.info
  3. #2

    Default Re: Displaying Images from Databases on ASP Page

    Ashish

    CreateObject failing is often a case of the dll not being registered.
    Providing your code and database are fine simply place the compiled dll in a
    sensible place (this can be anywhere, does not have to be in the WinNT
    folder) and then use regsvr32 to register it.
    This is done by either going to start - run or the command prompt and typing

    regsvr32 <pathtodll>

    This is the full path - i.e. regsvr32 c:\myProject\Bin\MyDll.dll

    If you need to recompile the VB at any time try and set binary compatibility
    to the dll so you do not end up with multiple registry entries. If you have
    already compiled a number of times, or you still have problems try
    downloading regClean or similar.



    "Ashish Sharma" <a.sharma@fsm.ac.fj> wrote in message
    news:191e01c37356$c029c350$a301280a@phx.gbl...
    > have been searching for two complete days now on how to
    > display images from a database on the webpage using ASP.
    >
    > I found a script giving some details that I need to create
    > an ActiveX dll which I did. Then did all the neccessary
    > examples of how to impleement it in ASP.
    >
    > However it still does not run. The instructions did not
    > tell me anything as to where I should put the dll file. I
    > tried by putting it in the same folder as the scrip and
    > then in Winnt but both did not work.
    >
    > It is a simple affair. Make a connection to the database,
    > get the image, and display. The Active X part comes in
    > because of the additional header info that was placed with
    > the image when it was stored in the database.
    >
    > I have followed the exact examples as shown by microsoft
    > but it doesn't work! I even used the same sample northwind
    > databse as them but even then no positive results.
    >
    > And I have struggled with it so far, now it doesn't seem
    > to be worthwhile giving the idea up.
    >
    > What I have deduced is that maybe the dll has not been
    > properly registered and that is why it does not allow the
    > createobject thing to execute.
    >
    > Can you help please.
    >
    > The instructions are at
    > [url]http://support.microsoft.com/default.aspx?scid=kb;en-[/url]
    > us;175261
    >
    > Ashish Sharma
    > Computer Programmer
    > Information Technology Services
    > Fiji School of Medicine
    > Ph: 3311700 ext 1503 Fax:3303469
    > Email: [email]a.sharma@fsm.ac.fj[/email]

    Jason Melville Guest

  4. #3

    Default Re: Displaying Images from Databases on ASP Page

    On Thu, 4 Sep 2003 19:38:12 -0700, "Ashish Sharma"
    <a.sharma@fsm.ac.fj> wrote:
    > have been searching for two complete days now on how to
    >display images from a database on the webpage using ASP.
    Did you see:

    [url]http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=172[/url]
    [url]http://www.4guysfromrolla.com/webtech/060100-1.shtml[/url]
    [url]http://www.ammara.com/support/kb/showkb6258.html[/url]
    [url]http://www.actionjackson.com/asp/examples/pubssql/pubssql.asp[/url]
    [url]http://www.aspalliance.com/stevesmith/articles/imagequery.asp[/url]

    That's just the first page from a Google of "asp display images from
    database"...
    >I found a script giving some details that I need to create
    >an ActiveX dll which I did. Then did all the neccessary
    >examples of how to impleement it in ASP.
    You shouldn't need an ActiveX component just to pull images from a
    database and show them on a page.
    >It is a simple affair. Make a connection to the database,
    >get the image, and display. The Active X part comes in
    >because of the additional header info that was placed with
    >the image when it was stored in the database.
    What extra header info? And what image format? GIF/JPG are a breeze,
    others may require a component to display.
    >I have followed the exact examples as shown by microsoft
    >but it doesn't work! I even used the same sample northwind
    >databse as them but even then no positive results.
    Doesn't work as in smoke started pouring from your server or was there
    an error message displayed you neglected to tell us about?
    >And I have struggled with it so far, now it doesn't seem
    >to be worthwhile giving the idea up.
    The process is actually quite simple. Images can be stored in a
    database or the URL of the image can be stored to save space in the
    database. If the former, it's not hard to retrieve the record and
    display the image, and the links above will show you how in about ten
    lines of ASP/VBScript.

    Give them a try, especially the 4guysfromrolla one. Those tutorials
    are usually complete and simple to follow.

    Now, when you can display those images in a scrollable DHTML layer
    with links, that's something more useful. :)

    Jeff
    Jeff Cochran Guest

  5. #4

    Default Re: Displaying Images from Databases on ASP Page



    If you can possibly avoid it, don't use Access 'OLE Embedding' to store the images - just store the raw
    binary data. Then there are no headers to deal with, no components required, etc.

    The sample below can be placed on your webserver and should run without any further configuration. The
    source files are also viewable from this page:

    [url]http://www.ammara.com/support/samples/showsam475d.html[/url]

    --
    __________________________________________________ _____
    [url]http://www.ammara.com/[/url]
    Image Handling Components, Samples, Solutions and Info






    "Ashish Sharma" <a.sharma@fsm.ac.fj> wrote:
    > have been searching for two complete days now on how to
    >display images from a database on the webpage using ASP.
    >
    >I found a script giving some details that I need to create
    >an ActiveX dll which I did. Then did all the neccessary
    >examples of how to impleement it in ASP.
    >
    >However it still does not run. The instructions did not
    >tell me anything as to where I should put the dll file. I
    >tried by putting it in the same folder as the scrip and
    >then in Winnt but both did not work.
    >
    >It is a simple affair. Make a connection to the database,
    >get the image, and display. The Active X part comes in
    >because of the additional header info that was placed with
    >the image when it was stored in the database.
    >
    >I have followed the exact examples as shown by microsoft
    >but it doesn't work! I even used the same sample northwind
    >databse as them but even then no positive results.
    >
    >And I have struggled with it so far, now it doesn't seem
    >to be worthwhile giving the idea up.
    >
    >What I have deduced is that maybe the dll has not been
    >properly registered and that is why it does not allow the
    >createobject thing to execute.
    >
    >Can you help please.
    >
    >The instructions are at
    >[url]http://support.microsoft.com/default.aspx?scid=kb;en-[/url]
    >us;175261
    >
    >Ashish Sharma
    >Computer Programmer
    >Information Technology Services
    >Fiji School of Medicine
    >Ph: 3311700 ext 1503 Fax:3303469
    >Email: [email]a.sharma@fsm.ac.fj[/email]
    Exponent Guest

  6. #5

    Default Re: Displaying Images from Databases on ASP Page

    Hey guys,

    Thanks a lot man. I managed to get that sample application and golly, it
    was just what I needed.

    Once again thanks a million. I am a new member at this site but from now
    on I'll contribute with what I know as well.

    If you ever need any help regarding VB, Access or C++ or SQL, look me
    up.

    Once again: I am very grateful for your help. Thanks.




    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Ashish Sharma Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139