473,807 Members | 2,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual Studio non-generic method bug

I have just spent a very frustrating morning reading postings on this problem
and nothing seems to work. I am trying to write a demo project in VB/ASP.net
2.0 and I am unable to get any sort of edit page to work. This is extremely
simple stuff, straight out of one of Microsoft's training videos. Drag a
table on to the xsd, create queries, then create a page with a bound
DetailsView (bound to a tableadapter). Then set the DetailsView to permit
edits. (The initial display of data works fine.) No code whatsoever.

No matter what I try, when I try to update the data I wind up with the
error:ObjectDat aSource 'ObjectDataSour ce1' could not find a non-generic
method 'Update' that has parameters: ItemName, ItemDesc, ProjectLeadID,
StartDate, FinishDate, GatesId, Resources, original_Projec tId,
original_ItemID .

Is there any way to get this to work?
Nov 14 '07 #1
3 1195
ObjectDataSourc e expects its underlying type to have a method named Update.
Does yours have one? That's what the exception is saying. if you need sample
code, visit the ASP.NET Quickstarts tutorial at the asp.net website.

--Peter
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"B. Chernick" wrote:
I have just spent a very frustrating morning reading postings on this problem
and nothing seems to work. I am trying to write a demo project in VB/ASP.net
2.0 and I am unable to get any sort of edit page to work. This is extremely
simple stuff, straight out of one of Microsoft's training videos. Drag a
table on to the xsd, create queries, then create a page with a bound
DetailsView (bound to a tableadapter). Then set the DetailsView to permit
edits. (The initial display of data works fine.) No code whatsoever.

No matter what I try, when I try to update the data I wind up with the
error:ObjectDat aSource 'ObjectDataSour ce1' could not find a non-generic
method 'Update' that has parameters: ItemName, ItemDesc, ProjectLeadID,
StartDate, FinishDate, GatesId, Resources, original_Projec tId,
original_ItemID .

Is there any way to get this to work?
Nov 14 '07 #2
Ignore previous 'expression of opinion'. Finally found enough to get it to
work, at least in this example.

Basically:
1. Go into the update command string, eliminate all references to key fields
in the SET section, and get rid of anything that ISN"T a key field in the
WHERE clause.
2. Then setup the gridview in the usual fashion, but then go into the html
and set OldValuesParame terFormatString ="{0}"

When are they going to fix this?

"B. Chernick" wrote:
I have just spent a very frustrating morning reading postings on this problem
and nothing seems to work. I am trying to write a demo project in VB/ASP.net
2.0 and I am unable to get any sort of edit page to work. This is extremely
simple stuff, straight out of one of Microsoft's training videos. Drag a
table on to the xsd, create queries, then create a page with a bound
DetailsView (bound to a tableadapter). Then set the DetailsView to permit
edits. (The initial display of data works fine.) No code whatsoever.

No matter what I try, when I try to update the data I wind up with the
error:ObjectDat aSource 'ObjectDataSour ce1' could not find a non-generic
method 'Update' that has parameters: ItemName, ItemDesc, ProjectLeadID,
StartDate, FinishDate, GatesId, Resources, original_Projec tId,
original_ItemID .

Is there any way to get this to work?
Nov 14 '07 #3
Thanks. The PDFs may be of some use, but what are those people at ASP.net
thinking? They've forgotten to put the solution files in with the sample
code.

"Peter Bromberg [C# MVP]" wrote:
ObjectDataSourc e expects its underlying type to have a method named Update.
Does yours have one? That's what the exception is saying. if you need sample
code, visit the ASP.NET Quickstarts tutorial at the asp.net website.

--Peter
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"B. Chernick" wrote:
I have just spent a very frustrating morning reading postings on this problem
and nothing seems to work. I am trying to write a demo project in VB/ASP.net
2.0 and I am unable to get any sort of edit page to work. This is extremely
simple stuff, straight out of one of Microsoft's training videos. Drag a
table on to the xsd, create queries, then create a page with a bound
DetailsView (bound to a tableadapter). Then set the DetailsView to permit
edits. (The initial display of data works fine.) No code whatsoever.

No matter what I try, when I try to update the data I wind up with the
error:ObjectDat aSource 'ObjectDataSour ce1' could not find a non-generic
method 'Update' that has parameters: ItemName, ItemDesc, ProjectLeadID,
StartDate, FinishDate, GatesId, Resources, original_Projec tId,
original_ItemID .

Is there any way to get this to work?
Nov 14 '07 #4

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

Similar topics

33
3176
by: John Timbers | last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a lot cheaper than Visual Studio (note that I'm a very experienced C++ developer). Can someone simply clarify the basic differences. Ok, Visual Studio has C++, VB and J++ thrown in plus some extra bells and whistles (I already have some minimal experience) but are both IDE's essentially the same (including the same IDE support for creating forms, ADO.NET DataSets,...
34
1730
by: John Timbers | last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a lot cheaper than Visual Studio (note that I'm a very experienced C++ developer). Can someone simply clarify the basic differences. Ok, Visual Studio has C++, VB and J++ thrown in plus some extra bells and whistles (I already have some minimal experience) but are both IDE's essentially the same (including the same IDE support for creating forms, ADO.NET DataSets,...
1
19854
by: bharathreddy | last post by:
This Article gives an introduction to VSTS Team Foundation & fundamental difference between Visual Source Safe (VSS) and VSTS Team Foundation. Team Foundation is a set of tools and technologies that enable a team to collaborate and coordinate a project (software or non software projects). The team collaboration is achieved by several tools and features available as part of "Team Foundation". Team Foundation Server The Team...
1
2899
by: cnixuser | last post by:
Hello, I am having a problem that I believe is related to the way a stream reader object looks for a text file by default. What I am doing is using a StreamReader object to read the text of a text file which includes some html code to populate html formatted content as the text of an asp:label (<asp:label>). The reading of the text file itself goes just fine ;however, this only occurs when I use an absolute file path which will not work of...
2
3404
by: Cramer | last post by:
So, what is the relationship between Visual Studio and Visual Web Developer. I find a lot of documentation on MSDN that presents Visual Web Developer as it's own stand-alone product (which I'd expect of the Express editions), but apparently there are NON Express versions of Visual Web Developer. Is Visual Web Developer only built-in to Visual Studio 2008 Professional? I see "Microsoft Visual Web Developer 2008" listed as an installed...
0
9721
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
10628
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
10373
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...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10113
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
9195
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
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.