Posted on: 9/11/2013 6:49:06 AM | Views : 589

My web application allow user send report and also to insert up to 5 images into database (SQL Server) as varbinary(MAX). I am now finding a way to retrieve all images of a particular report a user sent. Previously, I used to retrieve image 1 by 1 through a aspx page. But I faced a problem when the user only insert 1 image out of the 5. My 4 other image tag will be displaying null image. So now I trying to find a method if I can retrieve those images based on the report in just 1 image tag. Image was stored in the same table as the report previously, now I change it to 2 table. MemberReport is all details of the report and MemberReportImage is all the images of the report.
MemberReportImage table consist of this column
ImageID [int] PK MemberReportID [int] Image [varbinary(MAX)] This code below allow me to retrieve the first image out of my MemberReportImage table based on the memberreportid into a image tag, however I wi ...

Go to the complete details ...