Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Pictures into MsAccess

Thread Tools
 
Search this Thread
 
Old Feb 11, 2003 | 10:03 AM
  #1  
bing-bonger's Avatar
bing-bonger
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 171
Likes: 0
Post

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
Reply
Old Feb 11, 2003 | 12:44 PM
  #2  
ids's Avatar
ids
Scooby Regular
 
Joined: May 1999
Posts: 424
Likes: 0
Post

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
Reply
Old Feb 11, 2003 | 12:59 PM
  #3  
chiark's Avatar
chiark
Scooby Regular
 
Joined: Jun 2000
Posts: 13,735
Likes: 0
Post

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.
Reply
Old Feb 11, 2003 | 03:55 PM
  #4  
bing-bonger's Avatar
bing-bonger
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 171
Likes: 0
Post

Or maybe i should just you sql-server as that has an option for image???


What do you guys think??
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
Nov 18, 2015 07:03 AM
Wish
Computer & Technology Related
3
Sep 30, 2015 10:39 PM
Phil3822
General Technical
0
Sep 30, 2015 06:29 PM
IanG1983
Subaru Parts
1
Sep 30, 2015 04:52 PM
floydy634
General Technical
3
Sep 27, 2015 07:25 PM




All times are GMT +1. The time now is 06:14 AM.