Hi there fellow coders.
I kind of have a problem, I need to retrieve an image (an album art picture) from a Microsoft access database and display it in an image control. I can retrieve text fields from a database (Placed in a grid view control) with the following code:
lblRow1AlbumPrice1.Text = GridView1.Rows[0].Cells[8].Text;
but the Album Art is under an attachment data type, so I don’t know how or what the code will be.
this is the database within a gridview control:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
<columns> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="AlbumName" HeaderText="AlbumName" SortExpression="AlbumName" />
<asp:BoundField DataField="Artist" HeaderText="Artist" SortExpression="Artist" />
<asp:BoundField DataField="ContributingArtists" HeaderText="ContributingArtists" SortExpression="ContributingArtists" />
<asp:BoundField DataField="Genre" HeaderText="Genre" SortExpression="Genre" />
<asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
<asp:BoundField DataField="AmountOfStock" HeaderText="AmountOfStock" SortExpression="AmountOfStock" />
<asp:BoundField DataField="ShippingWeight" HeaderText="ShippingWeight" SortExpression="ShippingWeight" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:BoundField DataField="AlbumArt" HeaderText="AlbumArt" SortExpression="AlbumArt" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString6 %>" ProviderName="<%$ ConnectionStrings:ConnectionString6.ProviderName %>" SelectCommand="SELECT [ID], [AlbumName], [Artist], [ContributingArtists], [Genre], [Year], [AmountOfStock], [ShippingWeight], [Price], [AlbumArt] FROM [Music (CD)]">