MORE INFORMATION
Btrieve database files contain only data. They do not contain other
database information (unlike Microsoft Access database files, which do
contain other information or objects). Each Btrieve file contains only one
table. You must use a separate application to access the data contained in
a Btrieve database file, and this application must also provide all
security control. When attached to a Microsoft Access database, each
Btrieve file is considered a separate table.
Applications that use Btrieve files can either use a password to control
entry to the application (possibly including multiple levels of user
permissions), or use file owner names.
File owner names are both embedded in the database file and hard-coded in
the application using that file. Since an application may draw information
from numerous Btrieve files, and each file can have a unique owner name,
the owner name for each file is generally hard-coded in the application.
When the application opens a Btrieve database file, the Btrieve database
engine compares the database file's embedded owner name with the owner name
sent by the application to determine user permissions.
There is no connection between an application's password and the embedded
file owner name. You may have an application password that allows you full
file-access permissions. This does not mean that you can directly access
the files without the application, since the owner name hard-coded in the
application is different than your application password.
Owner names assigned to Btrieve files can have one of four security
options:
- Require an owner name for any access--no data encryption.
- Permit read-only access without an owner name--no data
encryption.
- Require an owner name for any access--with data encryption.
- Permit read-only access without an owner name--with data
encryption.
If a read-only option is set on the Btrieve database file (with or without
an owner name), Microsoft Access can open the file and display its
contents. However, if you attempt to update the file, you will receive the
error message "Drive or network error."
Microsoft Access Prompts for Password
When you are using any of the installable ISAMs (such as Btrieve, Paradox,
or dBASE), if you attempt to open an attached table that is password
protected, Microsoft Access will prompt you for a password after the open
attempt fails.
In Btrieve, if you set the owner name option to read-only access, the open
does not fail and Microsoft Access does not prompt you for a password. No
error or warning occurs until you attempt to update the file.
How to Specify an Owner Name
This article assumes that you are familiar with Access Basic and with
creating Microsoft Access applications using the programming tools provided
with Microsoft Access. For more information on Access Basic, please refer
to the "Building Applications" manual.
You can specify an owner name for the .DDF files using the DDFPassword line
in the [Btrieve ISAM] section of the MSACC20.INI file. However, this is of
little benefit since it only sets the password for the .DDF files, not for
the Btrieve database file.
You can use Access Basic to attach the Btrieve database file and specify
the owner name so that full read-write permissions are available. After you
attach the table, it is not necessary to specify the owner name again.
The following sample Access Basic code demonstrates how to attach a Btrieve
file called MYFILE and specify the file owner name as a Microsoft Access
password:
Sub TablePwd ()
Dim MyDB As Database, MyTD As TableDef
Set MyDB = DBEngine.Workspaces(0).Databases(0)
Set MyTD = MyDB.CreateTableDef("MYFILE")
MyTD.connect = "btrieve;PWD=OwnrNm;Database=C:\MYDIR\FILE.DDF"
MyTD.sourcetablename = "MYFILE"
MyDB.tabledefs.Append MyTD
End Sub
Note that this example uses the FILE.DDF file located in the C:\MYDIR
directory to search for a Btrieve table named MYFILE, and then attempts to
attach the file to the current database using the password "OwnrNm."
The products discussed here are manufactured by vendors independent of
Microsoft; we make no warranty, implied or otherwise, regarding these
products' performance or reliability.