Error Message:
Server Error in '/call in' Application.
--------------------------------------------------------------------------------ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Name, Date, Shift, Call_Answered, Left_Message, Call_Returned, Available, Complete, original_TaskID, Call Answered, Left Message, Call Returned.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Name, Date, Shift, Call_Answered, Left_Message, Call_Returned, Available, Complete, original_TaskID, Call Answered, Left Message, Call Returned.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Name, Date, Shift, Call_Answered, Left_Message, Call_Returned, Available, Complete, original_TaskID, Call Answered, Left Message, Call Returned.]
System.Web.UI.WebControls.ObjectDataSourceView.GetResolvedMethodData(Type type, String methodName, IDictionary allParameters, DataSourceOperation operation) +1440
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +2292
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +179
System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1140
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +835
System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +162
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +118
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +175
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3840Code I am using:
<%
@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="tasks.aspx.vb" Inherits="tasks" title="Untitled Page" %><
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"></
asp:Content>
<
asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"><
div class="category">Current Shift Filter:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"> <asp:ListItem Value="False">Open</asp:ListItem> <asp:ListItem Value="True">Closed</asp:ListItem> </asp:DropDownList></
div><
div class="ToDoHeader"><
h2> Call In Report</h2></
div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TaskID" DataSourceID="ObjectDataSource1"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="TaskID" HeaderText="TaskID" InsertVisible="False" ReadOnly="True" SortExpression="TaskID" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" /> <asp:BoundField DataField="Shift" HeaderText="Shift" SortExpression="Shift" /> <asp:CheckBoxField DataField="Call Answered" HeaderText="Call Answered" SortExpression="Call Answered" /> <asp:CheckBoxField DataField="Left Message" HeaderText="Left Message" SortExpression="Left Message" /> <asp:CheckBoxField DataField="Call Returned" HeaderText="Call Returned" SortExpression="Call Returned" /> <asp:CheckBoxField DataField="Available" HeaderText="Available" SortExpression="Available" /> <asp:CheckBoxField DataField="Complete" HeaderText="Complete" SortExpression="Complete" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetTasksByStatus" TypeName="DataSet2TableAdapters.new_tasksTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_TaskID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Date" Type="DateTime" /> <asp:Parameter Name="Shift" Type="String" /> <asp:Parameter Name="Call_Answered" Type="Boolean" /> <asp:Parameter Name="Left_Message" Type="Boolean" /> <asp:Parameter Name="Call_Returned" Type="Boolean" /> <asp:Parameter Name="Available" Type="Boolean" /> <asp:Parameter Name="Complete" Type="Boolean" /> <asp:Parameter Name="Original_TaskID" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" Name="IsComplete" PropertyName="SelectedValue" Type="Boolean" /> </SelectParameters> <InsertParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Date" Type="DateTime" /> <asp:Parameter Name="Shift" Type="String" /> <asp:Parameter Name="Call_Answered" Type="Boolean" /> <asp:Parameter Name="Left_Message" Type="Boolean" /> <asp:Parameter Name="Call_Returned" Type="Boolean" /> <asp:Parameter Name="Available" Type="Boolean" /> <asp:Parameter Name="Complete" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> </
asp:Content>
SCREENSHOT:
http://i118.photobucket.com/albums/o104/coryb77/Clipboard01.jpg
As soon as I click update I get the error. The columns "Call Answered, Left Message" are just to have a 1 or 0 value so I set them to Bit data type in SQL server. Any last resort suggestions?
![]() |
0 |
![]() |
try remove "original_" from
OldValuesParameterFormatString="original_{0}"
![]() |
0 |
![]() |
Removed it, still the same...
![]() |
0 |
![]() |
When I removed that I got -
Server Error in '/call in' Application.
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Name, Date, Shift, Call_Answered, Left_Message, Call_Returned, Available, Complete, Original_TaskID, Call Answered, Left Message, Call Returned, TaskID.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Name, Date, Shift, Call_Answered, Left_Message, Call_Returned, Available, Complete, Original_TaskID, Call Answered, Left Message, Call Returned, TaskID.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Name, Date, Shift, Call_Answered, Left_Message, Call_Returned, Available, Complete, Original_TaskID, Call Answered, Left Message, Call Returned, TaskID.] System.Web.UI.WebControls.ObjectDataSourceView.GetResolvedMethodData(Type type, String methodName, IDictionary allParameters, DataSourceOperation operation) +1440 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +2292 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +179 System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1140 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +835 System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +162 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56 System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +118 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +175 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3840
Added TaskID to the parameters that it cant find
![]() |
0 |
![]() |
cbailey77:
Removed it, still the same...It is not resolved because what causes that error is more than one issue, check the thread below for most known solutions. Hope this helps.
http://forums.asp.net/thread/1499586.aspx
Kind regards,
Gift Peddie
![]() |
0 |
![]() |
I've tried those fixes, and have still yet to find the problem
Take a look at this screen shot.
http://i118.photobucket.com/albums/o104/coryb77/Clipboard02.jpg
I can update any of the fields here from this screen shot you see and it works fine. Notice the column names they are as follows -
Because Me You Today < When I go in to the table in SQL server 2000 to rename them to - Call Answered Left Message Available Call Returned which is what I want them to be called, SQL server puts [ ] around the name and If i leave it this way I get the update error. But when I change the names to Because Me You Today it works. They are all nvarchar data types and I want to change them to BIT data types and I thought that was where the problem was coming from but clearly without having any of the columns set as Bit it can't be the issue.
Ill post the code that works with the columns named Because Me You Today and Ill post the code that doesnt work with the columns named properly.
Working code :
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="tasks.aspx.vb" Inherits="tasks" title="Untitled Page" %>
<
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"></
asp:Content>
<
asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"><
div class="category">Current Shift Filter:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"> <asp:ListItem Value="False">Open</asp:ListItem> <asp:ListItem Value="True">Closed</asp:ListItem> </asp:DropDownList></
div><
div class="ToDoHeader"><
h2> Call In Report</h2></
div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TaskID" DataSourceID="ObjectDataSource1"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="TaskID" HeaderText="TaskID" InsertVisible="False" ReadOnly="True" SortExpression="TaskID" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" /> <asp:BoundField DataField="Shift" HeaderText="Shift" SortExpression="Shift" /> <asp:BoundField DataField="Because" HeaderText="Because" SortExpression="Because" /> <asp:BoundField DataField="Me" HeaderText="Me" SortExpression="Me" /> <asp:BoundField DataField="You" HeaderText="You" SortExpression="You" /> <asp:BoundField DataField="Today" HeaderText="Today" SortExpression="Today" /> <asp:CheckBoxField DataField="Complete" HeaderText="Complete" SortExpression="Complete" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetTasksByStatus" TypeName="reportingTableAdapters.reportsTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_TaskID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Date" Type="DateTime" /> <asp:Parameter Name="Shift" Type="String" /> <asp:Parameter Name="Because" Type="String" /> <asp:Parameter Name="Me" Type="String" /> <asp:Parameter Name="You" Type="String" /> <asp:Parameter Name="Today" Type="String" /> <asp:Parameter Name="Complete" Type="Boolean" /> <asp:Parameter Name="Original_TaskID" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" Name="IsComplete" PropertyName="SelectedValue" Type="Boolean" /> </SelectParameters> <InsertParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Date" Type="DateTime" /> <asp:Parameter Name="Shift" Type="String" /> <asp:Parameter Name="Because" Type="String" /> <asp:Parameter Name="Me" Type="String" /> <asp:Parameter Name="You" Type="String" /> <asp:Parameter Name="Today" Type="String" /> <asp:Parameter Name="Complete" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> </
asp:Content>Not working Code :
http://i118.photobucket.com/albums/o104/coryb77/Clipboard03.jpghttp://i118.photobucket.com/albums/o104/coryb77/Clipboard04.jpg
<%
@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="tasks.aspx.vb" Inherits="tasks" title="Untitled Page" %><
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"></
asp:Content>
<
asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"><
div class="category">Current Shift Filter:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"> <asp:ListItem Value="False">Open</asp:ListItem> <asp:ListItem Value="True">Closed</asp:ListItem> </asp:DropDownList></
div><
div class="ToDoHeader"><
h2> Call In Report</h2></
div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TaskID" DataSourceID="ObjectDataSource1"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="TaskID" HeaderText="TaskID" InsertVisible="False" ReadOnly="True" SortExpression="TaskID" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" /> <asp:BoundField DataField="Shift" HeaderText="Shift" SortExpression="Shift" /> <asp:BoundField DataField="Call Answered" HeaderText="Call Answered" SortExpression="Call Answered" /> <asp:BoundField DataField="Left Message" HeaderText="Left Message" SortExpression="Left Message" /> <asp:BoundField DataField="Available" HeaderText="Available" SortExpression="Available" /> <asp:BoundField DataField="Call Returned" HeaderText="Call Returned" SortExpression="Call Returned" /> <asp:CheckBoxField DataField="Complete" HeaderText="Complete" SortExpression="Complete" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetTasksByStatus" TypeName="reportingTableAdapters.reportsTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_TaskID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Date" Type="DateTime" /> <asp:Parameter Name="Shift" Type="String" /> <asp:Parameter Name="Call_Answered" Type="String" /> <asp:Parameter Name="Left_Message" Type="String" /> <asp:Parameter Name="Available" Type="String" /> <asp:Parameter Name="Call_Returned" Type="String" /> <asp:Parameter Name="Complete" Type="Boolean" /> <asp:Parameter Name="Original_TaskID" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" Name="IsComplete" PropertyName="SelectedValue" Type="Boolean" /> </SelectParameters> <InsertParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Date" Type="DateTime" /> <asp:Parameter Name="Shift" Type="String" /> <asp:Parameter Name="Call_Answered" Type="String" /> <asp:Parameter Name="Left_Message" Type="String" /> <asp:Parameter Name="Available" Type="String" /> <asp:Parameter Name="Call_Returned" Type="String" /> <asp:Parameter Name="Complete" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> </
asp:Content>
![]() |
0 |
![]() |
If you look at the screen shot of my table in SQL server you'll notice the column "Answered"
http://i118.photobucket.com/albums/o104/coryb77/Clipboard05.jpg
When I try to edit the fields now and place a check mark in the Answered column it doesnt' retain the value but I dont get any error except the one in my grid view -
There was an error rendering the control
The data in the CheckBoxField 'Answered' could not be parsed as a boolean value. Try using a BoundField instead.Help?
![]() |
0 |
![]() |