Advanced Connection Attributes for Engine DSN
The advanced connection attributes for Engine DSNs include the following:
DSN Open Mode
The DSN Open Mode options for Engine DSNs allow you to specify one of several characteristics that go into effect when tables are opened through the specified DSN. These options are mutually exclusive—you are not permitted to select more than one.
These options correspond directly to the Btrieve open modes allowed in the Open (0) operation. By setting an Open Mode for a DSN, you are setting the default behavior for tables (corresponding to Btrieve files) opened through that DSN.
Normal
Normal mode is the default. Opening a table in Normal mode allows read/write access according to the permissions defined in the database.
If this mode is selected, the ODBC connection string includes OPENMODE=0, and the following ODBC function call is executed when you connect to the database:
SQLSetConnectOption(pSubDbc, SQL_ACCESS_MODE, SQL_MODE_READ_WRITE);
Accelerated
Opening a table in Accelerated mode provides increased insert/update performance by disabling database engine logging functions for the current user. The changes to logging in Accelerated mode do not affect other users accessing the same table.
*Caution: The database engine cannot guarantee transaction atomicity, transaction durability, or archival log safety for any client during use of Accelerated mode by any client. The reason for this restriction is that in the event a restore from log is needed, the log may not contain adequate information to complete the restore, because it is only a partial record of operations on a data file.

For example, if a system failure occurs while the same file is being accessed by a client performing inserts using Accelerated mode and a client performing updates using Normal mode, it is possible for the transaction log to contain updates to records that do not yet exist in the data files, because the Accelerated insert operation in memory was never flushed to disk, while the transactional update operation was written to the transaction log.

An attempt to roll forward an archival log containing this combination of operations will fail.
When this mode is selected, the ODBC connection string includes OPENMODE=-1, and the SQLSetConnectOption call is ignored by the ODBC driver. You cannot use SQLSetConnectOption to specify this mode.
Read-only
When a table is opened in read-only mode, operations that modify the database structure or the data in the database are not permitted.
If this mode is selected, the ODBC connection string includes OPENMODE=1, and the following ODBC function call is executed when you connect to the database:
SQLSetConnectOption(pSubDbc, SQL_ACCESS_MODE, SQL_MODE_READ_ONLY);
Exclusive
When a table is opened in exclusive mode, no other connections to the table are permitted. If other users are currently accessing the given table, it cannot be opened in Exclusive mode. You must try again later.
When this mode is selected, the ODBC connection string includes OPENMODE=-4, and the SQLSetConnectOption call is ignored by the ODBC driver. You cannot use SQLSetConnectOption to specify this mode.
Encoding Translation
The encoding translation options specify how character data is translated between the Pervasive PSQL database engine and a Pervasive PSQL client application that uses ODBC. Encoding puts the data in a standard format that both the engine and client can process.
None
This setting means that no character data is translated between the client and server. (The assumption is that the client and server use the same operating system encoding.)
Note that, in versions prior to Pervasive PSQL v10.10, “OEM/ANSI Conversion” was a single choice had two states: not selected or selected. The not selected state is now labelled “None,” and is the default for backward compatibility (not selected was the default in prior versions).
OEM/ANSI Conversion
This setting allows applications to store or retrieve character data in any OEM character set using Pervasive PSQL, while allowing the data to be manipulated and displayed using the ANSI Windows character set.
The Pervasive ODBC driver translation DLL can perform all necessary translations between the two character sets. This feature can be turned on or off for each DSN. Any character data that is passed to and from the database is correctly translated by the ODBC driver between the OEM and ANSI character sets.
The Pervasive PSQL Control Center (PCC) uses the JDBC driver. The JDBC driver is unaware of the OEM to ANSI translations. If you have OEM data that you want to view in PCC, set the properties of the database to use character encoding IBM437.
If your application connects to the data source using SQLDriverConnect, you can also specify the translation DLL using the connection string option TRANSLATIONDLL=path_and_DLL_name. The translation DLL name for Pervasive PSQL is W32BTXLT.DLL.
*Note: The OEM-to-ANSI translation option is available only for client or local Engine DSNs. It is not available when setting up a remote Engine DSN.
Automatic
This setting instructs the Pervasive PSQL ODBC client to automatically translate character data format when the database encoding on the engine machine differs from the OS encoding on the client machine.
The Pervasive PSQL ODBC client ensures that the client and server use the same encoding. Character data translation, if required, occurs on the client. (No character data translation is required if the database encoding on the engine machine is the same as the OS encoding on the client machine.)
“Automatic” requires that the client and the server be version 10.1 or greater.
See also Code Page in this book and Encoding Interaction in Pervasive PSQL User's Guide.
Interaction Between Settings
The following table explains the interaction between database code page and DSN encoding translation. See Create Database Through DSN Setup for a discussion of code page.
Pervasive PSQL ODBC Driver