Paradox 5 access without BDE RRS feed

  • Question

  • Hi, 

    We're trying to connect to Borland Paradox 5 database on an specified hard drive path. We 
    think our connection string contains all the necessary parameters to make that connection. In fact, if we use BDE we can connect to our database.

    But the problem is that we can't use that sistems in our environment, we can't install BDE because of client restrictions (yeah, that's the main and unavoidable problem on our development).

    We wrote this code:


                Dim ConStr As String

                ConStr = "Provider=MSDASQL.1;DBQ=C:\Paradox\;DefaultDir=C:\Paradox\;Driver={Microsoft Paradox Driver (*.db )};DriverID=538;ParadoxNetPath=C:\Paradox\;"


                'ConStr = "Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=C:\Paradox\;Dbq=C:\Paradox\;CollatingSequence=ASCII;"


                'Dim conPeople As OdbcConnection = New OdbcConnection("DSN=AngelBD;DefaultDir=C:\Paradox\;" & _

                '              "DBQ=C:\Paradox\;")


                Dim conPeople As OdbcConnection = New OdbcConnection(ConStr)


                Dim strSelection As String = "SELECT * FROM  Pepe WHERE ID < 15"

                Dim cmdPeople As OdbcCommand = New OdbcCommand(strSelection, conPeople)


                Dim odaPeople As OdbcDataAdapter = New OdbcDataAdapter(cmdPeople)


                Dim dsPersons As DataSet = New DataSet("Persons")



                DataGridView1.DataSource = dsPersons

                DataGridView1.DataMember = dsPersons.Tables.Item(0).TableName




            Catch ex As Exception


            End Try


    And the error was:

    System.Data.Odbc.OdbcException = {"ERROR [HY000] [Microsoft][ODBC Paradox Driver] External table is not in the expected format}

    The question is: did you work with this conditions and your system worked properly? We're stuck on that.

    Thanks a lot
    Monday, May 18, 2009 12:17 PM

All replies

  • BDE isn't required. If you use the ODBC driver then you will need to make certain that the ODBC desktop drivers are installed.

    You can also use the Jet database engine with the Paradox ISAM driver. For this installation the latest version of the Jet database engine should be installed, which can be done via Windows Update or through the latest Windows service packs.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, May 18, 2009 2:01 PM
  • Thanks for that quick response, but...

    we follow the same instructions. We've got ODBC installed properly and the last Jet database engine, we're working with two different environments (one in a W2003Server with the Msjet40.dll 4.0.9025.0 and the other, a XP SP2, with 4.0.8618.0) and neither works.

    We're just working with Microsoft's Support and MSDN Page and with your latest link, but we can't connect this database without using BDE. You can see our code. Here's another example. This one refers to another function using the recommended Paradox connection strings:

                ConStr = "Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=C:\Paradox\;Dbq=C:\Paradox\;CollatingSequence=ASCII;"
                'Dim conPeople As OdbcConnection = New OdbcConnection("DSN=AngelBD;DefaultDir=C:\Paradox\;DBQ=C:\Paradox\;")
                Dim conPeople As OdbcConnection = New OdbcConnection(ConStr)

    When we call "Fill()" method, 'got the same problem.
    Monday, May 18, 2009 2:22 PM
  • Are you certain this is a Paradox 5.0 file? Also, does it have any memo fields?

    Do you get the same error if you use the Jet connection string with the Paradox ISAM driver?
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, May 18, 2009 2:43 PM
  • Are you certain this is a Paradox 5.0 file? 
    Yeah, pretty sure (and i see the database properly with bde and with direct paradox table reading). When I use Jet Connection got this code:

    Dim _connection As New OleDbConnection()
            Dim ConnectionString As New StringBuilder("")
                ConnectionString.Append("Data Source=C:\Paradox;")
                ConnectionString.Append("Extended Properties='Paradox 5.x'")
                _connection.ConnectionString = ConnectionString.ToString()

    And the same error: External table is not in the expected format

    We don't have any memo fields. The database structure got longInts, shortInts, a char (length 7) and a number (length 8).
    Monday, May 18, 2009 2:55 PM
  • If you're certain it's version 5.0 then also make sure that you have any dependent tables (files). For example, if you have a primary key I'm pretty sure that Paradox creates an additional file for this.

    Most of the Paradox versions are incompatible so you need to make certain to specify the correct version in the connection string. In addition, I don't believe that the Microsoft drivers support any version beyond 5.0.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, May 18, 2009 3:49 PM
  • We've got the .px file... so we're at the starting point.

    Thanks anyway for the effort.
    Monday, May 18, 2009 4:04 PM