0

I am trying to update employee information in my web form but when I press Update Link, nothing happends..

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ViewEmployees.aspx.vb" Inherits="ViewEmployees" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p class="style1" style="text-align: left">
        <table class="style1">
            <tr>
                <td>
  
    Enter Employee Name&nbsp;&nbsp;
    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
&nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtName" ErrorMessage="* "></asp:RequiredFieldValidator>
        &nbsp;&nbsp;
    <asp:Button ID="Button1" runat="server" Text="Search" />
                    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
        DataKeyNames="EmployeeID" DataSourceID="AccessDataSource1" ForeColor="#333333" 
        GridLines="None">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="EmployeeNumber" HeaderText="Employee Number" 
                SortExpression="EmployeeNumber" />
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="Position" HeaderText="Position" 
                SortExpression="Position" />
            <asp:BoundField DataField="EmployeeSince" HeaderText="Employee Since" 
                SortExpression="EmployeeSince" />
            <asp:BoundField DataField="BusinessUnit" HeaderText="Business Unit" 
                SortExpression="BusinessUnit" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                ShowSelectButton="True" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
                    <br />
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    <br />
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        DataFile="~/App_Data/JABILMCALLEN.mdb" 
        DeleteCommand="DELETE FROM [Employees] WHERE [EmployeeID] = ? " 
        InsertCommand="INSERT INTO [Employees] ([EmployeeID], [EmployeeNumber], [Name], [Position], [EmployeeSince], [BusinessUnit], [E-mail]) VALUES (?, ?, ?, ?, ?, ?, ?)" 
        SelectCommand="SELECT [EmployeeID], [EmployeeNumber], [Name], [Position], [EmployeeSince], [BusinessUnit], [E-mail] AS column1 FROM [Employees] Order By [Name]" 
        
            UpdateCommand="UPDATE [Employees] SET [EmployeeNumber] = @EmployeeNumber , [Name] = ?Name, [Position] = ?Position, [EmployeeSince] = ?EmployeeSince, [BusinessUnit] = ?BusinessUnit WHERE [EmployeeID] = ?EmployeeID))" 
            ConflictDetection="CompareAllValues" 
            OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_EmployeeID" Type="Int32" />
            <asp:Parameter Name="original_EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="original_Name" Type="String" />
            <asp:Parameter Name="original_Position" Type="String" />
            <asp:Parameter Name="original_EmployeeSince" Type="String" />
            <asp:Parameter Name="original_BusinessUnit" Type="String" />
            <asp:Parameter Name="original_column1" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
                     
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="EmployeeID" Type="Int32" />
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
            <asp:Parameter Name="column1" Type="String" />
        </InsertParameters>
    </asp:AccessDataSource>
        <asp:ListView ID="ListView1" runat="server" DataSourceID="AccessDataSource2">
            <ItemTemplate>
                <tr style="background-color:#FFFFFF; color: #000000;">
                    <td>
                        <asp:Label ID="ReferenceDocumentLabel" runat="server" 
                            Text='<%# Eval("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DescriptionLabel" runat="server" 
                            Text='<%# Eval("Description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="RevisionLabel" runat="server" Text='<%# Eval("Revision") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DifficultyLabel" runat="server" 
                            Text='<%# Eval("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Started_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Ended_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="EvalutationTypeLabel" runat="server" 
                            Text='<%# Eval("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TrainedByLabel" runat="server" Text='<%# Eval("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:Label ID="NextTrainingLabel" runat="server" 
                            Text='<%# Eval("NextTraining") %>' />
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr style="background-color:#FFF8DC;">
                    <td>
                        <asp:Label ID="ReferenceDocumentLabel" runat="server" 
                            Text='<%# Eval("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DescriptionLabel" runat="server" 
                            Text='<%# Eval("Description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="RevisionLabel" runat="server" Text='<%# Eval("Revision") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DifficultyLabel" runat="server" 
                            Text='<%# Eval("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Started_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Ended_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="EvalutationTypeLabel" runat="server" 
                            Text='<%# Eval("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TrainedByLabel" runat="server" Text='<%# Eval("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:Label ID="NextTrainingLabel" runat="server" 
                            Text='<%# Eval("NextTraining") %>' />
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" 
                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                    <tr>
                        <td>
                            No training record found.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <tr style="">
                    <td>
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                            Text="Insert" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                            Text="Clear" />
                    </td>
                    <td>
                        <asp:TextBox ID="ReferenceDocumentTextBox" runat="server" 
                            Text='<%# Bind("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DescriptionTextBox" runat="server" 
                            Text='<%# Bind("Description") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="RevisionTextBox" runat="server" 
                            Text='<%# Bind("Revision") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DifficultyTextBox" runat="server" 
                            Text='<%# Bind("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Started_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Ended_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="EvalutationTypeTextBox" runat="server" 
                            Text='<%# Bind("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="TrainedByTextBox" runat="server" 
                            Text='<%# Bind("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="NextTrainingTextBox" runat="server" 
                            Text='<%# Bind("NextTraining") %>' />
                    </td>
                </tr>
            </InsertItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="itemPlaceholderContainer" runat="server" border="1" 
                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <tr runat="server" style="background-color:#DCDCDC;color: #000000;">
                                    <th runat="server">
                                        ReferenceDocument</th>
                                    <th runat="server">
                                        Description</th>
                                    <th runat="server">
                                        Revision</th>
                                    <th runat="server">
                                        Difficulty</th>
                                    <th runat="server">
                                        Started Training</th>
                                    <th runat="server">
                                        Ended Training</th>
                                    <th runat="server">
                                        EvalutationType</th>
                                    <th runat="server">
                                        TrainedBy</th>
                                    <th runat="server">
                                        NextTraining</th>
                                </tr>
                                <tr ID="itemPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" 
                            style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <EditItemTemplate>
                <tr style="background-color:#008A8C;color: #FFFFFF;">
                    <td>
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                            Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                            Text="Cancel" />
                    </td>
                    <td>
                        <asp:TextBox ID="ReferenceDocumentTextBox" runat="server" 
                            Text='<%# Bind("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DescriptionTextBox" runat="server" 
                            Text='<%# Bind("Description") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="RevisionTextBox" runat="server" 
                            Text='<%# Bind("Revision") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DifficultyTextBox" runat="server" 
                            Text='<%# Bind("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Started_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Ended_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="EvalutationTypeTextBox" runat="server" 
                            Text='<%# Bind("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="TrainedByTextBox" runat="server" 
                            Text='<%# Bind("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="NextTrainingTextBox" runat="server" 
                            Text='<%# Bind("NextTraining") %>' />
                    </td>
                </tr>
            </EditItemTemplate>
            <SelectedItemTemplate>
                <tr style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                    <td>
                        <asp:Label ID="ReferenceDocumentLabel" runat="server" 
                            Text='<%# Eval("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DescriptionLabel" runat="server" 
                            Text='<%# Eval("Description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="RevisionLabel" runat="server" Text='<%# Eval("Revision") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DifficultyLabel" runat="server" 
                            Text='<%# Eval("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Started_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Ended_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="EvalutationTypeLabel" runat="server" 
                            Text='<%# Eval("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TrainedByLabel" runat="server" Text='<%# Eval("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:Label ID="NextTrainingLabel" runat="server" 
                            Text='<%# Eval("NextTraining") %>' />
                    </td>
                </tr>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:AccessDataSource ID="AccessDataSource2" runat="server" 
            DataFile="~/App_Data/JABILMCALLEN.mdb" 
            
            
        SelectCommand="SELECT TrainingDocuments.ReferenceDocument, TrainingDocuments.Description, TrainingDocuments.Revision, TrainingDocuments.Difficulty, Certifications.[Started Training], Certifications.[Ended Training], Certifications.EvalutationType, Certifications.TrainedBy, Certifications.NextTraining FROM (TrainingDocuments INNER JOIN Certifications ON TrainingDocuments.TrainingDocID = Certifications.TrainingDocID) WHERE (Certifications.EmployeeID = ? )">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="EmployeeID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:AccessDataSource>
