Mertech Blog

How to Run a DOS Btrieve Application With a SQL server

Written by Thomas Oatman | Jan 19, 2011 5:13:00 PM

Plenty of DOS-based Btrieve applications are still 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 by 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 is 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.

 

How do I know if I am using the Pervasive or Mertech Btrieve dll?


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:pvswbin, <program files>pervasive softwarepsqlbin, 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.


Learn how we can help you easily migrate from Btrieve to SQL without any costly code rewrites by reading our free whitepaper.