Adding Pictures

  • Thread starter UKCB Channel Moderator
  • Start date
U

UKCB Channel Moderator

Hi All

I'm new to ASP and a few querys

I have created my database in Access with the following fields

StockCode (Text Box, Primary Key)
Item (Memo)
Price (currency)
Picture (memo)
OnOffer (Yes/No)

and I know that access table cannot have a picture in it, only a access
form using OLE, but how do I get my asp page to display a picture for
every record? The picture would be a picture of the product with the
Stockcode as the filename - m001110.jpg?

All help is appreciated
 
M

Mike Brind

UKCB said:
Hi All

I'm new to ASP and a few querys

I have created my database in Access with the following fields

StockCode (Text Box, Primary Key)
Item (Memo)
Price (currency)
Picture (memo)
OnOffer (Yes/No)

and I know that access table cannot have a picture in it, only a access
form using OLE, but how do I get my asp page to display a picture for
every record? The picture would be a picture of the product with the
Stockcode as the filename - m001110.jpg?

Store the image file in a folder. Let's say you choose one called
"images" which is in the same directory that holds the page your
script is in. In the database, store the image file name in the
Picture field. Change the picture field to a text type. Memo is far
too large for your needs. When you create a recordset, it will contain
the image file name in the field for the picture. In your code you so
this:

Response.Write "<img src=""/images/" & rs("Picture") & """>"
 
V

vipin

plz tell me how to upload image in asp page?


Mike said:
Store the image file in a folder. Let's say you choose one called
"images" which is in the same directory that holds the page your
script is in. In the database, store the image file name in the
Picture field. Change the picture field to a text type. Memo is far
too large for your needs. When you create a recordset, it will contain
the image file name in the field for the picture. In your code you so
this:

Response.Write "<img src=""/images/" & rs("Picture") & """>"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,142
Messages
2,570,817
Members
47,363
Latest member
eitamoro

Latest Threads

Top