Public feed #527691

Mine

public text v1 · immutable
Raw Edit
·published 2007-06-01 12:06 UTC
rendered paste body
    
datalogic.class:

public static MySqlDataReader GetShows(string artist)
    {

        string sql = "SELECT LOWER(country) as country,city,event,date,artist FROM shows";

        MySqlConnection connection = ConnectionManager.GetMySqlConnection();
        MySqlCommand command = new MySqlCommand(sql, connection);
        command.CommandType = CommandType.Text;

        MySqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleResult | CommandBehavior.CloseConnection);
        return reader;
    }


aspx.cs-file:


        MySqlDataReader dr = DataLogic.GetShows("theartist");
        GridView1.DataSource = dr;
        GridView1.DataBind();