Esquece datareader, Voce nao esta a fazer pesquiza:
string teste = (string)("SELECT * From Tabela");
String cnn = tua conection string aqui;
System.Data.SqlClient.SqlConnection conetcme = new System.Data.SqlClient.SqlConnection(cnn.ToString());
System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(teste, conetcme);
DataSet DTS = new DataSet("Table_Copy");
try
{
conetcme.Open();
System.Data.SqlClient.SqlDataAdapter adapter = new System.Data.SqlClient.SqlDataAdapter(command);
adapter.Fill(DTS);
this.datagridview.DataSource = DTS.Tables[0];
}
catch (System.Data.SqlClient.SqlException ex)
{
MessageBox.Show(ex.ToString());
}
conetcme.Close();
}
One word frees us of all the weight and pain of life: that word is love.