Creates a new Workspace object.
Syntax
CdbWorkspaceCreateWorkspace(LPCTSTR pstrName,
LPCTSTR pstrUser,
LPCTSTR pstrPassword,
LONG lType=dbUseJet);
Parameters
Type | Example | Description |
LPCTSTR | pstrName | A pointer to a string that uniquely names the new Workspace object. See the Name property for details on valid workspace names. |
LPCTSTR | pstrUser | A pointer to a string that identifies the owner of the new Workspace object. See the UserName property for more information. |
LPCTSTR | pstrPassword | A pointer to a 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. |
LONG | IType | An integer that specifies whether the type of the workspace should be Microsoft Jet or ODBC. The default is a Microsoft Jet workspace. |
Usage
#include <afxole.h>
#include <dbdao.h>
CdbDBEngine dben;
CdbWorkspace ws;
ws = dben.CreateWorkspace( _T("MyWorkSpace"), _T("IOwnIt"), _T("MyPassword"), dbUseJet);