---
title: How to Run a DOS Btrieve Application With a SQL server
description: Moving DOS-based Btrieve applications to an SQL server allows you to take advantage of integrating with other applications and powerful data management tools.
---

[Mertech Blog ](https://www.mertech.com/blog)

# [How to Run a DOS Btrieve Application With a SQL server](https://www.mertech.com/blog/how-to-run-a-dos-btrieve-application-with-a-sql-server)

 Written by [Thomas Oatman](https://www.mertech.com/blog/author/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](https://www.mertech.com/migrate-btrieve-to-sql/) 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](http://www.pervasive.com/) (makers of Btrieve) introduced the "[DOS Box](http://docs.pervasive.com/products/database/psqlv11/getstart/wwhelp/wwhimpl/common/html/wwhelp.htm)" 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?**](https://www.mertech.com/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](https://info.mertech.com/btr2sql-whitepaper-lp)**.

 

 

[View full post](https://www.mertech.com/blog/how-to-run-a-dos-btrieve-application-with-a-sql-server)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Thomas Oatman"
  },
  "dateModified" : "2018-03-28T22:54:15.503Z",
  "datePublished" : "2011-01-19T17:13:00Z",
  "headline" : "How to Run a DOS Btrieve Application With a SQL server",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.mertech.com/blog/how-to-run-a-dos-btrieve-application-with-a-sql-server",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Blog"
  }
}
```