Runtime File Setup¶
A deployed BTR2SQL application requires a small set of files to function. This page lists every file, explains where to place it, and describes its purpose.
Required Files¶
File |
Location |
Purpose |
|---|---|---|
Mertech driver DLL |
Application directory |
The replacement driver DLL your application loads instead of the original Btrieve engine. Choose the DLL that matches your application’s bitness:
where |
License file ( |
Application directory (must be on system |
Contains your BTR2SQL license. The driver will not load without a valid license file. |
|
Data directory (or a shared folder specified by |
Intermediate files created during migration. One per migrated table. Contains the schema mapping the driver needs at runtime. |
Data directory |
Per-folder configuration defining the SQL connection (server, database, schema, credentials). Settings are inherited from parent folders. |
|
Application directory (same folder as the DLL) |
Application-wide settings: tracing, locking, performance tuning, caching. Optional but recommended. |
Note
The original Btrieve data files (.mkd, .dat, etc.) and DDFs are not required on deployed machines. They are only needed during migration.
SQL Client Libraries¶
The SQL client libraries for your chosen backend must be installed on each machine running the application. The client libraries must match the bitness of the Mertech driver DLL (32-bit driver requires 32-bit client libraries; 64-bit driver requires 64-bit client libraries).
MS SQL Server — Use the MSOLEDBSQL Client software. See the Supported Platforms section for details.
Oracle — Requires
OCI.dlland its dependencies, included with the Oracle client software.PostgreSQL — DLLs are installed in
<Program Files>\Mertech Data Systems\DB Drivers\Btrieve\clients\pgsql. Copy them to your application’s bin folder or ensure they are on the systemPATH.
Directory Layout Example¶
A typical deployment directory structure looks like this (using PostgreSQL as an example):
C:\Program Files\YourCompany\YourApp\
├── bin\
│ ├── yourapp.exe # Your application
│ ├── w3btrv7.dll # Mertech replacement driver (32-bit)
│ ├── pgs_btr.cfg # License file
│ ├── mds_global.ini # Global driver settings
│ ├── libpq.dll # PostgreSQL client libraries
│ ├── libintl-9.dll # (must be in the same folder
│ ├── libcrypto-3-x64.dll # as the driver DLL or on
│ └── libssl-3-x64.dll # the system PATH)
└── data\
├── mds.ini # Connection settings for this folder
├── CUSTOMERS.INT # INT file for CUSTOMERS table
├── ORDERS.INT # INT file for ORDERS table
└── INVENTORY.INT # INT file for INVENTORY table
Important
Don’t forget to include the SQL client library DLLs. This is a commonly missed step that will cause the driver to fail at runtime. Copy them into the same folder as the Mertech driver DLL (typically your application’s bin folder).
File Placement Rules¶
- Driver DLL
Place in the application directory so it is found before any other version on the system
PATH. This guarantees the correct version is loaded. A shared network location can work, but a local copy is preferred because Windows security policy and network-share permissions can interfere with DLL loading. See Before You Begin for prerequisite details.- License file
Must be discoverable on the system
PATH. The simplest approach is to place it alongside the driver DLL in the application directory. If you keep a single license file on a shared network location, make sure all clients have read access and that the share supports simultaneous access by multiple clients.- INT files
By default, the driver looks for each INT file alongside the corresponding data file reference. If you want to consolidate INT files in a single folder, set the
INT-Foldertoken in mds.ini.- mds.ini
Place one in each data directory, or use folder inheritance to share a single mds.ini at a common root. Connection credentials can be encrypted using MdsEncryptPassword or stored in Windows Credential Manager.
- mds_global.ini
Place in the same directory as the driver DLL. The driver searches for it in a specific order — see the mds_global.ini documentation for the full search path.
See also
Configuration Settings for a complete overview of all configuration methods and their precedence.
Configuration Precedence for how conflicts between settings sources are resolved.