#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Posts
    29
    Rep Power
    0

    Question need help with Microsft Access 2000 db


    Ok, Im working with an Microsoft Access 2000 database which I uploaded to my hosting server and I got it up and running to display from the database using ASP. Now I'm trying to add pictures to the database to view them online and this is where I'm running into problems. I can add the pictures as an OLE object to the Database browsing my harddrive but when I try to hardcode the online path, it tells me "this is file does not exsist", but the path I'm giving will be the path on my hosted server. Can anyone tell me how to add pictures and view them online?
  2. #2
  3. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    don't store the pictures in the database...and don't use ole. just have a field called path (text), and say where the path is on the server. then in your asp when you select a specific record you can just see what the path is and then use it in your ASP...for example:

    say that the picture field for record 1 says (in plain text) images/pic.jpg

    then your asp could have something like:

    <img src="<% Response.Write rs("picture") %>">
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Posts
    29
    Rep Power
    0

    Thanks


    Thanks for your help but will this give me a link to the picture or will the picture be display when the page is served? I would like the picture to come up when the page is loaded. Will it?
  6. #4
  7. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    would like the picture to come up when the page is loaded. Will it?
    yes. think of it like this...if you have your directory structure like this:

    public_html <--Root level

    public_html/docs <--One level down

    public_html/images <--One level down

    then if you just had some static html residing in public_html that had some picture on it, then the code would look something like:

    <html>
    blah blah...
    <img src="images/someimg.jpg">
    </html>

    then when you use your ASP you are doing the same thing (except it is not static) by saying:

    <img src="<% Response.Write rs("picture") %>">
    your picture will display the same as it would with a static page (assuming rs("picture") value equals "images/someimg.jpg".
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Posts
    29
    Rep Power
    0

    Thumbs up THNKS


    Thank you Tron you are a true Zen Master
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    17
    Rep Power
    0
    another thing you might want to do is in the database when you are entering the URL of the picture you might want to enter the backslash before the folder name as well......

    good: /images/anyimage.bmp
    bad: images/anyimage.bmp

IMN logo majestic logo threadwatch logo seochat tools logo