Velocity Reviews

Velocity Reviews (
-   ASP .Net (
-   -   Refresh Schema doesn't work (

Steve Elliott 04-06-2007 03:45 PM

Refresh Schema doesn't work
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 =

foreach (TemplateInfo info in templatelist)

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 -

So, how do I get those columns to appear?


All times are GMT. The time now is 12:39 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.