I am new to Telerik. I am trying to update the db with the help of the example provided Grid - RadToolBar as Command Item here -http://demos.telerik.com/aspnet-ajax/toolbar/examples/applicationscenarios/gridcommanditem/defaultvb.aspx?product=grid , I removed the functions using quickstart, no delete, no insert. Just the update function.
When I click on the Update button, it gives the message as updated "id updated", but it is not updated in the database.
//After so many tries this is the updated command that worked without errors like Oracle invalid table name or missing expression. Parameter = '@Parameter'
here is my sqlsource for update command
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServicesOracle %>"
ProviderName="<%$ ConnectionStrings:ApplicationServicesOracle.ProviderName %>"
UpdateCommand="update PM_table set COMET_DESCRIPTOR = '@COMET_DESCRIPTOR', COMET_TRANS_NOTES ='@COMET_TRANS_NOTES' where id= '@id' and year||month='@year||'@month'">
<UpdateParameters>
<asp:Parameter Name="COMET_DESCRIPTOR" Type="String" ></asp:Parameter>
<asp:Parameter Name="COMET_TRANS_NOTES" Type="String" ></asp:Parameter>
<asp:Parameter Name="year" Type="String" ></asp:Parameter>
<asp:Parameter Name="month" Type="String" ></asp:Parameter>
<asp:Parameter Name="id" Type="String" ></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource
>
codebehind .vb
Protected Sub RadGrid1_ItemUpdated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridUpdatedEventArgs) Handles RadGrid1.ItemUpdated
If Not e.Exception Is Nothing Then
e.KeepInEditMode = True
e.ExceptionHandled = True
DisplayMessage(True, "id " + e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("id").ToString() + " cannot be updated due to invalid data. " + e.Exception.ToString)
Else
DisplayMessage(False, "id " + e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("id").ToString() + " updated")
End If
End Sub