Esempio n. 1
0
 public Table GetTableMetadata(string tableName)
 {
     string selectCmdText = string.Format("SELECT * FROM {0}", tableName); ;
     MySqlCommand command = new MySqlCommand(selectCmdText, conn);
     MySqlDataAdapter ad = new MySqlDataAdapter(command);
     System.Data.DataSet ds = new DataSet();
     ad.FillSchema(ds, SchemaType.Mapped, tableName);
     Table table = new Table(ds.Tables[0]);
     return table;
 }
Esempio n. 2
0
 private static void Display(string tableName, Table table)
 {
     Console.WriteLine("tableName:{0},table.ColumnNames:{1}", tableName, table.ColumnNames);
 }