How/Where the OldValuesParameters is retrived from?

Discussion in 'ASP .Net Datagrid Control' started by SupaJay, Sep 8, 2006.

  1. SupaJay

    SupaJay Guest

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="......." SelectCommand="SELECT * FROM [MyData]"
    ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [MyData]
    WHERE [ID] = @original_ID AND [last_mod_time] = @original_last_mod_time "
    OldValuesParameterFormatString="original_{0}">
    <DeleteParameters>
    <asp:parameter Name="original_EID" Type="Int32" />
    <asp:parameter Name="original_last_mod_time" Type="DateTime" />
    </DeleteParameters>
    </asp:SqlDataSource>

    with a FormView bound to that datasource(DataKey is ID), in the
    ItemTemplate, there is no control that is bound from ID, nor Last_mod_time

    but when deleteing, it fail to delete correctly, because the
    @original_last_mod_time was empty(the viewing data has a last_mod_time),
    while @original_ID has the correctID in it

    so my question is, WHERE does the @original_ID come from? and why
    @original_last_mod_time was empty?

    thanks.
    SupaJay, Sep 8, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kent Johnson

    No records retrived..?

    Kent Johnson, Oct 24, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    390
    Kent Johnson
    Oct 27, 2003
  2. CsaaGuy
    Replies:
    3
    Views:
    447
    Brock Allen
    Jul 20, 2005
Loading...

Share This Page