</p>
    <p class="style1" style="text-align: left">
        &nbsp;</p>
</asp:Content>

Code Behind

Partial Class ViewEmployees
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Response.Redirect("ViewRecords.aspx?Name=" + Server.UrlEncode(txtName.Text))
    End Sub

    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim nameVar As String = "Hello"
    End Sub


    Protected Sub GridView1_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles GridView1.RowUpdated
        If e.AffectedRows > 0 Then
            ' Perform any additional processing, 
            ' such as setting a status label after the operation.        
            Label1.Text = Request.LogonUserIdentity.Name & _
                " changed user information successfully!"
        Else
            Label1.Text = "No data updated!"
        End If

    End Sub
End Class
3
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by __avd
0

Can you advise on the actual code snipet . Everything works just fine only the link would not do anything when click update..

<asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        DataFile="~/App_Data/JABILMCALLEN.mdb" 
        DeleteCommand="DELETE FROM [Employees] WHERE [EmployeeID] = ? " 
        InsertCommand="INSERT INTO [Employees] ([EmployeeID], [EmployeeNumber], [Name], [Position], [EmployeeSince], [BusinessUnit], [E-mail]) VALUES (?, ?, ?, ?, ?, ?, ?)" 
        SelectCommand="SELECT [EmployeeID], [EmployeeNumber], [Name], [Position], [EmployeeSince], [BusinessUnit], [E-mail] AS column1 FROM [Employees] Order By [Name]" 
        UpdateCommand="UPDATE [Employees] SET [EmployeeNumber] = @EmployeeNumber, [Name] = @Name, [Position] = @Position, [EmployeeSince] = @EmployeeSince, [BusinessUnit] = @BusinessUnit WHERE [EmployeeID] = @EmployeeID" 
        ConflictDetection="CompareAllValues" 
        OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_EmployeeID" Type="Int32" />
            <asp:Parameter Name="original_EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="original_Name" Type="String" />
            <asp:Parameter Name="original_Position" Type="String" />
            <asp:Parameter Name="original_EmployeeSince" Type="String" />
            <asp:Parameter Name="original_BusinessUnit" Type="String" />
            <asp:Parameter Name="original_column1" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
                     
        </UpdateParameters>
        
        
        
        
        
        
        
        
        <InsertParameters>
            <asp:Parameter Name="EmployeeID" Type="Int32" />
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
            <asp:Parameter Name="column1" Type="String" />
        </InsertParameters>
    </asp:AccessDataSource>
