Navigation:  DAO Object Classes > DaoDbEngine Class >

DaoDbEngine:CreateWorkspace() Method

Previous pageReturn to chapter overviewNext page

Purpose

Creates a new Workspace object

 

Parameters

cNameA string that uniquely names the new Workspace object.
cUserA string that identifies the owner of the new Workspace object.
cPassWordA  string containing the password for the new Workspace object. The password can be up to 14 characters long and can include any characters except ASCII character 0 ( null ). See the Password property for more information on valid passwords
liTypeAn long that specifies whether the type of the workspace should be Microsoft Jet or ODBC. The default is a Microsoft Jet workspace

 

Returns

A workspace object

 

Settings

 

You can use the following constants for liType

 

ConstantDescription

 

dbUseJetCreates a Microsoft Jet workspace

.

dbUseODBCCreates an ODBCDirect workspace

 

 

 

 

The liType option determines whether the new Workspace is a Microsoft Jet or ODBCDirect workspace. If you set liType to dbUseODBC and you haven't already created any Microsoft Jet workspaces, then the Microsoft Jet database engine will not be loaded into memory, and all activity will occur with the ODBC data source subsequently identified in a Connection object. If you omit liType, the DefaultType property of DBEngine

 

 

 

 

will determine which type of data source the Workspace is connected to. You can have both Microsoft Jet and ODBCDirect workspaces open at the same time

 

Class

DaoDbEngineThe DBEngine object contains and controls all other collections and objects in the DAO object hierarchy

 

See Also

Daoworkspace

 

Example

DbEngine sample