473,418 Members | 3,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Open mdb exclusive, permissions problem.

A97. Split database. Frontend DB1.MDB. Backend DB1BE.MDB. Tables are
linked between DB1 and DB2.

From my testing, if I open DB1 exclusively using /excl the backend
DB1BE is not opened exclusively.

If I open DB1 but have no tables open and then open up DB1BE
exclusively, DB1BE will open exclusive. But if I then attempt to open a
linked table in the frontend DB1 I'm informed I can't use the table
because the file is in use.

If I open DB1 and also open a linked table in DB1 and then attempt to
open the backend DB1BE, it will inform me it can't open the backend
DB1BE exclusively.

OK, so the /excl switch is associated with the file it opens. Whatever
backend files are associated with the file are not affected. I learned
something today.

But I am having some problems. I guess its associated with security. I
don't know. I'm hoping you can tell me what's going on.

I have 2 subroutines below that I run that produces my confusion and
errors. I open up DB1. From the Debug window I run OpenBEExcl. I get
an error "3033. You don't have the permissions to use DB1BE..." This
happens EVERYTIME I open DB1. If I then enter
? IsDBExclusive(Currentdb.name)
and then rerun OpenBEExcl it works and no error 3033!

If I were to run
? IsDBExclusive("C:\Apps\DB1BE.MBB)
first instead of passing Currentdb.name it tells me DB1BE is not
exclusive. But that doesn't affect my OpenBEExcl problem. I will get
the error 3033. The ONLY way I don't get the 3033 error is to first run
IsDBExclusive on the currentdb. From then on I can run any routine
without error.

Can you tell me anything about error 3033 No permissions error? I've
checked the back end. I'm the owner of everything. I have all rights
for all objects. Why would it tell me I have no permissions on a
backend database that the front end is linked to?

Any clarification is appreciated.
Sub OpenBEExcl()
Dim dbs As Database

Set dbs = OpenDatabase("C:\Apps\DB1BE.MDB", True)
MsgBox "Open"
dbs.Close
Set dbs = Nothing

End Sub
Function IsDBExclusive(strDBName As String) As Integer
'Q117539 KB article
' Purpose: Determine if the current database is exclusive.
' Returns: 0 if database is not open exclusively.
' -1 if database is open exclusively.
' Err if any error condition is detected.

Dim db As Database
Dim hFile As Integer
hFile = FreeFile

If DIr$(strDBName) <"" Then

On Error Resume Next
Open strDBName For Binary Access Read Write Shared As hFile

Select Case Err
Case 0
IsDBExclusive = False
Case 70
IsDBExclusive = True
Case Else
IsDBExclusive = Err
End Select
Close hFile
On Error GoTo 0
Else
MsgBox "Couldn't find " & db.name & "."
End If
End Function

Oct 12 '07 #1
0 4934

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eino Mäkitalo | last post by:
I just test in Windows XP with Python 2.4 I'd like to create a file with exclusive flag. If file exist I try to use it, if not I'd like to create it. Python (and underlying library) works...
0
by: Bill | last post by:
I have three databases running, all with a slightly different function: 1) Shared Database where data entry is done 2) Data Inventory where information from the Shared Database is loaded to...
0
by: Aaron | last post by:
Hi Guys, I have a dbase installed on a network where the clints have linked tables to the database on the server. I found that i had to make some minor changes to the tables on the server...
0
by: Wayne | last post by:
Can someone please help with this problem. When referring to opening a database in Exclusive mode the Access 2003 help says: "Under Default open mode, do one of the following: If you want others...
2
by: Gayathri | last post by:
Hi I am using MS Access to store the data in an .mdb file. And I observe that, if the .mdb is open, I receive a runtime error whenever I/someone tries to access any of the .aspx pages that needs to...
6
by: xg | last post by:
Hi, I am writing an ASP page which contains the following code: var MM_DBConn=Server.CreateObject("ADODB.Connection"); MM_DBConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data...
1
by: buclas | last post by:
Hi, I need to link a mdb file and make sure it opens in a non-exclusive mode. I looked for a similar post but none was answered. I know there is a specific param to add to the command line to...
2
by: jennifer | last post by:
All of a sudden, I am getting the following Microsoft Office Access popup when I try to open my database. "The current user account doesn't have permission to convert or enable this database....
6
by: =?Utf-8?B?RyBIdXN0aXM=?= | last post by:
I am creating a new MS Access DB in code, which works fine. I then try to open it & set a password. I keep getting an error that the DB is already open by my machine's Admin account. In reality it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.