Icon Connection Strings

Introduction
Connection strings are used when the SQLDriverConnect and SQLBrowseConnect ODBC API functions are called. They may specify as little as a data source name or as much as an entire data source configuration. The SQLDriverConnect function will interactively complete a connection string, if necessary and if the calling program indicates that it wants this behavior, by prompting the user for the missing information. On the other hand, the SQLBrowseConnect function will do so programmatically by iteratively interacting with the calling program. For more information on the SQLDriverConnect and SQLBrowseConnect API calls, please refer to the ODBC Programmers Reference from Microsoft. For more information on what function calls are used in your application program, please ask the vendor of the application program being used.

Pre-Configured Data Source Connection Strings
Connection strings that connect to a pre-configured data source, do so by specifying the DSN keyword in the connection string:

DSN=MyDataSource

Any other keywords that are specified in the connection string are overridden with the settings present in the data source configuration for the specified data source.

In addition, you can also use the FILEDSN keyword to load a data source configuration from a specific file instead of the registry:

FILEDSN=c:\windows\temp\mydatasource.dsn

That will load the configuration values from the mydatasource.dsn file. For more information on using the FILEDSN keyword, please refer to the ODBC Programmers Reference from Microsoft.

Direct Connection Strings
Direct connection strings bypass using a pre-configured data source altogether and specify all of the keywords necessary to configure and access a given data source. The first keyword in a direct connection string must always be the special DRIVER keyword. For the DBISAM ODBC Driver, it would look like this:

DRIVER={DBISAM 4 ODBC Driver}

Notice the use of the required braces {} around the DRIVER keyword.

The keywords that can be used with direct connection strings and the DBISAM ODBC driver are listed below. Here is an example direct connection string that connects to a remote DBISAM database server and a database called "Elevate" (case-insensitive) on that database server:

DRIVER={DBISAM 4 ODBC Driver};
ConnectionType=Remote;
CatalogName=Elevate;
RemoteIPAddress=192.168.0.28

Information The line breaks inserted above are only for readability and should not be used in an actual connection string.

DBISAM Connection String Keywords
The following keywords are used with connection strings. The only required keyword for local connections is the CatalogName keyword. For remote connections, the required keyword is either the RemoteIPAddress or RemoteHostName keyword.

KeywordDescription
ConnectionTypeThis string value is set to either "Local" if the data source is accessing the database (also called a catalog) directly, or "Remote" if the data source is accessing the database remotely via a database server.
CatalogNameThis string value is the name of the database, or catalog, being used for the data source. The name can be either a directory name, if the data source is configured for local access (ConnectionType="Local"), or a database name, if the data source is configured for remote access to a database server (ConnectionType="Remote").
ReadOnlyThis string value is set to "True" if the data source is read-only, and "False" if the data source is read-write.
ForceBufferFlushThis string value controls whether DBISAM forces the operating system to flush any buffered writes to disk immediately after the data is written to the operating system. If it is "False" (the default), then DBISAM will leave the flushing up to the operating system. If it is "True", then DBISAM will force a buffer flush after every write.
StrictChangeDetectionThis string value controls whether DBISAM checks for changes every time it performs any read operation. If it is "False" (the default), DBISAM will use lazy change detection, which causes the engine to only check for changes by another user whenever it has to read from disk. If it is "True", DBISAM will check for changes before every read operation. This change detection configuration only applies to read operations - write operations always use strict change detection.
LockRetryCountThis string value controls the number of lock attempts DBISAM should make before issuing an error. The default is "15".
LockWaitTimeThis string value controls the amount of time (in milliseconds) to wait between each lock attempt. The default is "100".
PrivateDirectoryThis string value specifies the directory for any temporary files that DBISAM may create for query results, altering the structure of tables, or other operations. This setting must be a valid directory or DBISAM will issue errors when it tries to create any needed temporary files.
UIDThis string value specifies the user ID to use for accessing a remote DBISAM database server. This value is only used when the ConnectionType registry value is set to "Remote". If this value is left blank, the user will be prompted for the user ID when accessing the database server.
PWDThis string value specifies the password to use for accessing a remote DBISAM database server. This value is only used when the ConnectionType registry value is set to "Remote". If this value is left blank, the user will be prompted for the password when accessing the database server.
RemoteEncryptionThis string value controls whether the connection to a remote DBISAM database server will be encrypted. If it is "False" (the default), then the connection will not be encrypted. If it is "True", then the RemoteEncryptionPassword keyword (see below) will specify the password to use.
RemoteEncryptionPasswordThis string value specifies the password to use for encrypting all requests and responses to and from a remote DBISAM database server when the connection is encrypted (see RemoteEncryption keyword above). The default value is "elevatesoft".
RemoteHostNameThis string value specifies the host name of the machine running the remote DBISAM database server that you are accessing. Either the RemoteHostName or RemoteIPAddress registry values must be populated along with the RemoteService or RemotePort registry values in order to correctly access a remote DBISAM database server. The default value is "".
RemoteIPAddressThis string value specifies the IP address of the machine running the remote DBISAM database server that you are accessing. Either the RemoteHostName or RemoteIPAddress registry values must be populated along with the RemoteService or RemotePort registry values in order to correctly access a remote DBISAM database server. The default value is "127.0.0.1".
RemoteServiceThis string value specifies the service name of the remote DBISAM database server that you are accessing. Either the RemoteService or RemotePort registry values must be populated along with the RemoteHostName or RemoteIPAddress registry values in order to correctly access a remote DBISAM database server. The default value is "".
RemotePortThis string value specifies the port number of the remote DBISAM database server that you are accessing. Either the RemoteService or RemotePort registry values must be populated along with the RemoteHostName or RemoteIPAddress registry values in order to correctly access a remote DBISAM database server. The default value is "12005".
RemoteCompressionThis string value specifies the amount of compression to use when communicating with a remote DBISAM database server. The default value is "0", for no compression. A value of "1" to "10" specifies the amount of compression from fast, but not very thorough, to very thorough, but not as fast.
RemotePingThis string value controls whether pinging will be used to keep the connection to a remote DBISAM database server alive, even when the connection is inactive for long periods of time. If it is "False" (the default), then pinging will not be used. If it is "True", then the RemotePingInterval keyword (see below) will specify how often the pinging will occur.
RemotePingIntervalThis string value specifies the interval (in seconds) to use when pinging has been enabled for the connection to a remote DBISAM database server (see RemotePing keyword above). The default value is "60" seconds.
RemoteReadAheadThis string value specifies the default number of records to use for forward-only cursors that use a rowset size of 1. The default value is "50".
TablePassword*These string values are numbered as "TablePassword1", "TablePassword2", etc. and are used as passwords for opening encrypted tables.
Image