Refresh Schema doesn't work

Discussion in 'ASP .Net' started by Steve Elliott, Apr 6, 2007.

  1. When you link an ObjectDataSource to a business object, it appears that the
    Refresh Schema button does nothing. Here's the scenario:

    I have two class libraries, one is a Data Access Layer and the other is a
    List class. The former implements all of the CRUD logic, and the latter
    implements a number of interfaces for the purpose of aggregate
    functionality. For example, the following is the method I select when I
    configure the object datasource for a class I call "Template" (No relation
    to <Template>):

    public static List<TemplateInfo> GetTemplates()
    {
    List<TemplateInfo> templates = new List<TemplateInfo>();

    TemplateInfo[] templatelist =
    TemplateData.GetTemplate();

    foreach (TemplateInfo info in templatelist)
    {
    templates.Add(info);
    }

    return templates;
    }

    Now, all works fine, once I do that and link a GridView to the
    ObjectDataSource, I see my columns and can manipulate them in design mode.
    The problem occurs when I modify the underlying database object, perhaps
    adding a column. In this case the TemplateInfo class is modified to store
    the new fields. However nothing I do will cause those columns to appear in
    the "Edit Columns" wizard. I tried "Refresh Schema" to no avail. I even ran
    SQL Server Profiler to see what happens when Refresh Schema is selected -
    Nada.

    So, how do I get those columns to appear?

    Thanks
    Steve
    Steve Elliott, Apr 6, 2007
    #1
    1. Advertising

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. Markus
    Replies:
    1
    Views:
    1,530
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,251
    Stanimir Stamenkov
    Apr 25, 2005
  3. Orit
    Replies:
    1
    Views:
    474
    Masudur
    Jun 26, 2007
  4. MZ
    Replies:
    7
    Views:
    829
    Ed Mullen
    Mar 17, 2008
  5. Tilman
    Replies:
    0
    Views:
    413
    Tilman
    Mar 19, 2008
Loading...

Share This Page