ACC2000: Error '3028' Using CreateWorkspace with Password Argument (208804)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208804
Advanced: Requires expert coding, interoperability, and multiuser skills.

SYMPTOMS

If you use the CreateWorkspace method without specifying the DBEngine object, you may receive the following error message when you use the optional password argument:
Run-time error '3028': Can't start your application. The workgroup information file is missing or opened exclusively by another user.
If you choose not to specify a password, the same syntax does not cause an error.

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. When you create a new Workspace object in which you specify a password, use the following syntax:
Set Workspace = DBEngine.CreateWorkspace(name, user, password, type)
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.
  2. Create a new module and type or paste the following code:
    Public Sub TestWorkspace()
    
      Dim wrkAdmin As Workspace
      Dim dbs As Database
    
     'Create a new workspace and assign it to the database administrator.
      Set wrkAdmin = CreateWorkspace("AdminWorkspace", "Admin", "test", _
      dbUseJet)
    
     'Be sure to change the path in this next line to match your path to
     'Northwind.mdb on your computer.
      Set dbs = wrkAdmin.OpenDatabase("C:\Northwind.mdb", False)
    
     'Close the session.
      wrkAdmin.Close
    
    End Sub
    
    					
  3. On the Debug menu, click Compile Northwind. Save the module as modTestWorkspace.
  4. Close the module. On the Tools menu, click Security, and then click User And Group Accounts.
  5. Click the Change Logon Password tab and change your password to test.

    NOTE: This article assumes that you have logged into the database as the "Admin" user. If the User Name field within the Change Logon Password dialog box reads anything other than Admin, close the database and log on as Admin before continuing.
  6. Close the database, and then quit Access.
  7. Open Access and log on as the "Admin" user with a password of test.
  8. To test this procedure, type the following line in the Immediate window, and then press ENTER:
    Call TestWorkspace
    						

    Note that you receive the error message mentioned in the Symptoms section.

REFERENCES

For more information about CreateWorkSpace method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type createworkspace in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MajorLast Reviewed:6/23/2005
Keywords:kberrmsg kbprb KB208804