Obsolete
| Parameter | Description |
|---|---|
| sWorkspace | Name of the Workspace to open |
A contant (described below) indicating success or failure
Function OpenWorkspace String sWorkspace Returns Integer
| Call: | Get OpenWorkspace sWorkspace to IntegerVariable |
Obsolete
Use OpenWorkspaceFile instead of this method.
This function works with the global Workspace list (Workspaces.ini) file. As of DataFlex revision 12.0, this file, and associated functions, are no longer used. See Workspace Changes for details.
The OpenWorkspace function opens a registered Workspace. The sWorkspace parameter represents the name of the Workspace, which must exist in the global list of registered Workspaces (Workspaces.ini). If you want to open a Workspace that is not registered, use OpenWorkspaceFile instead (or use the cApplication's DoOpenWorkspace method).
The return value is one of the following constants:
| Constant | Meaning |
|---|---|
| wsWorkspaceOpened | The Workspace was opened ok |
| wsWorkspaceNotFound | The named Workspace was not found in the global list of registered Workspaces. |
| wsWorkspaceFileNotFound | The file describing the Workspace(*.WS) was not found |
| wsDataPathEmpty | The DataPath entry was empty |
| wsFileListEmpty | The FileList entry was empty |
| wsFileListNotExist | The FileList.cfg file could not be found |
Object oApplication is a cApplication
Procedure OnCreate
Handle hoWorkspace
Integer eOpened
String sError
Get phoWorkspace To hoWorkspace
Get OpenWorkspace of hoWorkspace "ABC, Inc.Accounts" To eOpened
If (eOpened <> wsWorkspaceOpened) Begin
Get OpenWorkspaceErrorMessage of hoWorkspace eOpened To sError
Send Stop_Box sError "Error Opening Workspace"
Abort
End
End_Procedure // OnCreate
End_Object // oApplication
| Note: |
DoOpenWorkspace | OpenWorkspaceFile | OpenWorkspaceErrorMessage