ObjectDataSource 'SearchDataSource1' could not find a non-generic method 'Update' that has parameters ...

Sorry to post yet another question about this.  I've spent 5 days googling and found great solutions such as:  In Design Mode on your aspx click on your SearchDataSource and change the OldValuesParameterFormatString from "Origional_{0}" to "{0}" without the quotes.  I've also read that you should set the ID columns read-only property to false.  I've also read several posts where someone has just mis-spelled something or the parameters in their Update didn't match their DataSet.  So I've seen many happy people and I'm a hopeful one, yet a little downcast.

I keep trying to get this simple Update to work, usually from a fresh start where I just create an ASPX. page and a DataSet.  I set my DataSet up to pull everything off of a SQL table (which does have a primary key).  I check the code in the DataSet and Select, Insert, Update and Delete code chunks are created with one interesting deviation from what I expect.  I have two columns in my DB whose names begin with a number.  These columns are re-named as "P1" and "P2" in the code chunk, interesting but, I'm not too offended, as long as the data get to where it needs to go.

Then I drop a GridView onto the design surface of the ASPX page and setup the SearchDataSource to link to the DataSet and check to make sure that the Select and Update functions were found. Then I try to "View in Browser" and the GridView pops up with all my data and everything looks perfect.  I click on edit, update a field then update and get the error.  Interestingly, this method works perfectly for a different table in the same database and the update also works perfectly!  It's just this table...could it be because of the columns whose names begin with a number and the whole re-naming fiasco?  How can I fix this?  Thanks for reading my question.  If you're in a similar boat, please add a comment and join the boat.  If you happen to be a Cruise Ship or the ASP version of the Coast Guard, HELP!

 

<%' .aspx page --> cc1:SearchDataSource --> %>

<UpdateParameters>

<asp:Parameter Name="SerNum" Type="String" />

<asp:Parameter Name="InspectDate" Type="DateTime" />

<asp:Parameter Name="Lot" Type="String" />

<asp:Parameter Name="Rework" Type="Boolean" />

<asp:Parameter Name="Dead" Type="Int32" />

<asp:Parameter Name="Type" Type="String" />

<asp:Parameter Name="Visual" Type="String" />

<asp:Parameter Name="Accept" Type="Boolean" />

<asp:Parameter Name="Comments" Type="String" />

<asp:Parameter Name="Irr01" Type="Int32" />

<asp:Parameter Name="Irr02" Type="Int32" />

<asp:Parameter Name="Irr03" Type="Int32" />

<asp:Parameter Name="Irr04" Type="Int32" />

<asp:Parameter Name="Irr05" Type="Int32" />

<asp:Parameter Name="Irr06" Type="Int32" />

<asp:Parameter Name="Irr07" Type="Int32" />

<asp:Parameter Name="Irr08" Type="Int32" />

<asp:Parameter Name="Irr09" Type="Int32" />

<asp:Parameter Name="Irr10" Type="Int32" />

<asp:Parameter Name="1xVolt" Type="Double" />

<asp:Parameter Name="2xVolt" Type="Double" />

<asp:Parameter Name="ManufacturedRXUnitSN" Type="Int32" />

<asp:Parameter Name="ID" Type="Int32" />

</UpdateParameters>

<%' end .aspx page --> cc1:SearchDataSource --> %>

 

<%' DataSet --> cc1:SearchDataSource --> %>

<UpdateCommand>

<DbCommand CommandType="Text" ModifiedByUser="False">

<CommandText>UPDATE [PostMoldInspection] SET [SerNum] = @SerNum, [InspectDate] = @InspectDate, [Lot] = @Lot, [Rework] = @Rework, [Dead] = @Dead, [Type] = @Type, [Visual] = @Visual, [Accept] = @Accept, [Comments] = @Comments, [Irr01] = @Irr01, [Irr02] = @Irr02, [Irr03] = @Irr03, [Irr04] = @Irr04, [Irr05] = @Irr05, [Irr06] = @Irr06, [Irr07] = @Irr07, [Irr08] = @Irr08, [Irr09] = @Irr09, [Irr10] = @Irr10, [1xVolt] = @p1, [2xVolt] = @p4, [ManufacturedRXUnitSN] = @ManufacturedRXUnitSN WHERE (([ID] = @Original_ID))</CommandText>

