ObjectDataSource 'x' could not find a non-generic method 'Update'

G

Guest

My ASP.NET 2.0 project has a GridView that I want to be able to edit and
update records with. The GridView has been bound to an ObjectDataSource
control that has the following Update method signature:

Update(Nullable<Int32> Tile_Number, String Tile_Name, String Tile_Path,
Nullable<Decimal> Value, Boolean Sold, Boolean Payment_Verified,
Nullable<Byte> Owner_Type, String Line_1, String Line_2, String First_Name,
String Last_Name, String Company, String Address, String City, String State,
String Postcode, String Country, String Email, String Phone, String
Original_Tile_Name), returns Int32

This is indeed all columns in the underlying Access table and derived
DataTable Adapter to which my ObjectDataSource is bound. Tile_Name is the PK.

Weird thing is that I get the following error when I click Update in my
GridView:
ObjectDataSource 'ods_Tiles' could not find a non-generic method 'Update'
that has parameters: Tile_Number, Tile_Name, Tile_Path, Value, Sold,
Payment_Verified, Owner_Type, Line_1, Line_2, First_Name, Last_Name, Company,
Address, City, State, Postcode, Country, Email, Phone, Original_Tile_Name,
Tile Number, Tile Name, Tile Path, Payment Verified, Owner Type, Line 1, Line
2, First Name, Last Name, original_Tile Name.

If you look closely at the error you will see that a lot of the field names
are duplicated. I simply cannot find anywhere in my project, including the
DataSet xss file, that the fields are mentioned more than once. Has anyone
else ever come across this problem?

TIA,
Scott Hooper
 
G

Guest

After a couple of days of going round and round in circles I have finally
discovered what the problem is. Make sure your tables in Access have no
spaces in the field names. That's it! *groan* I tested by putting a space
back in and got the original error - duplicated fields names in the update
function signature. I'm going out on a limb here and declaring this a bug
with Framework 2. I base this on the fact that nowhere in the code was the
problem evident. It seems to be invented at runtime by the ODS object.

Hope others can benefit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top