CDaoWorkspace::SetDefaultPassword

static void PASCAL SetDefaultPassword( LPCTSTR lpszPassword );
throw( CDaoException, CMemoryException );

Parameters

lpszPassword

The default password. A password can be up to 14 characters long and can contain any character except ASCII 0 (null). Passwords are case-sensitive.

Remarks

Call this member function to set the default password that the database engine uses when a workspace object is created without a specific password. The default password that you set applies to new workspaces you create after the call. When you create subsequent workspaces, you do not need to specify a password in the Create call.

To use this member function:

  1. Construct a CDaoWorkspace object but do not call Create.

  2. Call SetDefaultPassword and, if you like, SetDefaultUser.

  3. Call Create for this workspace object or subsequent ones, without specifying a password.

By default, the DefaultUser property is set to “admin” and the DefaultPassword property is set to an empty string ("").

For more information about workspaces, see the article DAO Workspace in Visual C++ Programmer's Guide. For more about security, see the topic "Permissions Property" in DAO Help. For related information, see the topics "DefaultPassword Property" and "DefaultUser Property" in DAO Help.

CDaoWorkspace OverviewClass MembersHierarchy Chart