protected void Page_Load(object sender, EventArgs e) { #region SqlServer //var dbHelper = new DbHelper(DatabaseType.SqlServer); //var connectionString = ConfigurationManager.ConnectionStrings["MSSQLSERVER"].ToString(); //var cmdText = "SELECT * FROM Articles"; //var dataTable = dbHelper.ExecuteDataTable(connectionString, CommandType.Text, cmdText); //TestDb.DataSource = dataTable; //TestDb.DataBind(); #endregion #region Oracle var dbHelper = DbHelperFactory.GetInstance(DatabaseType.Oracle); var connectionString = ConfigurationManager.ConnectionStrings["ORACLE"].ToString(); var cmdText = "SELECT * FROM v计划"; var dataTable = dbHelper.ExecuteDataTable(connectionString, CommandType.Text, cmdText); TestDb.DataSource = dataTable; TestDb.DataBind(); #endregion }