public static string GetActiveDatabase() { return(AnalyzeConnectionStringRetriveDatabaseName(ConfigManager.GetConnectionString())); }
public DataRow GetReportConfigInfo(string reportCode) { DataTable dataTable = new DataTable(); try { string query = "select field_caps, sql_from,detail_fieldsets from " + ConfigManager.GetReportTableName() + " where upper(report_code) ='" + reportCode.ToUpper() + "'"; using (OleDbConnection dbConnection = new OleDbConnection(ConnectionString)) { using (OleDbDataAdapter adapter = new OleDbDataAdapter()) { adapter.SelectCommand = new OleDbCommand(query, dbConnection); adapter.Fill(dataTable); return(dataTable.Rows[0]); } } } catch (Exception ex) { throw new Exception("From GetDataTable method:" + ex.Message); } return(null); }