473,786 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

could not find a non-generic method

I have an ObjectDataSourc e binding a GridView, with Delete enabled. The
following is the declaration (with non-delete stuff left out to save space):

<asp:ObjectData Source ID="CatalogItem sListDataSource "
runat="server" DeleteMethod="D eleteCatalogIte m"
InsertMethod="I nsertCatalogIte m"
OldValuesParame terFormatString ="original_{ 0}"
SelectMethod="G etCatalogItemsL ist"
TypeName="Catal ogItemManager" UpdateMethod="U pdateCatalogIte m">
<DeleteParamete rs>
<asp:Paramete r Name="id" Type="Int32" />
</DeleteParameter s>
....
</asp:ObjectDataS ource>

So I've got a class that has the following function:
[DataObjectMetho dAttribute
(DataObjectMeth odType.Delete, false)]
public int DeleteCatalogIt em(int id)
{
return CatalogAdapter. DeleteItemQuery (id);
}

when it runs, it gives me the following error:
[InvalidOperatio nException: ObjectDataSourc e 'CatalogItemsLi stDataSource'
could not find a non-generic method 'DeleteCatalogI tem' that has parameters:
id, original_Id.]

which seems odd, because I selected the delete method above with a single
parameter during the ObjectDataSourc e configuration wizard.

So I created another method with two parameters that works:

[DataObjectMetho dAttribute
(DataObjectMeth odType.Delete, false)]
public int DeleteCatalogIt em(int id, int original_Id)
{
return DeleteCatalogIt em(original_Id) ;
}

Which is fine, but I'm curious why it expects two parameters when I selected
the method that has one (and the DeleteParameter s shows that I only wanted
one paramter).

Thanks

Jul 19 '07 #1
0 1514

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
1674
by: Ryan Paul | last post by:
I've spent a lot of time using python, and personally, I feel like it is vastly superior when compared to languages like java, and c++, but there are still a few things that detract from its elegance and flexibility. I thought I might mention a few of them. I'd like to hear what people think of my complaints, and I also like to hear the complaints of others. 1. many keywords (eg:try/except) are strictly imperative, and cannot be used in...
10
2666
by: Steven T. Hatton | last post by:
Stroustrup says this: http://www.research.att.com/~bs/bs_faq2.html#macro "So, what's wrong with using macros?" "And yes, I do know that there are things known as macros that doesn't suffer the problems of C/C++ preprocessor macros. However, I have no
4
8459
by: simduss | last post by:
Hi, First of all, I'm a beginner with Unix. I have a "make" (Unix command) problem with a Pro*C sub-program since I installed Oracle8i (before I was at 7.3.4). I have a script builder that generate a makefile (that include env_precomp.mk) and launch this makefile after. So, I receive this error: make: 1254-002 Cannot find a rule to create target /u02/apps_r/dev/ben/lib/fcfz02.a from dependencies.
1
305
by: JP Lacasse | last post by:
I translate a web application from ASP to ASP.NET and I keep getting the following error: Could not find installable ISA I used the same ConnectString ("DBQ=" & Server.MapPath("Database\Icsdata.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};Provider=Microsoft.Jet.OLEDB.4.0;" to point to my Access Database Any Suggestions why I am getting this error message Would appreciate any help because I am stuck Thanks -- J.P. Lacass
2
11109
by: semedao | last post by:
Hi All, I developed Outlook add-in with VS 2005 , everything work fine , until the machine reboot unnormally , when I opened the solution again many projects was not there ! (I have more then 10 project that depends each other). I add them again , also add the primary output again to the setup project.
4
24186
by: Rollasoc | last post by:
Hi, We have a range of four products that can talk to our software (Written in C# & managed C++) via ethernet. Using standard socket class. This has all been working fine for a long time now, under DotNet 1.1. We have now converted the project to DotNet 2.0 Unfortunetely, the code no longer works for one of the products. The
3
3709
by: Amritha.Datta | last post by:
Can anyone tell me why the below code returns error? Exception Details: System.IO.FileNotFoundException: Could not find file Dim strLFolder As String = "c:\Temp\F Files" Dim intClientID As Integer = 1221 Dim XMLStr As String = strLFolder & "\" & intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml" Dim dsPubs As New DataSet
18
3873
by: Neehar | last post by:
Hello For one of the interviews I took recently, I was given an offline programming quiz. In 30 minutes I had to write code in C++ to counts the number of times each unique word appears in a given file. I tried my level best even after the quiz to come up with a solution but cudnt find an efficient one. :( This is what I did.
3
4428
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
12
1851
by: webinfinite | last post by:
#define D(y...) (const int ) {y} My understand is that D is taking in a various length parameter y which is an array of const int. Am I right? Thanks.
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.