Exemplo n.º 1
0
        public void ExecuteInsert(string script)
        {
            SchoolConnection s = new SchoolConnection();
            MySqlConnection  c = s.Create();

            MySqlCommand c1 = c.CreateCommand();

            c1.CommandText = script;

            c1.ExecuteNonQuery();
            c.Close();
        }
Exemplo n.º 2
0
        public MySqlDataReader ExecuteSelect(string script)
        {
            SchoolConnection s = new SchoolConnection();
            MySqlConnection  c = s.Create();

            MySqlCommand c1 = c.CreateCommand();

            c1.CommandText = script;

            MySqlDataReader r = c1.ExecuteReader(System.Data.CommandBehavior.CloseConnection);

            return(r);
        }