T
Tina
I'm trying to do something very straightforward in a 2.0 asp.net app with a
GridView - ObjectDataSource - DataSet.
I create a DataSet that accesses the NorthWind Customers Table - all columns
and I choose to generate all methods and updates. I connect this DataSet to
an ObjectDataSource and connect my DataView to the ObjectDataSource. (I did
not opt for optimistic concurrency) It displays just fine. Then I try to
change an address field in a row and get the error pasted below. The update
command that was generated is also pasted below. This is stuff right out of
textbooks. What is wrong?
Thanks,
T
ObjectDataSource 'ods2' could not find a non-generic method 'Update' that
has parameters: CompanyName, ContactName, ContactTitle, Address, City,
Region, PostalCode, Country, Phone, Fax, original_CustomerID.
UPDATE Customers
SET CustomerID = @CustomerID, CompanyName = @CompanyName,
ContactName = @ContactName, ContactTitle = @ContactTitle, Address =
@Address,
City = @City, Region = @Region, PostalCode =
@PostalCode, Country = @Country, Phone = @Phone, Fax = @Fax
WHERE (CustomerID = @Original_CustomerID)
GridView - ObjectDataSource - DataSet.
I create a DataSet that accesses the NorthWind Customers Table - all columns
and I choose to generate all methods and updates. I connect this DataSet to
an ObjectDataSource and connect my DataView to the ObjectDataSource. (I did
not opt for optimistic concurrency) It displays just fine. Then I try to
change an address field in a row and get the error pasted below. The update
command that was generated is also pasted below. This is stuff right out of
textbooks. What is wrong?
Thanks,
T
ObjectDataSource 'ods2' could not find a non-generic method 'Update' that
has parameters: CompanyName, ContactName, ContactTitle, Address, City,
Region, PostalCode, Country, Phone, Fax, original_CustomerID.
UPDATE Customers
SET CustomerID = @CustomerID, CompanyName = @CompanyName,
ContactName = @ContactName, ContactTitle = @ContactTitle, Address =
@Address,
City = @City, Region = @Region, PostalCode =
@PostalCode, Country = @Country, Phone = @Phone, Fax = @Fax
WHERE (CustomerID = @Original_CustomerID)