How/Where the OldValuesParameters is retrived from?

S

SupaJay

<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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top