exclusive access (1 Viewer)

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
hellllllllllllllllllllllllllllllllllllllllllllllp

ok i have been working on my database for a long time now and never had this problem, i open it up and try and edit something and it comes up with the message:

"you do not have exclusive access to the database at this time, if you preceed to make changes you may not be able to save them later."

i have no idea why this is comming up because i have not changed any of the read settings or the options... i have tried everything and cannot get it back to normal.

i even put it in a new database and just copy all the tables, queries etc across to it and it works find until i close it and then re-open it.... im baffeled

plz help asap

thanks
DAL




:confused: :confused: :confused:
 

Autoeng

Why me?
Local time
Today, 15:52
Joined
Aug 13, 2002
Messages
1,302
It sounds like the db has security on it and the lock file is not released so that you can edit the forms, ect... Have you distributed the db to your users yet? Post back with as much specific info as you can and I will try to help.

Autoeng
 

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
i have not sent this out to anyone it has not left my computer and i have not set no security so thats why im confused...

i tried creating a new database with just a table with just any data in it and then closing it and re-opening it to see if anything happened and when i reopened the database and tried to edit something i got this message:-

"The database has been placed in a state by user 'Admin' on
machine 'Darren' that prevents it from being opened or locked"

now im even more baffeled because its impossible that i changed anything cause i jus created the database and it only contains 1 table, i closed it and it saved. and then opened it straight away,.... so im still lost

DAL
 

Autoeng

Why me?
Local time
Today, 15:52
Joined
Aug 13, 2002
Messages
1,302
Did you perhaps open another database on your computer that did have security on it?

Autoeng
 

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
nope. only got a couple of database's on this computer and i created them all and i have never used security on any of them...
 

Autoeng

Why me?
Local time
Today, 15:52
Joined
Aug 13, 2002
Messages
1,302
Just for kicks and giggles do the following.

1) Open your db and do something to get the error. Without shutting down the db open Explorer and go to the directory that the db is in. Make sure that Explorer - View - Folder Options - View - Files and Folders - Hidden Files - Show All Files is selected. Look in the directory for a file ending in .ldb. Is there one? Someone has run Access security on your machine.

2) While in Access select Tools - Security - User and Group Permissions. Is there anything there?

3) Join the default security workgroup. First use explorer to do a file find on all files *.mdw. You want the one located in the Program Files folder. Did the system find any others? Then, from the Access Help file...

Join a Microsoft Access workgroup using the Workgroup Administrator
Exit Microsoft Access.


To start the Workgroup Administrator, open the language folder, and then double-click Wrkgadm.exe. Alternatively, you can use the MS Access Workgroup Administrator shortcut in the \Program Files\Microsoft Office\Office folder.


In the Workgroup Administrator dialog box, click Join.


Type the path and name of the workgroup information file that defines the Microsoft Access workgroup you want to join, and then click OK, or click Browse and then use the Select Workgroup Information File dialog box to locate the workgroup information file.

After you have joined the workgroup see if you still get the same error. If so and you found multiple locations of the *.mdw try joining another copy of the mdw file and see if that helps.

Autoeng
 

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
hum seems to be working fine for now and dont know why cause diddnt change anything.. lol ive done all that stuff u said as a precaution to keep it working

so thanks a lot

heres my other problem:

when the code below gets to the Set ws = DBEngine.Workspaces(0) line it says

"could not use c:\db.mdb, file allready open"

when the database im using is c:\db.mdb that is where this code is!!!


Code:
    Dim tablename As String
    Dim db As Database
    Dim tdf As TableDef
    Dim ws As Workspace
    Set ws = DBEngine.Workspaces(0)
    Set db = CurrentDb()
    Set tdf = db.CreateTableDef("DNRACS")
    Dim tmpnum As Integer
    Dim tmplabel()
    tmplabel = Array(lblchk1, lblchk2, lblchk3, lblchk4, lblchk5) 'array of labels on the form
    'sourcedb = openfiledb("c:\") 'open file diolog
    tablename = tmplabel(chkval - 1).Caption 'gets table name from a text box
    tdf.Connect = ";DATABASE=" & sourcedb
    tdf.SourceTableName = tablename
    db.TableDefs.Append tdf
 

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
no worrys that is working ok now,.., and i have no idea why cause i have not changed nout,,,, lol
 

Autoeng

Why me?
Local time
Today, 15:52
Joined
Aug 13, 2002
Messages
1,302
I think I would call in a member of the clergy and have the demons expelled from you computer.

Autoeng
 

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
i think thats the best idea ive heard all day, its started with the first error again now

"you do not have exclusive access to the database at this time, if you preceed to make changes you may not be able to save them later."







arrgrrrrrrrrrrrrrrrrgggggggggggggggggg:mad: :mad: :mad: :mad: :mad: :mad: :mad:
 

Autoeng

Why me?
Local time
Today, 15:52
Joined
Aug 13, 2002
Messages
1,302
Run through the checks that I posted earlier and see if any of them turn up anything. Post back if they do and I'll try to help you get rid of the lock.

Autoeng
 

dgoulston

Hasn't Got A Clue
Local time
Today, 20:52
Joined
Jun 10, 2002
Messages
403
this gets funnier by the minute
thats working fine again now.... but this isnt.. it seems its either one prob or the other, never have both at once...

when the code below gets to the Set ws = DBEngine.Workspaces(0) line it says

"could not use c:\db.mdb, file allready open"

when the database im using is c:\db.mdb that is where this code is!!!

Code:
    Dim tablename As String
    Dim db As Database
    Dim tdf As TableDef
    Dim ws As Workspace
    Set ws = DBEngine.Workspaces(0)
    Set db = CurrentDb()
    Set tdf = db.CreateTableDef("DNRACS")
    Dim tmpnum As Integer
    Dim tmplabel()
    tmplabel = Array(lblchk1, lblchk2, lblchk3, lblchk4, lblchk5) 'array of labels on the form
    'sourcedb = openfiledb("c:\") 'open file diolog
    tablename = tmplabel(chkval - 1).Caption 'gets table name from a text box
    tdf.Connect = ";DATABASE=" & sourcedb
    tdf.SourceTableName = tablename
    db.TableDefs.Append tdf

but this exact code works fine in another database.. so im baffelled!!!
 

Users who are viewing this thread

Top Bottom