How to run a DOS Btrieve application with a SQL server

There are still plenty of DOS-based Btrieve applications in use today. Is it possible to move these applications to a current SQL server to take advantage of integration with other applications and powerful data management tools?

The Mertech BTR2SQL driver is a replacement for the Btrieve interface. As noted in the white papers and documentation, the driver is a Windows 32-bit dll (and now supported on Windows 64-bit as well). It would be logical to think that a DOS application could not access this interface; however, many years ago, Pervasive Software (makers of Btrieve) introduced the “DOS Box” support which allows an application written for the DOS interface to enjoy the benefits of the Windows client or workgroup engines.

Beginning in the version 7 days, Pervasive.SQL installs the DOS Box on Windows NT platforms be default. You can read all about this in the ReadDOS.txt file found in the BIN folder. The DOS Box driver was designed as a replacement for btrieve.exe, brequest.exe (etc) and it redirecting the DOS interrupt into the Windows dll stack. If your application still relies on the older version of Btrieve (perhaps version 5 or 6.15), you will need to install a newer version of Pervasive.SQL and test the application utilizing the Windows engine.

Once the application is working properly with the Pervasive.SQL Windows engine and you have migrated the data to the SQL server of your choice (using the Btr2SQL migration tool), plugging in the Mertech SQL driver is almost as easy as it is for a Windows application — replace the W3BTRV7.dll from Pervasive with the Mertech version. To deploy, your application will also need two components from the PSQL installation: BTRDRVR.sys and BTRVDD.dll. Depending on the version of Pervasive.SQL, the files may be installed in C:\pvsw\bin, <program files>\pervasive software\psql\bin, or <winsysdir>.

Your application’s installation must also update config.nt (in <windir>\system32) with a line similar to this: DEVICE = <installdir>\BTRDRVR.SYS.

 

Note: distributing the two Pervasive components requires a distribution license from Pervasive Software.

Leave a Reply

You must be logged in to post a comment.