<Parameters>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@SerNum" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="SerNum" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@InspectDate" Precision="0" ProviderType="SmallDateTime" Scale="0" Size="0" SourceColumn="InspectDate" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Lot" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Lot" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Rework" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Rework" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Dead" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Dead" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Type" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Type" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Visual" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Visual" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Accept" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Accept" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Comments" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Comments" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr01" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr01" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr02" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr02" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr03" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr03" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr04" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr04" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr05" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr05" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr06" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr06" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr07" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr07" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr08" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr08" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr09" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr09" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Irr10" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Irr10" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="1xVolt" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@p4" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="2xVolt" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ManufacturedRXUnitSN" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ManufacturedRXUnitSN" SourceColumnNullMapping="False" SourceVersion="Current"></Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ID" SourceColumnNullMapping="False" SourceVersion="Original"></Parameter>

</Parameters>

</DbCommand>

</UpdateCommand>

<%' End DataSet --> cc1:SearchDataSource --> %>

0
marsonj
8/24/2007 10:34:56 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

0 Replies
727 Views

Similar Articles

[PageSpeed] 17

Reply:

Similar Artilces:

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters:
Looks like I am not the only person th ever have a problem with this, and I have it working fine on other forms.   Any help would be appreciated.  Again here select, and delete are ok.  I handle the adds with BLL code just the Update is making me crazy.  I have included the code for the aspx page and a snippet of the xsd code dealing with the Update. Error Message: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: CompanyID, FacilityName, Address1, Address2, C...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters:
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. Excepti...

Where do I look in my source to find the code that is causing this error ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters
Hi; My problem began when I deleted the key field in my grid view. I checked my web page code and also corrected my update command and parameters in my table adapter. I would really rather not start over. Thanks for any insights !         GMann Hi, Can you provide the code? Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Hi;   Problem S O L V E D !   I thought ...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'name_of_the Method' that has parameters
Hi am getting this error when am trying to insert new record in Details View   ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'insertdata' that has parameters    The data source for the details view is objectdatasoure which configured on class located in app_code folder   the class contain 2 methods one for selecting and one for inserting  ,     please anyone can help to solve this problem 1) Did you define the method that will handle the inserting for the ObjectDataSource control? (posting the code from the .as...

Error updating with datagridview: ObjectDataSource 'objsavers' could not find a non-generic method 'Update' that has parameters: ContentID, Title, Price, DisplayDate, EndDate, original_ID
Hello,    I am having difficulty with using the objectdatasource tied to a typed dataset in another assembly. I dragged my table over to my typed dataset.  I dragged a datagridview to my form.  I told it to create a new objectadatasource, and pulled its data from a query I added called FillByContentID (which gets its parameter from the querystring, as in request.querystring("id")). It pulls the data just fine, I try to edit a row, and when I update the row, I get the following error message: ObjectDataSource 'objsavers' could not find a non-generic method 'Update...

DB Column Name with spaces: ObjectDataSource 'odsEquipment' could not find a non-generic method 'Update' that has parameters
I created a very simple web form to update a table which contains column names with spaces. For example: Serial Number,  Stock Number, etc. However, it seems the FormView control try to find the update method which has two parameters for each column name contains space (one with space and another one of underscore, e.g. Serial Number and Serial_Number) The error message is ObjectDataSource 'odsEquipment' could not find a non-generic method 'Update' that has parameters: Year, Manufacture, Model, Price, Serial_Number, Condition, Stock_Number, Horse_Power, Driv...

ObjectDataSource 'ObjectDataSourceMac' could not find a non-generic method 'Update'
I am using GridView for editing my data in Visual Studio 2005. So, when I click on "update", following error has been occuring. ObjectDataSource 'ObjectDataSourceMac' could not find a non-generic method 'Update' that has parameters: Machine_Type, Model, Manufacturer, Sold, original_Machine_ID, Machine Type. May the smile on your face Come straight from your heart :)khuram latifSr. Web Developer, As the error message suggests, you need an Update command in your ObjectDataSource that has those parameters. It must also be non-generic, again, as the error m...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'GetRatings' that has no parameters.
I've been studying this tutorial over here at: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/databases.aspx#updatedelete but I can't seem to get my gridview working.  I want to be able to edit the fields and also delete an entire row from the table if needed. I hard coded in the update and delete commands into my objectdatasource but I still get the error message. Also, I can't even refresh the aspx page: <%@ Page Language="VB" MasterPageFile="~/templates/admin.master" AutoEventWireup="false" CodeFile="article_comments.as...

