Same Old ObjectDataSource Problem

S

SteveT

I created an asp.net website which works fine. I then tried to
recreate it as a series of Web Application Projects, one project for
the data layer, one for the business layer and one for the
presentation layer. They are all properly referenced up the line.
Data manipulation is via stored procedures in a SQL Server 2005
database. For the data layer, I created a dataset file with
dataadapter to the data, which works fine. The business layer
consists of a class that invokes the data layer via public functions;
GetData, AddData, UpdateData, DeleteData. My first webform is a
simple one on which I have an ObjectDataSource and Gridview to display
a simple table of text messages from users. The gridview has edit,
delete and sorting enabled. The webform loads fine, with data
displayed in the gridview. Deleting and sorting work fine. However,
when updating, I get the time-honored error: 'ObjectDataSource1' could
not find a non-generic method... I got this error when building the
website, but resolved it by naming the parameters exactly as the
database field names. However it didn't fix it this time. What
baffles me is that the select and delete methods are found in the
business layer, but the update and insert methods are not found. I
checked the method names and they are exactly the same as called and
the parameter names are exactly as specified in the functions. I've
read all the posts on this subject and manipulated the
OldvaluesParameterFormatString accordingly to no avail. I tried
creating a local procedure to update for the gridview OnUpdating
event. That works, but then the ObjectDataSource still invokes its
update method after my procedure and gives the error. If I eliminate
the update method from the ObjectDataSource, I get an error about
that.

I would sure appreciate some tips on how to resolve this. Thanks.

Steve T.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top