title: How to read and write to a Paradox 7.x database from .NET app?
body: <p>I develop .NET application (C#) and I need to read and update some data in a Paradox 7.x database.</p>
  
  <p>According to <a href="https://support.microsoft.com/en-us/help/230126/how-to-use-paradox-data-with-access-and-jet" rel="nofollow noreferrer">Microsoft article</a> for Paradox 7-8 no support is provided for OLEDB.</p>
  
  <p>According to <a href="https://stackoverflow.com/questions/557811/is-it-possible-to-read-to-a-paradox-7-x-db-file-in-a-net-app">another SO question</a> reading is possible, but not writing.</p>
  
  <p>So is there any approach (maybe some third-party library or some BDE wrapper) how can I read and write to Paradox 7.x database?</p>
  
  <p><strong>UPDATE</strong> I've tried OleDB approach:</p>
  
  <pre><code>var builder = new OleDbConnectionStringBuilder();
  builder.DataSource = "D:\\MyBase\\";
  builder.Provider = "Microsoft.Jet.OLEDB.4.0";
  var connection = new OleDbConnection(builder.ToString() + ";Extended Properties=Paradox 5.x");
  var command = new OleDbCommand("SELECT * FROM Planes", connection);
  
  connection.Open();
  using (var reader = command.ExecuteReader())
       if (reader.HasRows)
           while (reader.Read())
                 listBox1.Items.Add(reader.GetString(2));
  </code></pre>
  
  <p>This one fails with OleDbException (expectable because my database has Paradox 7.x format):</p>
  
  <blockquote>
    <p>External table is not in the expected format</p>
  </blockquote>
  
  <p>If I change connecton string to <code>Extended Properties=Paradox 7.x</code> -
  that one fails with enother OleDbException (expectable because Paradox 7 is not supported by OLEDB according to Microsoft article))</p>
  
  <blockquote>
    <p>Invalid operation</p>
  </blockquote>
  
  <p>I've tried ODBC approach:</p>
  
  <pre><code>var connectionString = "Driver={Microsoft Paradox Driver (*.db )};" 
                  + "DriverID=538;Fil=Paradox 7.X;"
                  + "DefaultDir=D:\\MyBase\\;"
                  + "Dbq=D:\\MyBase\\;"
                  + "CollatingSequence=ASCII;";
  
  var connection = new OdbcConnection(connectionString);
  var command = new OdbcCommand("SELECT * FROM Planes", connection);
  
  connection.Open();
  using (var reader = command.ExecuteReader())
        if (reader.HasRows)
              while (reader.Read())
                    listBox1.Items.Add(reader.GetString(2));
  </code></pre>
  
  <p>That one also fails with OdbcException</p>
  
  <blockquote>
    <p>ERROR [HY000] [Microsoft] [Paradox ODBC driver] External table is not in the expected format</p>
  </blockquote>
  
  <p>So nothing work nor now..</p>