none
Open dBase file that has extension other than ".dbf" RRS feed

  • Question

  •  

    Hi there. I am using oleDB to open dBase files and this works fine as long as the file has a .dbf extension. However, if the file is named 123.env, for instance, it says it cannot be found. How do I open a dBase file that is using a different extension than .dbf?

     

    I am using visual studio 2005 with C# and OleDB

     

    string conString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + "C:\\Documents and Settings\\Path" + ";Extended Properties=dBase IV";

     

    Thanks!

    Wednesday, August 8, 2007 11:10 PM

All replies

  • Unfortunately this is a limitation of the driver. What you can do is change the extension of the file to dbf in code before attempting to open the database.

     

    Thursday, August 9, 2007 12:38 PM