How to open the .db paradox file

Rahul Shirphule picture Rahul Shirphule · Apr 11, 2013 · Viewed 23k times · Source

i want to view the test.db file, i search for it's editor but didn't get any one So please help to see the it in editor as like sql server.

i found some sqlite editor but it's not an sqlite file on most forum it say that it is an paradox .db file.

So how do i open it

Thanks

Answer

Tor Langlo picture Tor Langlo · Apr 17, 2013

To access Paradox tables in .NET you can use ODBC. Here's a small example (in C#):

private static void RunMinimumParadoxTest()
{
    const string ConnectionStringFormat =
        "Driver={{Microsoft Paradox Driver (*.db )}};Uid={0};UserCommitSync=Yes;Threads=3;SafeTransactions=0;" +
        "ParadoxUserName={0};ParadoxNetStyle=4.x;ParadoxNetPath={1};PageTimeout=5;MaxScanRows=8;" +
        "MaxBufferSize=65535;DriverID=538;Fil=Paradox 7.X;DefaultDir={2};Dbq={2};CollatingSequence={3}";

    DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.Odbc");
    using (DbConnection connection = factory.CreateConnection())
    {
        string userName = "Tor";
        string paradoxNetPath = @"C:\BdeNet";
        string databasePath = @"C:\LangloMainSrv\LData\Ordre\LordWin\Database2011";
        string collatingSequence = "Norwegian-Danish";
        connection.ConnectionString = 
            String.Format(ConnectionStringFormat, userName, paradoxNetPath, databasePath, collatingSequence);
        connection.Open();
        using (DbCommand command = connection.CreateCommand())
        {
            command.CommandText = "select Count(*) from [OrdreDet] where [Ordrenr] = 81699002";
            object itemCount = command.ExecuteScalar();
            Console.WriteLine("Order items: {0}", itemCount);
            Console.ReadKey();
        }
    }
}

Also see the following link for more details: http://msdn.microsoft.com/en-us/library/ms710922(VS.85).aspx.