473,473 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"could not find a non-generic method" when creating a very simple example with typed datasets

Hi,

I have searched for the answer for this error message without
success. I have seen the question many times though:)

I create an ASP.NET project (VS 2005, C#), and use a very simple .mdf
file (which I can provide if necessary). I use 'Add new Item' and
pick 'DataSet'. I believe this creates a TypedDataSet, CORRECT? I
take all the defaults as far as Insert, and I pick the advanced tab
and ask for Update Statements and Delete Statements to be generated.
I also ask for concurrency.

I throw a ObjectDataSource on the Page and use the DataSet I just
created. I then throw a GridView on the page and use the
ObjectDataSource just created. I also set it up for Deleting, Editing,
Sorting. I can run the program and see the data, and Sorting works
fine. However, when I hit Delete on a row, nothing happen. When I
edit, it goes into edit mode fine, but when I hit upate, I get:

ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'Update' that has parameters: date, miles, hours, minutes,
seconds, description, Original_id, Original_date, Original_miles,
Original_hours, Original_minutes, Original_seconds,
Original_description.

What is going on here? I would think this is a pretty simple example
and should work. I have another clue....
Based on reading other newsgroups I tried changing the
OldValuesParamatersFormatString from Original_{0} to {0}. When I do
this, the behavior is reversed, the Update does nothing, the delete
caused an error like the one above.

Like I said, I've seen this question posed many times but I have not
seen an answer. Or I did not understand the answer, I am new to
ASP.NET programming.

If you got this far, thank you, and I would also be curious what
people think of this approach to get data. Would I be better off
writing my own dataclasses for example? Can I use the dataset
approach but not have Visual Studio generate the Update, Delete, etc.
If so, can you give me examples of what they should look like?

Please let me know if I should provide more information or if there is
a more appropriate newsgroup.

With many thanks,

Dave.

Mar 16 '07 #1
2 4187
SAL
Oh, more ideas here.
Alternatively, if you want to ensure concurrency, you could write a business
logic layer class that maps to your table adapter. In that class, you could
write an update method that takes the original values plus the new values
that are shown in your code below and check to see if the values have change
since you started your editing session, if they have, you know another user
has changed them and you can ask your user if they want to overwrite the
changed values. Just a thought.

This website talks about a lot of this stuff in tutorial fashion:
http://www.asp.net/learn/dataaccess/....aspx?tabid=63
I've still come up with a lot of errors and questions though.
S

"SAL" <SA**@NoNo.comwrote in message
news:Od**************@TK2MSFTNGP06.phx.gbl...
See if this attribute is in the markup for the control:
OldValuesParameterFormatString="original_{0}
if it is, try getting rid of it and see if that stupid error goes away.

If is unlikely that your update method expects any of the original values
to come along for the ride. There's probably a better way to do this but
I'm still really new at this too so it's what I did.

S

"dave" <bi*********@yahoo.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
>Hi,

I have searched for the answer for this error message without
success. I have seen the question many times though:)

I create an ASP.NET project (VS 2005, C#), and use a very simple .mdf
file (which I can provide if necessary). I use 'Add new Item' and
pick 'DataSet'. I believe this creates a TypedDataSet, CORRECT? I
take all the defaults as far as Insert, and I pick the advanced tab
and ask for Update Statements and Delete Statements to be generated.
I also ask for concurrency.

I throw a ObjectDataSource on the Page and use the DataSet I just
created. I then throw a GridView on the page and use the
ObjectDataSource just created. I also set it up for Deleting, Editing,
Sorting. I can run the program and see the data, and Sorting works
fine. However, when I hit Delete on a row, nothing happen. When I
edit, it goes into edit mode fine, but when I hit upate, I get:

ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'Update' that has parameters: date, miles, hours, minutes,
seconds, description, Original_id, Original_date, Original_miles,
Original_hours, Original_minutes, Original_seconds,
Original_description.

What is going on here? I would think this is a pretty simple example
and should work. I have another clue....
Based on reading other newsgroups I tried changing the
OldValuesParamatersFormatString from Original_{0} to {0}. When I do
this, the behavior is reversed, the Update does nothing, the delete
caused an error like the one above.

Like I said, I've seen this question posed many times but I have not
seen an answer. Or I did not understand the answer, I am new to
ASP.NET programming.

If you got this far, thank you, and I would also be curious what
people think of this approach to get data. Would I be better off
writing my own dataclasses for example? Can I use the dataset
approach but not have Visual Studio generate the Update, Delete, etc.
If so, can you give me examples of what they should look like?

Please let me know if I should provide more information or if there is
a more appropriate newsgroup.

With many thanks,

Dave.


Mar 16 '07 #2
SAL
See if this attribute is in the markup for the control:
OldValuesParameterFormatString="original_{0}
if it is, try getting rid of it and see if that stupid error goes away.

If is unlikely that your update method expects any of the original values to
come along for the ride. There's probably a better way to do this but I'm
still really new at this too so it's what I did.

S

"dave" <bi*********@yahoo.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
Hi,

I have searched for the answer for this error message without
success. I have seen the question many times though:)

