Configuration Settings

BTR2SQL provides several ways to configure how the driver connects to your SQL backend, locates table definitions, and controls runtime behavior. These range from configuration files created during migration to runtime API calls made by your application. Understanding the available methods — and how they interact — is essential to a well-configured deployment.

Configuration Methods

The driver reads settings from six sources. Each serves a different purpose, from per-table definitions to application-wide defaults. When the same setting appears in more than one source, the driver uses a fixed precedence order to decide which value wins.

Method

Scope

Description

INT files

Per table

Created by the Migration Utility for each migrated table. Contains the Btrieve table structure and migration settings (server, database, schema if written during migration). Stored in the data directory or a shared folder specified by INT-Folder.

mds.ini

Per folder

A configuration file placed in each data folder. Defines connection details (server, database, schema, user, password), INT file location, and table prefix/postfix values. Settings are inherited from parent folders, allowing common values to be shared.

mds_global.ini

Application-wide

A single configuration file for the entire application. Controls tracing, locking, performance tuning, caching, and other global behavior. The driver searches for this file on the system path.

Environment variables

Application-wide

Every mds_global.ini setting can be set as an environment variable using the btr2sql_ prefix (e.g., btr2sql_TRACE_ON). Useful for quick, temporary overrides without editing files.

Registry settings

Application-wide

Windows registry keys under HKEY_CURRENT_USER\SOFTWARE\Mertech Data Systems\DB Drivers\BTR\<Driver>\<version> (HKCU checked first, then HKLM). Provides machine-level defaults.

MdsSetSetting API

Runtime / per folder

Programmatic overrides made at runtime from your application code. Takes the highest precedence of all methods. Can set both global and folder-specific values. See the BTR2SQL SDK for details.

Important

When the same setting is defined in multiple sources, the driver resolves conflicts using a strict precedence order. See Configuration Precedence for the full resolution order and examples.

Configuration Files at a Glance

The three configuration files are the most common way to set up the driver:

File

Created by

Location

Contains

INT files

(filename.INT)

Migration Utility (one per migrated table)

Data directory, or the path specified by INT-Folder in mds.ini

Table structure and migration-time settings

mds.ini

You (sample provided in sdk\samples)

Data directory (one per folder)

Server, database, schema, login credentials, INT-Folder path, table prefix/postfix

mds_global.ini

You (sample provided in bin)

Same directory as the Btr2SQL DLL, or anywhere on the system PATH

Tracing, locking, performance, caching, and other global settings

For secure database connections, see MdsEncryptPassword for information on password encryption and Windows Credential Manager integration.