Why does OdbcConnection.GetSchema() fail on view columns for Access - sometimes?


  • Hi;

    We have an Access database from a prospect that is returning no columns for all views (except 1). My code is:

    	DataTable schemaTable = conn.GetSchema("columns", restrictions);
    	int ordRemarks = schemaTable.Columns.IndexOf("REMARKS");
    	int ordName = schemaTable.Columns.IndexOf("COLUMN_NAME");
    	int ordType = schemaTable.Columns.IndexOf("TYPE_NAME");
    	foreach (DataRow rowOn in schemaTable.Rows)

    The returned schemaTable has 0 rows. Is there something I have wrong in this?

    thanks - dave

    Who will win The International Collegiate Programming Championships?

    Thursday, September 06, 2012 4:34 PM

All replies