CDaoWorkspace::Open

virtual void Open( LPCTSTR lpszName = NULL );
throw( CDaoException, CMemoryException );

Parameters

lpszName

The name of the DAO workspace object to open — a string with up to 14 characters that uniquely names the workspace. Accept the default value NULL to explicitly open the default workspace. For naming requirements, see the lpszName parameter for Create. For related information, see the topic "Name Property" in DAO Help.

Remarks

After constructing a CDaoWorkspace object, call this member function to do one of the following:

  • Explicitly open the default workspace. Pass NULL for lpszName.

  • Open an existing CDaoWorkspace object, a member of the Workspaces collection, by name. Pass a valid name for an existing workspace object.

Open puts the workspace object into an open state and also initializes the database engine if it has not already been initialized for your application.

Although many CDaoWorkspace member functions can only be called after the workspace has been opened, the following member functions, which operate on the database engine, are available after construction of the C++ object but before a call to Open:

Create GetVersion SetDefaultUser
GetIniPath Idle SetIniPath
GetLoginTimeout SetDefaultPassword SetLoginTimeout

For more information about workspaces, see the article in Visual C++ Programmer's Guide.

CDaoWorkspace OverviewClass MembersHierarchy Chart

See Also   CDaoWorkspace::IsOpen, CDaoWorkspace::CDaoWorkspace, CDaoWorkspace::Create, CDaoWorkspace::Close