I'm using the GetOleDbSchemaTable to get column info from an access db, column_name and description,
but can't figure out how to bind just the 'DESCRIPTION' and 'COLUMN_NAME' columns from the table of info returned.

below is what doesn't work, it produces grid columns for all the schematable columns, about 25 different things,

    Dim schemaTable = dbConn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, _
                      New Object() {Nothing, Nothing, "VolDataNew", Nothing})
grid1.DataSource = schemaTable
grid1.DataBind()

<ItemTemplate>
<asp:Label ID="desc" 
  text='<%# DataBinder.Eval(Container.DataItem,"DESCRIPTION") %>'
    runat="server" />
</ItemTemplate>

Use

DataTable dt = new DataTable();
        dt.Columns= dt.Columns.Remove("column name");

and then bind the edited table to gridview

please explain, you have lost me. perhaps the problem was not made clear
see attached, that is a partial pic of all the columns displayed from text='<%# DataBinder.Eval(Container.DataItem,"DESCRIPTION") %>
I want to display the column of my choosing from the table results of GetOleDbSchemaTable and only that column. since there are so many columns in the GetOleDbSchemaTable, it would be impractible to exclude them one by one

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.