Same Old ObjectDataSource Problem

Discussion in 'ASP .Net' started by SteveT, Jan 8, 2008.

  1. SteveT

    SteveT Guest

    I created an 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

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

    Steve T.
    SteveT, Jan 8, 2008
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Tim Roberts
    Oct 15, 2005
  2. Jim Hill
    Jim Hill
    Feb 12, 2007
  3. *Prot3anThr3ad*

    old repository for old C++ source code

    *Prot3anThr3ad*, Sep 29, 2006, in forum: C++
    Oct 2, 2006
  4. John Henry
    May 30, 2008
  5. David Thielen

    ObjectDataSource method as another ObjectDataSource

    David Thielen, Mar 21, 2006, in forum: ASP .Net Web Controls
    Steven Cheng[MSFT]
    Mar 23, 2006

Share This Page