Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access denied

Status
Not open for further replies.

DanNorris2000

Technical User
Joined
Nov 10, 2000
Messages
186
Location
US
Used Project/Build to create an .exe on a server. Then placed a shortcut to that exe on several PC's. When I try to run forms(doesnt have to be same form)on 2 pc's at the same time I get access denied errors. I have checked to see that exclusive is false in the DE for each table.
Thanks
 
It is unnecessary to open the database exclusively if you just want to zap or pack a table. You only need to open the table exclusively. Try this:
[tt]
Select tmpcash
USE tmpcash EXCLUSIVE
Zap
USE tmpcash SHARED
[/tt]
Ian
 
Check the answer above.

close databases or close all. but for a multi user system you can't just zap the file becase other users may be using them. If only one user is going to use this file have the program open the file special not with all the other files. then zap.
 
Hi Dan Norris,

Since you are doing it in a network environment, you could try this approach:
Code:
&& MyTable is initially opened as SHARED
select MyTable
if flock()
  use MyTable exclusive
  set safety off   && set safety back to ON after Zap
                   &&  if necessary
  use MyTable shared
else
  =messagebox("File is in use by another user."+chr(13);
             +"Try Zapping the file later.")
endif

This is, I believe, what the rest of the guys here are trying to tell you. I hope this makes it clearer for you.

Please note that all relationships (if there be any), wherein MyTable is possibly engaged in, will be lost after the above codes. You should re-establish these relationships after re-opening the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top