When it comes to SQL queries you should never use
SELECT * FROM test.csv
, rather name the columns you want to extract by name. Thus if you do this
void RefreshData()
{
OdbcConnection conn = new OdbcConnection(@"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=C:\;");
OdbcCommand comm = new OdbcCommand("Select empName, salary FROM test.csv", conn);
OdbcDataAdapter adapter = new OdbcDataAdapter(comm);
DataSet ds = new DataSet();
adapter.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
}
then you should be OK.
Hope this helps