Answered by:
how to view photos.

Question
-
User1216460367 posted
Hi,
Im doing a school record program for my class, studen_id, name....
I have a database in access with a OLE field.
I need the easy way to view the photos or link that are store in my database
in a web form, Ex. formview or other.
I know that access is not the best way to go, but I only need to show 5 record with photos.
If you know any help link, let me know
Im new on this, so I need step by step instructions.
Thanks,
Sammy
Monday, April 26, 2010 8:03 PM
Answers
-
-
User-1199946673 posted
http://www.mikesdotnetting.com/Article/123/Storing-Files-and-Images-in-Access-with-ASP.NET
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, April 27, 2010 3:24 AM -
User-216961763 posted
Hi,
U need to Upload the Photos On a Single Direcotry with StudentID as Name to that Image
to your rootFolder say StudentImages. Now once u r trying to Display the Photo Of the student
then try to get the Same id Photo from the Root\StudentImages folder and Pass This Image path to your Image Control in your Form. and u will successfully display the image of the Student.
Please Mark As Answered, If u find this is the Solution of your Post
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, April 27, 2010 3:30 AM -
User1216460367 posted
hi,
Ok...I have:
table with the name: patiendimages in a DataBase with the name: EMR... in access.
the patiendimages table have the following fields:
id = autonumber
med_rec_num = number
image - OLE
now what? ... Im linking the image field with the folder where I have the image, but nothing happens...only show
a square with a red X.
Thanks,
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 4:55 PM -
User-1199946673 posted
the patiendimages table have the following fields:
id = autonumber
med_rec_num = number
image - OLE
Unless you're only using images of the same filetype, it is better to store at least the MimeType as well. Nad you nee a Http Handles to retrieve the image from the database and show it. Everything is explained in the link I posted before. Did you read the article?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 5:10 PM -
User1216460367 posted
yes, but I dont now how or where use the code
tks...
Im trying to show 1 image in a foamview template...
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 5:23 PM -
User-1199946673 posted
yes, but I dont now how or where use the code
tks...
Im trying to show 1 image in a foamview template...
In that case I think you should take another approach. Save the image in the filesystem, in the database your store the path to the image.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 5:27 PM -
User1216460367 posted
I did it and this what it shows...
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 10:10 PM -
User-1199946673 posted
I did itIt would help if you would shows us (code) what you did? Then we could try to find where you go wrong?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, May 2, 2010 9:57 AM -
User1216460367 posted
Hi, this is the code:
The photo is in this path:
G:\COIS 450\COIS 450 FP\images\PatientImages\1.bmp
<
asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="AccessDataSource2"
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, May 2, 2010 10:34 PM
All replies
-
-
User-1199946673 posted
http://www.mikesdotnetting.com/Article/123/Storing-Files-and-Images-in-Access-with-ASP.NET
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, April 27, 2010 3:24 AM -
User-216961763 posted
Hi,
U need to Upload the Photos On a Single Direcotry with StudentID as Name to that Image
to your rootFolder say StudentImages. Now once u r trying to Display the Photo Of the student
then try to get the Same id Photo from the Root\StudentImages folder and Pass This Image path to your Image Control in your Form. and u will successfully display the image of the Student.
Please Mark As Answered, If u find this is the Solution of your Post
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, April 27, 2010 3:30 AM -
User1216460367 posted
hi,
Ok...I have:
table with the name: patiendimages in a DataBase with the name: EMR... in access.
the patiendimages table have the following fields:
id = autonumber
med_rec_num = number
image - OLE
now what? ... Im linking the image field with the folder where I have the image, but nothing happens...only show
a square with a red X.
Thanks,
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 4:55 PM -
User-1199946673 posted
the patiendimages table have the following fields:
id = autonumber
med_rec_num = number
image - OLE
Unless you're only using images of the same filetype, it is better to store at least the MimeType as well. Nad you nee a Http Handles to retrieve the image from the database and show it. Everything is explained in the link I posted before. Did you read the article?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 5:10 PM -
User1216460367 posted
yes, but I dont now how or where use the code
tks...
Im trying to show 1 image in a foamview template...
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 5:23 PM -
User-1199946673 posted
yes, but I dont now how or where use the code
tks...
Im trying to show 1 image in a foamview template...
In that case I think you should take another approach. Save the image in the filesystem, in the database your store the path to the image.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 5:27 PM -
User1216460367 posted
I did it and this what it shows...
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, May 1, 2010 10:10 PM -
User-1199946673 posted
I did itIt would help if you would shows us (code) what you did? Then we could try to find where you go wrong?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, May 2, 2010 9:57 AM -
User1216460367 posted
Hi, this is the code:
The photo is in this path:
G:\COIS 450\COIS 450 FP\images\PatientImages\1.bmp
<
asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="AccessDataSource2"
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, May 2, 2010 10:34 PM -
User-1199946673 posted
The photo is in this path:
G:\COIS 450\COIS 450 FP\images\PatientImages\1.bmp
Instead of saving the full path, you need to store the relative path to the root of your website! Something like:
~\images\PatientImages\1.bmp
Monday, May 3, 2010 7:17 AM