Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Run-time error 3356

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sherwood - 16 Jan 2006 16:33 GMT
Greetings,

I have a "novice" question in regards to opened databases.  I am attempting
to execute the code below (in Outlook 2003) in order to read records from an
Access 2000 database.  However, if the database has been opened by another
user (which is a distinct possibility), then I recieve the following error:

"Run-time error '3356':  You attempted to open a database that is already
opened exclusively by user 'Admin' on machine 'EMPIRE100'.  Try again when
the database is available."

Is it possible to read records from a database that is already opened?  
Secondly, what is the best way to check and see if it is already opened.

Sub Application_Startup()
   Dim myOlApp As Outlook.Application
   Dim rs As DAO.Recordset
   Dim wrkJet As DAO.Workspace

   Set myOlApp = CreateObject("Outlook.Application")
   Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)
   Set db =
wrkJet.OpenDatabase("\\Server6\Company\Compliance\Licensing_Tables.mdb",
True)  <-- Code fails here
   ....
Signature

Thanks in advance!

Sherwood

Alex Dybenko - 16 Jan 2006 17:33 GMT
Hi,
perhaps you have database opened in exclusive mode. Look at access options
for default open mode. also you can choose mode in open database dialog

Signature

Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Greetings,
>
[quoted text clipped - 24 lines]
> True)  <-- Code fails here
>    ....
Sherwood - 16 Jan 2006 18:08 GMT
I used the code below and this works.

Set db =
wrkJet.OpenDatabase("\\Server6\Company\Compliance\Licensing_Tables.mdb",
False)
Signature

Thanks again!

Sherwood

> Hi,
> perhaps you have database opened in exclusive mode. Look at access options
[quoted text clipped - 28 lines]
> > True)  <-- Code fails here
> >    ....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.