public static List<string> GetDBTables(string connectionString) { using (SqlConnection con = new SqlConnection(connectionString)) { con.Open(); DataTable dtschema = con.GetSchema("Tables"); List<string> TableNames = new List<string>(); foreach (DataRow row in dtschema.Rows) { TableNames.Add(row[2].ToString()); } return TableNames; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)