system.data.sqlclient.sqldatareader has no constructors defined

public static SqlDataReader reader(string query)
{
    SqlDataReader sdr = new SqlDataReader();
    SqlConnection con = new SqlConnection(constring());

    con.Open();
    SqlCommand cmd = new SqlCommand(query, con);


    sdr = cmd.ExecuteReader();
    return sdr;
}


Source: .net

Leave a Reply