Pictures into MsAccess
#1
Guys,Gals!!!
I am creating a website using ASP and Ms Access for an on-line portfolio (over 200 images divided into 10 sub sections), what I would like to know is how do I populate a database table in Access with jpegs, and how do I get them to display within the HTML, is it the same process and displaying text from a database????
Any help would be very very much appreciated....
thanks
I am creating a website using ASP and Ms Access for an on-line portfolio (over 200 images divided into 10 sub sections), what I would like to know is how do I populate a database table in Access with jpegs, and how do I get them to display within the HTML, is it the same process and displaying text from a database????
Any help would be very very much appreciated....
thanks
#2
Heheheheh..... been there too.
2 options - either convert/encode the image and then store in a MEMO feild - however there is some limitations on this in Access or better still store the image within the file system and store the link/url for display.
I do have some more info on Option 1 but not to hand....
Ids
2 options - either convert/encode the image and then store in a MEMO feild - however there is some limitations on this in Access or better still store the image within the file system and store the link/url for display.
I do have some more info on Option 1 but not to hand....
Ids
#3
Store 'em in a memo field, then retrieve using ASP.
Your img src will look strange, as you'll call an asp page to retrieve them (such as <IMG SRC=image.asp?name=test.jpg> ) but on the other hand it'll work.
Your asp wants to set its response type:
Response.Buffer = TRUE
Response.ContentType = "image/jpeg"
You then want to find your image in your recordset that you've opened (assume you know how to do this).
Write your image out using
response.binaryWrite myRS("Image").GetChunk(myRS("Image").ActualSize
Where myRS is your Recordset object, "image" is the field name containing the image.
Finally, end the response with
response.end
Doing this means that you can also control access to your graphics, such as to ensure people are logged on before seeing the graphics, and also that no other site is leeching graphics off your server.
Cheers,
Nick.
Your img src will look strange, as you'll call an asp page to retrieve them (such as <IMG SRC=image.asp?name=test.jpg> ) but on the other hand it'll work.
Your asp wants to set its response type:
Response.Buffer = TRUE
Response.ContentType = "image/jpeg"
You then want to find your image in your recordset that you've opened (assume you know how to do this).
Write your image out using
response.binaryWrite myRS("Image").GetChunk(myRS("Image").ActualSize
Where myRS is your Recordset object, "image" is the field name containing the image.
Finally, end the response with
response.end
Doing this means that you can also control access to your graphics, such as to ensure people are logged on before seeing the graphics, and also that no other site is leeching graphics off your server.
Cheers,
Nick.
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
Phil3822
General Technical
0
30 September 2015 06:29 PM