I create an ASP.NET project (VS 2005, C#), and use a very simple .mdf
file (which I can provide if necessary). I use 'Add new Item' and
pick 'DataSet'. I believe this creates a TypedDataSet, CORRECT? I
take all the defaults as far as Insert, and I pick the advanced tab
and ask for Update Statements and Delete Statements to be generated.
I also ask for concurrency.

I throw a ObjectDataSource on the Page and use the DataSet I just
created. I then throw a GridView on the page and use the
ObjectDataSource just created. I also set it up for Deleting, Editing,
Sorting. I can run the program and see the data, and Sorting works
fine. However, when I hit Delete on a row, nothing happen. When I
edit, it goes into edit mode fine, but when I hit upate, I get:

ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'Update' that has parameters: date, miles, hours, minutes,
seconds, description, Original_id, Original_date, Original_miles,
Original_hours, Original_minutes, Original_seconds,
Original_description.

What is going on here? I would think this is a pretty simple example
and should work. I have another clue....
Based on reading other newsgroups I tried changing the
OldValuesParamatersFormatString from Original_{0} to {0}. When I do
this, the behavior is reversed, the Update does nothing, the delete
caused an error like the one above.

Like I said, I've seen this question posed many times but I have not
seen an answer. Or I did not understand the answer, I am new to
ASP.NET programming.

If you got this far, thank you, and I would also be curious what
people think of this approach to get data. Would I be better off
writing my own dataclasses for example? Can I use the dataset
approach but not have Visual Studio generate the Update, Delete, etc.
If so, can you give me examples of what they should look like?

Please let me know if I should provide more information or if there is
a more appropriate newsgroup.

With many thanks,

Dave.

Mar 16 '07 #3

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

Similar topics

2
by: Randy Crockett | last post by:
I have created a very simple DLL in VC++ 6.0, then created a very simple App in VC++ 6.0 to use the DLL and this works fine When I try to use the same DLL in C#, with DLLImport, the app finds the...
3
by: Brian Fulford | last post by:
I am trying to deploy a web app with a deployment project since I am including Crystal Reports for .Net. I attached all the merge modules, etc but I am getting a build error when I try to build...
2
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight...
0
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight...
7
by: gretean | last post by:
I have a problem that's driving me crazy involving Microsoft's ability to deduce template parameters. I am using Visual Studio .NET (aka VC7?), and it gives an error compiling the following code....
0
by: drewmania001 | last post by:
When trying to setup relplication for SQL i am getting the following error. "The system cannot find the path specified" The problem is when trying to run: sp_adddistributiondb line 434:...
21
by: comp.lang.tcl | last post by:
set php {<? print_r("Hello World"); ?>} puts $php; # PRINTS OUT <? print_r("Hello World"); ?> puts When I try this within TCL I get the following error:
0
by: manevolution | last post by:
I've used php mambo and oracle 9 to develop a web-based application..I also used separate server for database and the system..but sometime an error occur to the database connection, its display...
4
by: ramaswamynanda | last post by:
Hello All, I have developed an application using Ms Access 2000. My client has Access 2003. I shipped him the code yesterday and he got an error hile running the application via the mdb file...
6
by: prknsutton | last post by:
I have a continuous bound form on a FE stored on desktop of each user PC. The BE sits on a local network drive. I have the default record locking to "No Locks" and Open Database Using Record Level...
0
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,...
0
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,...
1
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
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...

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.