i'm reading DBF file using OleDb this way :
[TestMethod]
public void TestMethod2()
{
const string path = @"D:\VL816183.DBF";
var connection = new OleDbConnection(string.Format("Provider=Microsoft.Jet.Oledb.4.0;Data Source={0};Extended Properties=\"dBase IV\"", Path.GetDirectoryName(path)));
connection.Open();
var command = new OleDbCommand(string.Format("select MNO from {0}", Path.GetFileName(path)), connection);
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
var str = (string)reader["MNO"];
}
}
connection.Close();
}
Everything seems to be OK but there's problem with string data. The source database contains strings saved with CodePage=852 and I can't find way to properly read it.
I've tried to set CharSet/CodePage/CharacterSet into the connection string's extended properties but without any luck (in fact, exception was thrown: Couldn't find installable ISAM).
I've also tried to read it using 'vfpoledb' provider, still no luck.
For example there's string "FRANTIŠEK" but the str variable contains "FRANTIµEK".
Does anybody know how to do it ? Thanks