转载:C# 获取数据库表信息与列信息
摘要:conn.Open();string[] restrictions = new string[4];restrictions[1] = "dbo";DataTable table = conn.GetSchema("Tables", restrictions);conn.Close();返回的table是表的所有信息,而不仅仅是名字,可以通过如下语句查看这些信息:foreach (System.Data.DataRow row in table.Rows){foreach (System.Data.DataColumn col in table.Colu
阅读全文
posted @ 2013-09-19 10:54
浙公网安备 33010602011771号