0
<UpdateParameters>
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
            <asp:Parameter Name="EmployeeID" Type="Int32" />
        </UpdateParameters>
0

I am trying to update employee information in my web form but when I press Update Link, nothing happends..

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ViewEmployees.aspx.vb" Inherits="ViewEmployees" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p class="style1" style="text-align: left">
        <table class="style1">
            <tr>
                <td>
  
    Enter Employee Name&nbsp;&nbsp;
    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
&nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtName" ErrorMessage="* "></asp:RequiredFieldValidator>
        &nbsp;&nbsp;
    <asp:Button ID="Button1" runat="server" Text="Search" />
                    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
        DataKeyNames="EmployeeID" DataSourceID="AccessDataSource1" ForeColor="#333333" 
        GridLines="None">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="EmployeeNumber" HeaderText="Employee Number" 
                SortExpression="EmployeeNumber" />
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="Position" HeaderText="Position" 
                SortExpression="Position" />
            <asp:BoundField DataField="EmployeeSince" HeaderText="Employee Since" 
                SortExpression="EmployeeSince" />
            <asp:BoundField DataField="BusinessUnit" HeaderText="Business Unit" 
                SortExpression="BusinessUnit" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                ShowSelectButton="True" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
                    <br />
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    <br />
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        DataFile="~/App_Data/JABILMCALLEN.mdb" 
        DeleteCommand="DELETE FROM [Employees] WHERE [EmployeeID] = ? " 
        InsertCommand="INSERT INTO [Employees] ([EmployeeID], [EmployeeNumber], [Name], [Position], [EmployeeSince], [BusinessUnit], [E-mail]) VALUES (?, ?, ?, ?, ?, ?, ?)" 
        SelectCommand="SELECT [EmployeeID], [EmployeeNumber], [Name], [Position], [EmployeeSince], [BusinessUnit], [E-mail] AS column1 FROM [Employees] Order By [Name]" 
        
            UpdateCommand="UPDATE [Employees] SET [EmployeeNumber] = @EmployeeNumber , [Name] = ?Name, [Position] = ?Position, [EmployeeSince] = ?EmployeeSince, [BusinessUnit] = ?BusinessUnit WHERE [EmployeeID] = ?EmployeeID))" 
            ConflictDetection="CompareAllValues" 
            OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_EmployeeID" Type="Int32" />
            <asp:Parameter Name="original_EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="original_Name" Type="String" />
            <asp:Parameter Name="original_Position" Type="String" />
            <asp:Parameter Name="original_EmployeeSince" Type="String" />
            <asp:Parameter Name="original_BusinessUnit" Type="String" />
            <asp:Parameter Name="original_column1" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
                     
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="EmployeeID" Type="Int32" />
            <asp:Parameter Name="EmployeeNumber" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Position" Type="String" />
            <asp:Parameter Name="EmployeeSince" Type="String" />
            <asp:Parameter Name="BusinessUnit" Type="String" />
            <asp:Parameter Name="column1" Type="String" />
        </InsertParameters>
    </asp:AccessDataSource>
        <asp:ListView ID="ListView1" runat="server" DataSourceID="AccessDataSource2">
            <ItemTemplate>
                <tr style="background-color:#FFFFFF; color: #000000;">
                    <td>
                        <asp:Label ID="ReferenceDocumentLabel" runat="server" 
                            Text='<%# Eval("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DescriptionLabel" runat="server" 
                            Text='<%# Eval("Description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="RevisionLabel" runat="server" Text='<%# Eval("Revision") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DifficultyLabel" runat="server" 
                            Text='<%# Eval("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Started_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Ended_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="EvalutationTypeLabel" runat="server" 
                            Text='<%# Eval("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TrainedByLabel" runat="server" Text='<%# Eval("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:Label ID="NextTrainingLabel" runat="server" 
                            Text='<%# Eval("NextTraining") %>' />
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr style="background-color:#FFF8DC;">
                    <td>
                        <asp:Label ID="ReferenceDocumentLabel" runat="server" 
                            Text='<%# Eval("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DescriptionLabel" runat="server" 
                            Text='<%# Eval("Description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="RevisionLabel" runat="server" Text='<%# Eval("Revision") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DifficultyLabel" runat="server" 
                            Text='<%# Eval("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Started_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Ended_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="EvalutationTypeLabel" runat="server" 
                            Text='<%# Eval("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TrainedByLabel" runat="server" Text='<%# Eval("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:Label ID="NextTrainingLabel" runat="server" 
                            Text='<%# Eval("NextTraining") %>' />
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" 
                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                    <tr>
                        <td>
                            No training record found.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <tr style="">
                    <td>
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                            Text="Insert" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                            Text="Clear" />
                    </td>
                    <td>
                        <asp:TextBox ID="ReferenceDocumentTextBox" runat="server" 
                            Text='<%# Bind("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DescriptionTextBox" runat="server" 
                            Text='<%# Bind("Description") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="RevisionTextBox" runat="server" 
                            Text='<%# Bind("Revision") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DifficultyTextBox" runat="server" 
                            Text='<%# Bind("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Started_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Ended_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="EvalutationTypeTextBox" runat="server" 
                            Text='<%# Bind("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="TrainedByTextBox" runat="server" 
                            Text='<%# Bind("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="NextTrainingTextBox" runat="server" 
                            Text='<%# Bind("NextTraining") %>' />
                    </td>
                </tr>
            </InsertItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="itemPlaceholderContainer" runat="server" border="1" 
                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <tr runat="server" style="background-color:#DCDCDC;color: #000000;">
                                    <th runat="server">
                                        ReferenceDocument</th>
                                    <th runat="server">
                                        Description</th>
                                    <th runat="server">
                                        Revision</th>
                                    <th runat="server">
                                        Difficulty</th>
                                    <th runat="server">
                                        Started Training</th>
                                    <th runat="server">
                                        Ended Training</th>
                                    <th runat="server">
                                        EvalutationType</th>
                                    <th runat="server">
                                        TrainedBy</th>
                                    <th runat="server">
                                        NextTraining</th>
                                </tr>
                                <tr ID="itemPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" 
                            style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <EditItemTemplate>
                <tr style="background-color:#008A8C;color: #FFFFFF;">
                    <td>
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                            Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                            Text="Cancel" />
                    </td>
                    <td>
                        <asp:TextBox ID="ReferenceDocumentTextBox" runat="server" 
                            Text='<%# Bind("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DescriptionTextBox" runat="server" 
                            Text='<%# Bind("Description") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="RevisionTextBox" runat="server" 
                            Text='<%# Bind("Revision") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="DifficultyTextBox" runat="server" 
                            Text='<%# Bind("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Started_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="Ended_TrainingTextBox" runat="server" 
                            Text='<%# Bind("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="EvalutationTypeTextBox" runat="server" 
                            Text='<%# Bind("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="TrainedByTextBox" runat="server" 
                            Text='<%# Bind("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="NextTrainingTextBox" runat="server" 
                            Text='<%# Bind("NextTraining") %>' />
                    </td>
                </tr>
            </EditItemTemplate>
            <SelectedItemTemplate>
                <tr style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                    <td>
                        <asp:Label ID="ReferenceDocumentLabel" runat="server" 
                            Text='<%# Eval("ReferenceDocument") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DescriptionLabel" runat="server" 
                            Text='<%# Eval("Description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="RevisionLabel" runat="server" Text='<%# Eval("Revision") %>' />
                    </td>
                    <td>
                        <asp:Label ID="DifficultyLabel" runat="server" 
                            Text='<%# Eval("Difficulty") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Started_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Started Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="Ended_TrainingLabel" runat="server" 
                            Text='<%# Eval("[Ended Training]") %>' />
                    </td>
                    <td>
                        <asp:Label ID="EvalutationTypeLabel" runat="server" 
                            Text='<%# Eval("EvalutationType") %>' />
                    </td>
                    <td>
                        <asp:Label ID="TrainedByLabel" runat="server" Text='<%# Eval("TrainedBy") %>' />
                    </td>
                    <td>
                        <asp:Label ID="NextTrainingLabel" runat="server" 
                            Text='<%# Eval("NextTraining") %>' />
                    </td>
                </tr>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:AccessDataSource ID="AccessDataSource2" runat="server" 
            DataFile="~/App_Data/JABILMCALLEN.mdb" 
            
            
        SelectCommand="SELECT TrainingDocuments.ReferenceDocument, TrainingDocuments.Description, TrainingDocuments.Revision, TrainingDocuments.Difficulty, Certifications.[Started Training], Certifications.[Ended Training], Certifications.EvalutationType, Certifications.TrainedBy, Certifications.NextTraining FROM (TrainingDocuments INNER JOIN Certifications ON TrainingDocuments.TrainingDocID = Certifications.TrainingDocID) WHERE (Certifications.EmployeeID = ? )">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="EmployeeID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:AccessDataSource>
