Error: 3033 when trying to OpenDatabase using DAO

Status
Not open for further replies.
A

am12

Hi,

I amuncesfull trying to open an Access 2003 database using DAO 3.6 within

Outlook 2003 VBA. The error.description says:

You do not have the necessary permissions to use the

<.../name/mdb> object. Have your system administrator or the person who

created this object establish the appropriate permissions for you.

The err.Number is 3033

I have tried several options such as:

1-mdb with and without admin password

2-mdb with specific mdw file while setting the filepathname.mdw to

DBEngine.SystemDB

Any idea what I should look for?

Follows a stripped down version of the code with no password set for admin:

Private Sub cmdImport_Click_Test()

On Error GoTo ErrorHandler

Dim dbe As DAO.DBEngine

Dim wks As DAO.Workspace

Dim dbs As DAO.Database

Dim strAccessPath As String

strAccessPath = "C:\tmp\test.mdb"

Set dbe = DAO.DBEngine

Set wks = dbe.Workspaces(0)

Set dbs = wks.OpenDatabase("C:\tmp\test.mdb", False, False)

ErrorHandlerExit:

Exit Sub

ErrorHandler:

MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description

Resume ErrorHandlerExit

End Sub
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
You should know whether the db is protected by a password or an *.mdw file.

If the latter, look for your permissions for the object you're trying to

access. However, the Outlook newsgroup is not the place to ask for these

Access or Jet specific questions.

Best regards

Michael Bauer

Am Sat, 16 May 2009 19:42:01 -0700 schrieb jmv:


> Hi,

> I amuncesfull trying to open an Access 2003 database using DAO 3.6 within
> Outlook 2003 VBA. The error.description says:
> You do not have the necessary permissions to use the
> <.../name/mdb> object. Have your system administrator or the person who
> created this object establish the appropriate permissions for you.
> The err.Number is 3033

> I have tried several options such as:
> 1-mdb with and without admin password
> 2-mdb with specific mdw file while setting the filepathname.mdw to
> DBEngine.SystemDB

> Any idea what I should look for?

> Follows a stripped down version of the code with no password set for


admin:
> Private Sub cmdImport_Click_Test()

> On Error GoTo ErrorHandler

> Dim dbe As DAO.DBEngine
> Dim wks As DAO.Workspace
> Dim dbs As DAO.Database
> Dim strAccessPath As String

> strAccessPath = "C:\tmp\test.mdb"

> Set dbe = DAO.DBEngine
> Set wks = dbe.Workspaces(0)
> Set dbs = wks.OpenDatabase("C:\tmp\test.mdb", False, False)

> ErrorHandlerExit:
> Exit Sub

> ErrorHandler:
> MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
> Resume ErrorHandlerExit

> End Sub
 
A

am12

Hello Michael,

Thanks for answering. What newsgroups should my request be posted to?

I have tried opening the db in 3 different configurations:

1-With admin password unset

2-With admin password set

3-Using a specific .mwd file.

In all of the above scenarios I am able to open the mdb with Access

but not with DAO. Any ideas?

Thanks

"Michael Bauer " wrote:



> You should know whether the db is protected by a password or an *.mdw file.
> If the latter, look for your permissions for the object you're trying to
> access. However, the Outlook newsgroup is not the place to ask for these
> Access or Jet specific questions.

> > Best regards
> Michael Bauer

> > >

> Am Sat, 16 May 2009 19:42:01 -0700 schrieb jmv:
>
> > Hi,
> > I amuncesfull trying to open an Access 2003 database using DAO 3.6 within
> > Outlook 2003 VBA. The error.description says:
> > You do not have the necessary permissions to use the
> > <.../name/mdb> object. Have your system administrator or the person who
> > created this object establish the appropriate permissions for you.
> > The err.Number is 3033
> > I have tried several options such as:
> > 1-mdb with and without admin password
> > 2-mdb with specific mdw file while setting the filepathname.mdw to
> > DBEngine.SystemDB
> > Any idea what I should look for?
> > Follows a stripped down version of the code with no password set for

> admin:
> > Private Sub cmdImport_Click_Test()
> > On Error GoTo ErrorHandler
> > Dim dbe As DAO.DBEngine
> > Dim wks As DAO.Workspace
> > Dim dbs As DAO.Database
> > Dim strAccessPath As String
> > strAccessPath = "C:\tmp\test.mdb"
> > Set dbe = DAO.DBEngine
> > Set wks = dbe.Workspaces(0)
> > Set dbs = wks.OpenDatabase("C:\tmp\test.mdb", False, False)
> > ErrorHandlerExit:
> > Exit Sub
> > ErrorHandler:
> > MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
> > Resume ErrorHandlerExit
> > End Sub

>
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
This is not my area, but I think the db is protected by an mdw file. So, if

you're able to open the db with a specific mdw set via Access, can you also

access the table or whatever then? If so, your code should be wrong; if not,

you don't have the permission to access the object. If the latter, set the

appropriate permission, or ask the db admin to do that for you.

BTW, the code you have shown doesn't specifiy an mdw file.

Best regards

Michael Bauer

Am Sun, 17 May 2009 10:00:11 -0700 schrieb jmv:


> Hello Michael,

> Thanks for answering. What newsgroups should my request be posted to?
> I have tried opening the db in 3 different configurations:
> 1-With admin password unset
> 2-With admin password set
> 3-Using a specific .mwd file.

> In all of the above scenarios I am able to open the mdb with Access
> but not with DAO. Any ideas?

> Thanks
> "Michael Bauer " wrote:
>
>

>
>> You should know whether the db is protected by a password or an *.mdw


file.
> > If the latter, look for your permissions for the object you're trying to
> > access. However, the Outlook newsgroup is not the place to ask for these
> > Access or Jet specific questions.
>

>> > > Best regards
> > Michael Bauer
>

>> >> >>

>

>
>> Am Sat, 16 May 2009 19:42:01 -0700 schrieb jmv:
> >
> >> Hi,
> >
>>> I amuncesfull trying to open an Access 2003 database using DAO 3.6


within
> >> Outlook 2003 VBA. The error.description says:
> >> You do not have the necessary permissions to use the
> >> <.../name/mdb> object. Have your system administrator or the person who
> >> created this object establish the appropriate permissions for you.
> >> The err.Number is 3033
> >
>>> I have tried several options such as:
> >> 1-mdb with and without admin password
> >> 2-mdb with specific mdw file while setting the filepathname.mdw to
> >> DBEngine.SystemDB
> >
>>> Any idea what I should look for?
> >
>>> Follows a stripped down version of the code with no password set for

> > admin:
> >> Private Sub cmdImport_Click_Test()
> >
>>> On Error GoTo ErrorHandler
> >
>>> Dim dbe As DAO.DBEngine
> >> Dim wks As DAO.Workspace
> >> Dim dbs As DAO.Database
> >> Dim strAccessPath As String
> >
>>> strAccessPath = "C:\tmp\test.mdb"
> >
>>> Set dbe = DAO.DBEngine
> >> Set wks = dbe.Workspaces(0)
> >> Set dbs = wks.OpenDatabase("C:\tmp\test.mdb", False, False)
> >
>>> ErrorHandlerExit:
> >> Exit Sub
> >
>>> ErrorHandler:
> >> MsgBox "Error No: " & Err.Number & "; Description: " &


Err.Description
> >> Resume ErrorHandlerExit
> >
>>> End Sub

> >
 
Status
Not open for further replies.
Top