private DataTable GetColumns() { DataTable tbl = new DataTable(); try{ using (CrudDAC dac = new CrudDAC(u.ConnectionString)) { tbl = dac.GetColumns(this.txtTableName.Text); } } catch (Exception ex) { MessageBox.Show(ex.Message); } return tbl; }
private string Execute(string sql, string name) { if (sql == "") return ""; if (Util.Utility.UserSettings.ResultsToFile){ SuccessLog.Append(sql); return ""; } try { using (CrudDAC dac = new CrudDAC(u.ConnectionString)) { dac.Execute(sql); } } catch { ErrorLog.Append("----------------ERROR! Following procedure did not generate--\r\n"); ErrorLog.Append(sql); return name + ", "; } SuccessLog.Append("--Following Procedure was created:"); SuccessLog.Append(sql); return ""; }