display image - source stored in database

banks

Well-known member
Joined
Sep 7, 2005
Messages
50
Programming Experience
Beginner
Hi i have a table tbl_part which includes an attribute imagelocation. this stores the path to where my image is stored.

i am pulling a dataset of this table, and want to display the image depending on what the path is

i have done this before in access, where i used this code

Me.Controls("imgPicture").Picture = rsImage.Fields("imageFileName")

imgPicture is the name of the empty picture on the form, imagefilename is the mapping name from the dataset

Can this still be done in .net, or is there a better way to perform this task?

Many thanks,

Alex
 
Done it thanks, sorry for puttin a pointless Q up!

Dim imgP = drGoodsIn(0).Item("s_imgLocation")
imgPicture.Image = Image.FromFile(imgP)
 
Back
Top