I have a grid view which pulls through data dictated by a stored procedure.

The stored procedure is called GetEverything.
The statement is made up of information from 2 tables, one with person detail, and one with vessel detail. The stored procedure select statement contains the following Where clause:
WHERE Vessel.ArchiveStatus = 0
By default, every new record that is created using the front end application is given a ‘0’ for ArchiveStatus in the db.
So, the gridview will only show me the records where the ArchiveStatus is 0, which by default is evertything.
The 2 boxes, Check All and Uncheck All are working fully.
What I need now is when a REF or REF(s) are selected and the button ‘Archive Records’ is clicked, for the 0 in the database to be updated to a 1 for that VesselREF.
Can anoyone advise how to do this and give me some example code to put in the Default.aspx.vb file/ Event Handler for the archive records button.
With this is place, the grid view will only display the non-archived records, and I can create a seperate grid view with its own SQL to bring through the archived records.
GridView.aspx
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="REF,VesselREF" DataSourceID="SqlDataSource1" Height="132px"
style="text-align: center; font-family: Calibri; font-size: medium"
Width="508px" BackColor="#C4FFC4">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="REF" InsertVisible="False" SortExpression="REF">
<ItemTemplate>
<a href="Details.aspx?REF=<%# Eval("REF")%>"><%# Eval("REF")%></a>
<asp:CheckBox ID="RecordSelector" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName"
SortExpression="FirstName" />
<asp:BoundField DataField="Surname" HeaderText="Surname"
SortExpression="Surname" />
<asp:BoundField DataField="VesselName" HeaderText="VesselName"
SortExpression="VesselName" />
<asp:BoundField DataField="VesselREF" HeaderText="VesselREF"
InsertVisible="False" ReadOnly="True" SortExpression="VesselREF" />
</Columns>
</asp:GridView>
Assuming you’re using
TemplateFieldsand you want to use your stored-procedure to set both archived states: