Why does my gridview not update? ASP.NET C#. 250 Points for an easy question!!!!!

I have a very simple web page. It contains a datasource to an AccessDataSource linked to an Access database. Autogenerate Insert, update, delete is turned on. The table it is linked to has a primary key.

I also have a gridview element on this page. It's Datasource is set to the AccessDataSource. Autogenerate edit button is turned on.

There is no additional code whcih sits behind this page.

It compiles okay and runs okay. When I hit the edit button on a record it accesses the row fine and the edit boxes appear on all but the primary key. All good so far!!!

The problem is that after clicking update the row closes down back into the normal view record but neither the screen or the record in the access database reflects the change!

Please help!!! I'm sure this is a very simple query!!!!

I've attached the entire .aspx code belew incase this helps.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="C:\Inetpub\wwwroot\EUCWORKREQUESTSUBMIT\EUCWORKREQUESTS.MDB"
            DeleteCommand="DELETE FROM [tblSUBMITTEDWORKREQUESTS] WHERE [PROJECT NUMBER] = ?"
            InsertCommand="INSERT INTO [tblSUBMITTEDWORKREQUESTS] ([PROJECT NUMBER], [PROJECT NAME], [BUSINESS UNIT], [PRIORITY], [STATUS], [OVERVIEW], [REQUESTED BY], [DATE REQUESTED], [AGREED DELIVERY DATE], [DETAILED DESCRIPTION OF REQUIREMENT], [RESOURCES REQUIRED], [TARGET COMPLETION DATE], [ACTUAL COMPLETION DATE], [SIGNED OFF BY]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
            SelectCommand="SELECT * FROM [tblSUBMITTEDWORKREQUESTS]" UpdateCommand="UPDATE [tblSUBMITTEDWORKREQUESTS] SET [PROJECT NAME] = ?, [BUSINESS UNIT] = ?, [PRIORITY] = ?, [STATUS] = ?, [OVERVIEW] = ?, [REQUESTED BY] = ?, [DATE REQUESTED] = ?, [AGREED DELIVERY DATE] = ?, [DETAILED DESCRIPTION OF REQUIREMENT] = ?, [RESOURCES REQUIRED] = ?, [TARGET COMPLETION DATE] = ?, [ACTUAL COMPLETION DATE] = ?, [SIGNED OFF BY] = ? WHERE [PROJECT NUMBER] = ?">
            <DeleteParameters>
                <asp:Parameter Name="PROJECT_NUMBER" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="PROJECT_NAME" Type="String" />
                <asp:Parameter Name="BUSINESS_UNIT" Type="String" />
                <asp:Parameter Name="PRIORITY" Type="Double" />
                <asp:Parameter Name="STATUS" Type="String" />
                <asp:Parameter Name="OVERVIEW" Type="String" />
                <asp:Parameter Name="REQUESTED_BY" Type="String" />
                <asp:Parameter Name="DATE_REQUESTED" Type="String" />
                <asp:Parameter Name="AGREED_DELIVERY_DATE" Type="String" />
                <asp:Parameter Name="DETAILED_DESCRIPTION_OF_REQUIREMENT" Type="String" />
                <asp:Parameter Name="RESOURCES_REQUIRED" Type="String" />
                <asp:Parameter Name="TARGET_COMPLETION_DATE" Type="String" />
                <asp:Parameter Name="ACTUAL_COMPLETION_DATE" Type="String" />
                <asp:Parameter Name="SIGNED_OFF_BY" Type="String" />
                <asp:Parameter Name="PROJECT_NUMBER" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="PROJECT_NUMBER" Type="Int32" />
                <asp:Parameter Name="PROJECT_NAME" Type="String" />
                <asp:Parameter Name="BUSINESS_UNIT" Type="String" />
                <asp:Parameter Name="PRIORITY" Type="Double" />
                <asp:Parameter Name="STATUS" Type="String" />
                <asp:Parameter Name="OVERVIEW" Type="String" />
                <asp:Parameter Name="REQUESTED_BY" Type="String" />
                <asp:Parameter Name="DATE_REQUESTED" Type="String" />
                <asp:Parameter Name="AGREED_DELIVERY_DATE" Type="String" />
                <asp:Parameter Name="DETAILED_DESCRIPTION_OF_REQUIREMENT" Type="String" />
                <asp:Parameter Name="RESOURCES_REQUIRED" Type="String" />
                <asp:Parameter Name="TARGET_COMPLETION_DATE" Type="String" />
                <asp:Parameter Name="ACTUAL_COMPLETION_DATE" Type="String" />
                <asp:Parameter Name="SIGNED_OFF_BY" Type="String" />
            </InsertParameters>
        </asp:AccessDataSource>
   
    </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AutoGenerateEditButton="True"
            DataKeyNames="PROJECT NUMBER" DataSourceID="AccessDataSource1">
            <Columns>
                <asp:BoundField DataField="PROJECT NUMBER" HeaderText="PROJECT NUMBER" InsertVisible="False"
                    ReadOnly="True" SortExpression="PROJECT NUMBER" />
                <asp:BoundField DataField="PROJECT NAME" HeaderText="PROJECT NAME" SortExpression="PROJECT NAME" />
                <asp:BoundField DataField="BUSINESS UNIT" HeaderText="BUSINESS UNIT" SortExpression="BUSINESS UNIT" />
                <asp:BoundField DataField="PRIORITY" HeaderText="PRIORITY" SortExpression="PRIORITY" />
                <asp:BoundField DataField="STATUS" HeaderText="STATUS" SortExpression="STATUS" />
                <asp:BoundField DataField="OVERVIEW" HeaderText="OVERVIEW" SortExpression="OVERVIEW" />
                <asp:BoundField DataField="REQUESTED BY" HeaderText="REQUESTED BY" SortExpression="REQUESTED BY" />
                <asp:BoundField DataField="DATE REQUESTED" HeaderText="DATE REQUESTED" SortExpression="DATE REQUESTED" />
                <asp:BoundField DataField="AGREED DELIVERY DATE" HeaderText="AGREED DELIVERY DATE"
                    SortExpression="AGREED DELIVERY DATE" />
                <asp:BoundField DataField="DETAILED DESCRIPTION OF REQUIREMENT" HeaderText="DETAILED DESCRIPTION OF REQUIREMENT"
                    SortExpression="DETAILED DESCRIPTION OF REQUIREMENT" />
                <asp:BoundField DataField="RESOURCES REQUIRED" HeaderText="RESOURCES REQUIRED" SortExpression="RESOURCES REQUIRED" />
                <asp:BoundField DataField="TARGET COMPLETION DATE" HeaderText="TARGET COMPLETION DATE"
                    SortExpression="TARGET COMPLETION DATE" />
                <asp:BoundField DataField="ACTUAL COMPLETION DATE" HeaderText="ACTUAL COMPLETION DATE"
                    SortExpression="ACTUAL COMPLETION DATE" />
                <asp:BoundField DataField="SIGNED OFF BY" HeaderText="SIGNED OFF BY" SortExpression="SIGNED OFF BY" />
            </Columns>
        </asp:GridView>
    </form>
</body>
</html>
IainOnlineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Elvio Lujan.Net Senior DeveloperCommented:
just a question... have you update permission in the mdb file?
IainOnlineAuthor Commented:
There are no permissions set I don't think. I have a similar page which uses a custom insert record command and this works fine.
Elvio Lujan.Net Senior DeveloperCommented:
may be you can try setting the permissions... do double click in the mdb file go the security tab and add the ASP.NET user
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

IainOnlineAuthor Commented:
ASP .NET Machine Account (JP-WK-01112\ASPNET) has allow against everything but Special Permissions. I know ASP is already accessing this as I can see the record locking file. Also another web page in the project can successfully insert records but update doesn't work?
Elvio Lujan.Net Senior DeveloperCommented:
ok... but in the update querty all values are ?...
IainOnlineAuthor Commented:
Is that the problem? How should I update the query? I thought these statements generated automatically?
Elvio Lujan.Net Senior DeveloperCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Elvio Lujan.Net Senior DeveloperCommented:
and i suggest you --> delete that question: http:Q_21731978.html
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.