My code:
OdbcConnection conn = new OdbcConnection();
conn.ConnectionString ="Driver={Microsoft dBASE Driver (*.dbf)};Driverid=277;Dbq=D:\\DBF\\";
conn.Open();
OdbcCommand oCmd = conn.CreateCommand();
DataTable dt = new DataTable();
dt.Load(oCmd.ExecuteReader());
conn.Close();
dataGridView1.DataSource = dt;
When I run to oCmd.ExecuteReader() then error: ERROR [HY000] [Microsoft][ODBC dBase Driver] External table is not in the expected format.
You just showed your connection where your DBF file is, but didn't specified any
commandText
, Try something like that