Database Exclusive

  • Thread starter Stephen sjw_ost
  • Start date
S

Stephen sjw_ost

Hello, thanks for everyones help in the past. I've got another question for ya.

Is there a way to ensure a frontend DB is NOT opened in exclusive mode
except by me or another authorized admin? The permissions part I beleive I
have, it's the setting of "Open Exclusive" vs "Open" I am needing help with.
Side note; I do not want it to be opened read-only either. Just "Open" by a
user.

What I am looking for, if it can be done, is a user opens my FE DB and can
use it as intended but I can come in and "Open Exclusive", if needs be.
Kind of like having an Excel file in shared mode. One user can make a change
to the Excel file and save, once the other users click save on their own PC
they can see the update or change that was made.
Can access do this? Can multiple users have the DB "Open", I come in and
"Open Exclusive", make a change, save and the other users see the change via
an update timer or update button?
 
P

pietlinden

Why would a user NOT open your front end in exclusive mode? They are
NOT designed to be shared. Each user should have a copy on his
computer. Are you implying that several users are sharing the same
front end? That is just asking for trouble.
 
S

Stephen sjw_ost

You are the 2nd person to tell me that. I have never had any problems with
multiple users using/sharing the same FE DB and I have users from Florida to
New Mexico. Why is that "asking for trouble"?
Please explain or point me somewhere that does explain. I have yet to get a
direct answer as to why this would cause a problem. If it does cause a
problem I need to know what to look for and an answer to my question just may
be able to help me.

So back to my question, is what I am asking possible? If so, can you explain
how?
 
D

Dirk Goldgar

Stephen sjw_ost said:
Hello, thanks for everyones help in the past. I've got another question
for ya.

Is there a way to ensure a frontend DB is NOT opened in exclusive mode
except by me or another authorized admin? The permissions part I beleive I
have, it's the setting of "Open Exclusive" vs "Open" I am needing help
with.
Side note; I do not want it to be opened read-only either. Just "Open" by
a
user.

What I am looking for, if it can be done, is a user opens my FE DB and can
use it as intended but I can come in and "Open Exclusive", if needs be.
Kind of like having an Excel file in shared mode. One user can make a
change
to the Excel file and save, once the other users click save on their own
PC
they can see the update or change that was made.
Can access do this? Can multiple users have the DB "Open", I come in and
"Open Exclusive", make a change, save and the other users see the change
via
an update timer or update button?


I agree with Piet that it's a bad idea to share your front-end across the
network. More on that below.

To answer your first question, you can find out whether the database is
currently opened exclusive by trying to open it again. Here's code for a
function to determine whether the database is currently opened exclusive:

'----- start of code -----
Function IsDBOpenedExclusive(stDbName As String) _
As Boolean
On Error Resume Next
Dim dbe As DBEngine
Dim db As Database

Set dbe = New PrivDBEngine
Set db = dbe.OpenDatabase(stDbName)

' If the database failed with error 3045,
' it was opened exclusively by someone else
' or possibly by ourselves.
IsDBOpenedExclusive = (Err.Number = 3045)

' Close up the db in case we opened it.
If Not (db Is Nothing) Then
db.Close
End If
Set dbe = Nothing
End Function
'----- end of code -----

I don't know where I got that code; I don't think I wrote it, but I've had
it so long I don't remember who did.

Now, about sharing the front-end: this was not such a bad idea in Access
97, at least if the network was in good shape, because relatively little of
the front-end was sent backl across the network in A97. Back then, each
code module could be updated and saved separately, and there was less
"state" to be saved in the front-end. Access 2000 introduced a new
"monolithic" VB project, such that saving any code changes involved saving
the entire project. This design continues in all subsequent versions.
Also, I believe there are many more things about the front-end that are
automatically updated these days, whenever the front-end is used. All this
means that, if your front-end is shared, there will be much more updating of
the front-end database file across the network. That means more exposure to
network corruption. If your network is rock-solid, that may not affect you,
but we see a lot more database corruption these days than we used to back in
the days of Access 97, and a lot of it can be attributed to sharing the
front-end.
 
S

Stephen sjw_ost

Good reading, thank you.
I understand what they were saying in the post(s) about the increased
possibility of file and data corruption, though I have never experienced this
with my network/Databases.
I will need to find out how to distribute the FE via a setup program. I have
never made one before. And I will need to either get permission to dll the
AutoFeUpdater or figure out how to create my own.
If you can help with or point me to where I can find examples of setup
programs that would be great. I'll have to post separately for the
AutoFEUpdater once I find out from my IT Dept if I can dll it and use it or
not.
Thanks again for your help. As always, you guys rock!
 
D

dymondjack

If you are familiar with scheduling tasks, and you have one hour per day or
even week, that you know no users will be on (or if you are allowed a forced
logoff), a simplified version of Tony's autoFE should be relatively easy to
create. Admittedly, it won't have all the nice features that Tony's does,
but you can make a list of all required files and compare their
created/modification dates, and replace them, which is essentially how Tony's
works. His does it every time a user clicks the shortcut (which is very nice
indeed).

Or, even better, if you're IT group allows, use his.

Admittedly, initial setup on FE's on various local machines can be a bit of
a pain when its so easy to just share one of them, but the peace of mind in
not having to worry about possible corruption (from these means, anyway) in
the long run is definately something to be desired.


--
Jack Leach
www.tristatemachine.com

- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top