|
<< Click to Display Table of Contents >> cbDBASELOGIN |
![]() ![]()
|
Use the callback cbDBASELOGIN to enable clients to access encrypted dBASE tables.
The cbDBASELOGIN structure contains the following fields:
Structure |
Type |
Description |
|
szUserName |
DBINAME |
Login name of user |
|
szGroupName |
DBINAME |
Group to log in to |
|
szUserPassword |
DBINAME |
User password |
|
In some cases, no login may be performed. This may occur when either:
a) the optional login security has been turned off in dBASE; or
b) another client is using secured dBASE tables.
When no login has been performed in dBASE, you can call DbiOpenTable to attempt to open an encrypted table or you can call DbiCreateTable to create and encrypt a table (with Security enabled.)
In either case, when no login has been performed, the driver issues a cbDBASELOGIN callback. The client then displays a login screen with group name, user name, and password. The data from this screen is returned to the driver, which verifies it and sets the group name and user name in the session level properties. If the information is invalid (such as an invalid password, or the GroupName and UserName does not exist),then an error is returned, and the table is not opened/created.
The structure passed to the callback function is defined as follows:
// dBASE login callback structure
typedef struct
{
DBINAME szUserName; // Login name of user
DBINAME szGroupName; // Group to log in to
DBINAME szUserPassword; // User password
} CBLoginDesc;
typedef CBLoginDesc far * pCBLoginDesc;