</p>
    <p class="style1" style="text-align: left">
        &nbsp;</p>
</asp:Content>

Code Behind

Partial Class ViewEmployees
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Response.Redirect("ViewRecords.aspx?Name=" + Server.UrlEncode(txtName.Text))
    End Sub

    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim nameVar As String = "Hello"
    End Sub


    Protected Sub GridView1_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles GridView1.RowUpdated
        If e.AffectedRows > 0 Then
            ' Perform any additional processing, 
            ' such as setting a status label after the operation.        
            Label1.Text = Request.LogonUserIdentity.Name & _
                " changed user information successfully!"
        Else
            Label1.Text = "No data updated!"
        End If

    End Sub
End Class

I think you need to set direction property for <asp:Parameter> under <UpdateParameter> section. for more information visit the below link :
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.parameter.direction.aspx

0

Thanks for your help, I was missing
<asp:Parameter Name="EmployeeID" Type="Int32" /> , but also the validation control I had in the top search was not allowing my function to update!!!

#
Enter Employee Name&nbsp;&nbsp;
#
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
#
&nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
#
ControlToValidate="txtName" ErrorMessage="* "></asp:RequiredFieldValidator>
#
&nbsp;&nbsp;
#
<asp:Button ID="Button1" runat="server" Text="Search" />
#
<br />
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.