//schemaTable将取到所有用户表的信息,schemaTable取到指定表名的表的所有信息
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[]{null, null, null, "table"});
DataTable schemaTable2 = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, new Object[]{null, null, /*tablename*/, null});
conn.Close();
本文地址:http://com.8s8s.com/it/it42735.htm