Can you use Microsoft.ACE.OLEDB.12.0 with dBASE IV files? RRS feed

  • Question

  • Hey everyone. I'm trying to use Powershell 2.0 to load a DBF file into SQL. Is it possible to use Microsoft.ACE.OLEDB.12.0 for this? My code is below but when I run it I get the "Could not find installable ISAM" error. Thanks for the tips.

    $ConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\temp\Member_51206.DBF;Extended Properties={dbase IV};"

    $Conn = new-object System.Data.OleDb.OleDbConnection $ConnString



    PS C:\temp> $ConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\temp
    \Member_51206.DBF;Extended Properties={dbase IV};"
    PS C:\temp>
    PS C:\temp>
    PS C:\temp> $Conn = new-object System.Data.OleDb.OleDbConnection $ConnString
    PS C:\temp> $Conn.open()
    Exception calling "Open" with "0" argument(s): "Could not find installable ISAM
    At line:1 char:11
    + $Conn.open <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException





    Tuesday, January 4, 2011 9:43 PM


  • Not familiar with Powershell syntax but yes you can use the ACE OLEDB Provider with dBase. The connection string would look like the following (VB syntax):

    ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\temp;Extended Properties=dBase IV"

    Note that the Data Source is the folder where the dBase file is located. The actual filename belongs in the SQL statement:

    SELECT * FROM Member_51206.DBF

    If I remember correctly, the length of the filename is limited to eight characters.

    Another option would be to use the Visual FoxPro OLEDB Provider:



    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by piancu Wednesday, January 5, 2011 7:24 PM
    Wednesday, January 5, 2011 1:30 PM