System.Data.OleDb.OleDbException: No value given for one or more required parameters
<p>I have used Visual Studio 2008 ASP.NET AccessDataSource Wizard to generate the update command. The gridview edit button works. But when I click on Update Link in Gridview, I get this message:</p>

<pre><code>System.Data.OleDb.OleDbException: No value given for one or more required parameters
</code></pre>

<p>Is the wizard bugged ?</p>

<p>This is the source code it generated:</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;Untitled Page&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;

    &lt;/div&gt;
    &lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" 
        AutoGenerateEditButton="True" AutoGenerateSelectButton="True" DataKeyNames="Id" 
        DataSourceID="AccessDataSource1" PageSize="1"&gt;
        &lt;Columns&gt;
            &lt;asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" 
                ReadOnly="True" SortExpression="Id" /&gt;
            &lt;asp:BoundField DataField="TaskName" HeaderText="TaskName" 
                SortExpression="TaskName" /&gt;
            &lt;asp:BoundField DataField="TaskDescription" HeaderText="TaskDescription" 
                SortExpression="TaskDescription" /&gt;
            &lt;asp:BoundField DataField="TaskPriority" HeaderText="TaskPriority" 
                SortExpression="TaskPriority" /&gt;
        &lt;/Columns&gt;
    &lt;/asp:GridView&gt;
    &lt;asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        ConflictDetection="CompareAllValues" DataFile="~/App_Data/tasks.mdb" 
        DeleteCommand="DELETE FROM [Tasks] WHERE [Id] = ? AND (([TaskName] = ?) OR ([TaskName] IS NULL AND ? IS NULL)) AND (([TaskDescription] = ?) OR ([TaskDescription] IS NULL AND ? IS NULL)) AND (([TaskPriority] = ?) OR ([TaskPriority] IS NULL AND ? IS NULL))" 
        InsertCommand="INSERT INTO [Tasks] ([Id], [TaskName], [TaskDescription], [TaskPriority]) VALUES (?, ?, ?, ?)" 
        OldValuesParameterFormatString="original_{0}" 
        SelectCommand="SELECT * FROM [Tasks]" 
        UpdateCommand="UPDATE [Tasks] SET [TaskName] = ?, [TaskDescription] = ?, [TaskPriority] = ? WHERE [Id] = ? AND (([TaskName] = ?) OR ([TaskName] IS NULL AND ? IS NULL)) AND (([TaskDescription] = ?) OR ([TaskDescription] IS NULL AND ? IS NULL)) AND (([TaskPriority] = ?) OR ([TaskPriority] IS NULL AND ? IS NULL))"&gt;
        &lt;DeleteParameters&gt;
            &lt;asp:Parameter Name="original_Id" Type="Int32" /&gt;
            &lt;asp:Parameter Name="original_TaskName" Type="String" /&gt;
            &lt;asp:Parameter Name="original_TaskDescription" Type="String" /&gt;
            &lt;asp:Parameter Name="original_TaskPriority" Type="Single" /&gt;
        &lt;/DeleteParameters&gt;
        &lt;UpdateParameters&gt;
            &lt;asp:Parameter Name="TaskName" Type="String" /&gt;
            &lt;asp:Parameter Name="TaskDescription" Type="String" /&gt;
            &lt;asp:Parameter Name="TaskPriority" Type="Single" /&gt;
            &lt;asp:Parameter Name="original_Id" Type="Int32" /&gt;
            &lt;asp:Parameter Name="original_TaskName" Type="String" /&gt;
            &lt;asp:Parameter Name="original_TaskDescription" Type="String" /&gt;
            &lt;asp:Parameter Name="original_TaskPriority" Type="Single" /&gt;
        &lt;/UpdateParameters&gt;
        &lt;InsertParameters&gt;
            &lt;asp:Parameter Name="Id" Type="Int32" /&gt;
            &lt;asp:Parameter Name="TaskName" Type="String" /&gt;
            &lt;asp:Parameter Name="TaskDescription" Type="String" /&gt;
            &lt;asp:Parameter Name="TaskPriority" Type="Single" /&gt;
        &lt;/InsertParameters&gt;
    &lt;/asp:AccessDataSource&gt;    
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
