Ejemplo n.º 1
0
        private void btnGetDatabase_Click(object sender, EventArgs e)
        {
            Database database;
            if (rdbUseSqlServer.Checked)
            {
                database = new SqlServerDatabase();
            }
            else
            {
                database = new OleDBDatabase();
            }

            DbCommand command = database.Command;
            // now, we can do something, like:
            //command.CommandType = CommandType.Text;
            //command.CommandText = "SELECT * FROM Customers";
            //command.Connection.Open();
            //DbDataReader reader = command.ExecuteReader();

            //reader.Close();
            //command.Connection.Close();
        }