ObjectDataSource 'assessComps' could not find a non-generic method 'GetCompetenciesByAssessmentID' that has parameters
I am attempting to create a 3 tier architecture as described in Scott Mitchell's tutorial on this site, and I receive the following error that is driving me insane.  ObjectDataSource 'assessComps' could not find a non-generic method 'GetCompetenciesByAssessmentID' that has parameters I have seen several posts in relation to this error message but those all seem to be in regard to inserting, updating, or deleting data. In my case, I only need to select the data, and I couldn't find anything relative to that here. On to the code...  The code for each tier is as follows. Pre...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'updateEvent' that has parameters
Hello, I am a J2EE developer who is now look at ASP.NET 2. I have written two very basic aspx pages and a Eventsdb.cs as the data access layer. However I have encountered the following error when the broswer redirect to the second aspx page : "ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'updateEvent' that has parameters". The first aspx page tags are as follows: <form id="form1" runat="server"> <div> <div style="width: 594px; height: 37px"> <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource1" DataTextFi...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Insert' that has parameters
Same problem 99% of all Object programmers in VS2005 are having when using Insert and XSD's.  I have a DETAILS VIEW (not a gridview) for INSERTING records into a database.  XSD has been built with ONE stored procedure added to it (thought I'd narrow it down).  The spInsertRecord (for example) is connected to the INSERT dropdown on the datasource and the SELECT procedure (of course, we HAVE to have one of those or you jsut don't get the "next" button in the wonderful wizard of MS) set to CreateObjRef (because I've already tried creating a SP just for ...

ObjectDataSource '...' could not find a non-generic method '...'
In Visual Studio 2008 Professional Edition, I've created an ASPX page that uses a DetailsView and an ObjectDataSource ('ObjectDataSource1') to connect to an Access 2003 database, via a TableAdapter.  I've successfully created SELECT and UPDATE ('UpdateAddrQuery') methods in the TableAdapter but noticed that when I included any of these columns [E-mail], [2003Campaign], [2007Campaign], [Date Joined], [Grant Size], and [Next Deadline], it would generate an error message.  In the case  of [Next Deadline] it is as follows:   ObjectDataSource 'O...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'GetData' that has parameters: CustomerID, .
Hi all!  I'm getting this error in my page. I have a ReportViewer object and its ObjectDataSource. I've seen some fixes changing the OldValuesParameterFormatString from "original_{0}" to "{0}", but no way. Any idea? <rsweb:ReportViewer ID="RVScan" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="100px" Width="150px" ShowToolBar="False"> <LocalReport ReportPath="ReportScan.rdlc"> <DataSources> <rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="MonitorDS_AuditMonitor" /> </DataSources> </LocalReport> </rsweb:Repo...

ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'FillMenusByLocation' that has parameters: @locationId
I'm trying to use a typed dataset and ObjectDataSource binding to SQLX db using a foreign key to filter the returned result set to display in a GridView.The error is generated when I try to bind the following GridView to the ObjectSource that follows: <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" SelectMethod="FillMenusByLocation"             TypeName="RestaurantsTableAdapters.MenusTableAdapter" UpdateMethod="Update">    <DeleteParameters> &nbs...

Web resources about - ObjectDataSource 'SearchDataSource1' could not find a non-generic method 'Update' that has parameters ... - asp.net.object-datasource

Resources last updated: 12/25/2015 11:58:55 PM