I have a page and it lists bunch of tables in a drop down list. I need to load up a list of columns in the database dynamically. In Subsonic 2.0 it could have been done by Subsonic.Schema.BuildTableSchema but not sure how to do it in 3.0. I tried using the code below but does not work ..
SubSonic.Schema.DatabaseTable D = new SubSonic.Schema.DatabaseTable("Users",
SubSonic.DataProviders.ProviderFactory.GetProvider("ApplicationConnectionString"));
foreach (SubSonic.Schema.IColumn Column in D.Columns)
{
ListItem Item = new ListItem();
if ((Column.Name ?? "").IndexOf("Email") != -1)
{
Item.Selected = true;
}
ddlEmailColumn.Items.Add(Item);
ddlEmailColumn.SelectedValue = Column.Name;
}