Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Exclamation Unanswered: Workspace Problem in Secured Database

    Please can someone help. I have a secured database and am logged in as "Developer". I recently wrote some code that used transactions with no problems. I am now having problems with the same code as when I attempt to set the database object from the workspace I get the error "Item not found in this collection"

    Dim ws As Workspace
    Dim db As Database

    Set ws = Workspaces(0)
    Set db = ws.Databases(0) 'Error occurs here

    If I go into the immediate window I can see that the workspace object does not contain any databases, and that the username is "Admin" and not "Developer".

    I am guessing that this is why the workspace does not contain any databases, but am not really sure. Is there any way I can force the default workspace to use the username I am currently logged in as.

    Many thanks in advance

    Simon

  2. #2
    Join Date
    Sep 2003
    Posts
    83

    Re: Workspace Problem in Secured Database

    Originally posted by h0wells
    Please can someone help. I have a secured database and am logged in as "Developer". I recently wrote some code that used transactions with no problems. I am now having problems with the same code as when I attempt to set the database object from the workspace I get the error "Item not found in this collection"

    Dim ws As Workspace
    Dim db As Database

    Set ws = Workspaces(0)
    Set db = ws.Databases(0) 'Error occurs here

    If I go into the immediate window I can see that the workspace object does not contain any databases, and that the username is "Admin" and not "Developer".

    I am guessing that this is why the workspace does not contain any databases, but am not really sure. Is there any way I can force the default workspace to use the username I am currently logged in as.

    Many thanks in advance

    Simon

    did you have joined the workgroup file that you have created while creating the secured database.

    To check the workgroup file that you are using, Press Ctrl+G to go to the immediate window, type
    ?syscmd(13) -- tell you the name of the workgroup file you are using.
    ?currentuser -- tell you the name of the user you are logged on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •