none
Access DB in Gridview not updating RRS feed

  • Question

  • I have a simple table that should show records that are not cleared. When I check the box to mark them cleared and click the Update button the screen refreshes but the record remains. Must be something simple.

     

    <asp:AccessDataSource ID="EstimatesOpen" runat="server"

    ConflictDetection="CompareAllValues" DataFile="~/App_Data/waitedb.mdb"

    DeleteCommand="DELETE FROM [Estimate] WHERE [Company] = ? AND [Person] = ? AND [Phone] = ? AND [Cleared] = ?"

    InsertCommand="INSERT INTO [Estimate] ([Company], [Person], [Phone], [Cleared]) VALUES (?, ?, ?, ?)"

    OldValuesParameterFormatString="original_{0}"

    SelectCommand="SELECT [Company], [Person], [Phone], [Cleared] FROM [Estimate] WHERE ([Cleared] = ?)"

    UpdateCommand="UPDATE [Estimate] SET [Person] = ?, [Phone] = ?, [Cleared] = ? WHERE [Company] = ? AND [Person] = ? AND [Phone] = ? AND [Cleared] = ?">

    <SelectParameters>

    <asp:Parameter DefaultValue="False" Name="Cleared" Type="Boolean" />

    </SelectParameters>

    <DeleteParameters>

    <asp:Parameter Name="original_Company" Type="String" />

    <asp:Parameter Name="original_Person" Type="String" />

    <asp:Parameter Name="original_Phone" Type="String" />

    <asp:Parameter Name="original_Cleared" Type="Boolean" />

    </DeleteParameters>

    <UpdateParameters>

    <asp:Parameter Name="Person" Type="String" />

    <asp:Parameter Name="Phone" Type="String" />

    <asp:Parameter Name="Cleared" Type="Boolean" />

    <asp:Parameter Name="original_Company" Type="String" />

    <asp:Parameter Name="original_Person" Type="String" />

    <asp:Parameter Name="original_Phone" Type="String" />

    <asp:Parameter Name="original_Cleared" Type="Boolean" />

    </UpdateParameters>

     

    Thanks in advance!

     

    Lance

    Thursday, January 10, 2008 7:17 PM