I try to connect to DBF database using C# (I try 3 types of connection)
string connectionString = @"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\employees.dbf;";
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\employees.dbf;Extended Properties=dBASE IV;";
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\employees.dbf;Extended Properties=dBASE IV;User ID=Admin;Password=;";
using (OdbcConnection connection = new OdbcConnection(connectionString))
{
connection.Open();
}
and I got error
error1:
ERROR [HY024] [Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [HY024] [Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
or error2:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
what can be the problem ?
thanks in advance