G
Guest
Greetings all!
After a week of toiling I've finallay decided to post the code below with
hopes that someone can point out my error(s).
Basically I have a Gridview/Formview on a ASP.NEt 2.0 page.
When I select a record on the Gridview I'm presented with the corresponding
FormView Template for Editing. Works fine!
ItemTemplate in FormView works fine...Edit button takes me Edit Template!
However...
Upon clicking the Update button on the item Tempalte (With the associated
SqlDataSource associated below my data fails to update.)
I'm sure my error is obvious but I just cannot find it.
<asp:SqlDataSource ID="REACTOR_AHTs" runat="server"
ConnectionString="<%$
ConnectionStrings:REACTORConnectionString % %>"
ProviderName="<%$
ConnectionStrings:REACTORConnectionString.ProviderName %>"
OldValuesParameterFormatString="original_{0}"
SelectCommand=
"SELECT CaseCounter,
Condition_of_Animal,
TreatmentCardHistory
FROM Animal_Health_Records
WHERE (CaseCounter = @CaseCounter)"
UpdateCommand=
"UPDATE Animal_Health_Records
SET Condition_of_Animal = @Condition_of_Animal,
TreatmentCardHistory = @TreatmentCardHistory
WHERE (Animal_Health_Records.CaseCounter =
@original_CaseCounter)">
<DeleteParameters>
</DeleteParameters>
<UpdateParameters>
<asparameter Name="Condition_of_Animal" Type="String" />
<asparameter Name="TreatmentCardHistory" Type="String"
/>
<asp:ControlParameter ControlID="grdREACTOR"
Name="original_CaseCounter" PropertyName="SelectedValue" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="grdREACTOR"
Name="CaseCounter" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
After a week of toiling I've finallay decided to post the code below with
hopes that someone can point out my error(s).
Basically I have a Gridview/Formview on a ASP.NEt 2.0 page.
When I select a record on the Gridview I'm presented with the corresponding
FormView Template for Editing. Works fine!
ItemTemplate in FormView works fine...Edit button takes me Edit Template!
However...
Upon clicking the Update button on the item Tempalte (With the associated
SqlDataSource associated below my data fails to update.)
I'm sure my error is obvious but I just cannot find it.
<asp:SqlDataSource ID="REACTOR_AHTs" runat="server"
ConnectionString="<%$
ConnectionStrings:REACTORConnectionString % %>"
ProviderName="<%$
ConnectionStrings:REACTORConnectionString.ProviderName %>"
OldValuesParameterFormatString="original_{0}"
SelectCommand=
"SELECT CaseCounter,
Condition_of_Animal,
TreatmentCardHistory
FROM Animal_Health_Records
WHERE (CaseCounter = @CaseCounter)"
UpdateCommand=
"UPDATE Animal_Health_Records
SET Condition_of_Animal = @Condition_of_Animal,
TreatmentCardHistory = @TreatmentCardHistory
WHERE (Animal_Health_Records.CaseCounter =
@original_CaseCounter)">
<DeleteParameters>
</DeleteParameters>
<UpdateParameters>
<asparameter Name="Condition_of_Animal" Type="String" />
<asparameter Name="TreatmentCardHistory" Type="String"
/>
<asp:ControlParameter ControlID="grdREACTOR"
Name="original_CaseCounter" PropertyName="SelectedValue" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="grdREACTOR"
Name="CaseCounter" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>