title: Paradox Tables in C#
body: <p>I'm trying to read a Paradox 5 table into a dataset or simular data structure with the view to putting it into an SQL server 2005 table. I've trawled google and SO but with not much luck. I've tried ODBC:</p>
  
  <pre><code>public void ParadoxGet()
  {
      string ConnectionString = @"Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=C:\Data\;Dbq=C:\Data\;CollatingSequence=ASCII;";
  
      DataSet ds = new DataSet();
      ds = GetDataSetFromAdapter(ds, ConnectionString, "SELECT * FROM Growth");
      foreach (String s in ds.Tables[0].Rows)
      {
          Console.WriteLine(s);
      }
  }
  public DataSet GetDataSetFromAdapter(DataSet dataSet, string connectionString, string queryString)
  {
      using (OdbcConnection connection = new OdbcConnection(connectionString))
      {
          OdbcDataAdapter adapter = new OdbcDataAdapter(queryString, connection);
          connection.Open();
          adapter.Fill(dataSet);
          connection.Close();
      }
      return dataSet;
  }
  </code></pre>
  
  <p>This just return the error </p>
  
  <blockquote>
    <p>ERROR [HY000] [Microsoft][ODBC Paradox Driver] External table is not in the expected format.</p>
  </blockquote>
  
  <p>I've also tired OELDB (Jet 4.0) but get the same External table is not in the expected format error.</p>
  
  <p>I have the DB file and the PX (of the Growth table) in the Data folder... Any help would be much appriciated. </p>