|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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") %>"> |
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
||||
|
||||
|
Quote:
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: Quote:
your picture will display the same as it would with a static page (assuming rs("picture") value equals "images/someimg.jpg". |
|
#5
|
|||
|
|||
|
Thank you Tron you are a true Zen Master
![]() |
|
#6
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > need help with Microsft Access 2000 db |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|