How/Where the OldValuesParameters is retrived from?  
Author Message
U3VwYUpheQ





PostPosted: 2006-9-9 3:59:02 Top

dotnet-framework-aspnet, How/Where the OldValuesParameters is retrived from? <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.