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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unlocking a Database??

Status
Not open for further replies.

stanmurphy

Technical User
Oct 14, 2000
89
Hi All,

I've written a multiuser program in VFP8 but apparently multiuser programming is not my forte. All users are locked out of the data table now. And when I go in to edit the program, I'm told the database is locked when I try to use it or any of the tables. How do I unlock it, please!!???

Thank you very much,

Stan
 
stanmurphy

Do you have SET MULTILOCKS ON in your startup.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Yes, I do. Listed below is the code in my MAIN program:


**********************************************
CLOSE ALL
CLEAR ALL


PUBLIC m.CLIENTID, m.CAMPUS

PUBLIC m.CURRENT_USER

STORE "" TO m.CURRENT_USER, m.CAMPUS

ON ESCAPE STORE "" TO mmmmm

SET TALK OFF
SET BELL off
SET CENTURY on
SET CONFIRM ON
SET DEFAULT TO C:\overlord
SET PATH TO C:\overlord\ffc;c:\overlord\ffc\graphics
SET DELETED ON
SET EXCLUSIVE OFF
SET HOURS TO 24
SET MULTILOCKS ON
SET REPROCESS TO automatic

USE coun IN 0
USE SCHEDULE_DAYS IN 0
USE appt IN 0
USE CONTROLFILE IN 0

DO FORM SCHEDULE
READ EVENTS
****************************************



 
Does it happen when someone have a report open?

Do you have a: Report Form XXX FOR BLA BLA BLA??? somewhere in your app?

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
Do you have somewhere in the app where you open the file exclusive??? for backup, indexing, etc..?

I mean, you have set exclusive off.. that should it.

Also, do you have somewhere an rlock() or an flock()or something, where you actually lock the record, say for appending or replacing and it is not being unlocked?

Just trying to pick your brain.. don't mean to give you a hard time.

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
No problem, I appreciate the interest.

There are no exclusive opens. There are Flock() commands, but they are all matched with unlock(). And besides, shouldn't the lock be released when the program is closed??

I have tried opening the file on both Novell workstations from which it was previously opened, but I get the 'file locked' message on both machines.
 
Yes the tables should unlock when closed.

That's a nasty on!


A couple of questions:

Are you using mapped drive names or network resource names?

Can you get a low-level file handle to the DBC?

Are you using source control during development and have
included the tables in source control?

----

Just some shotgun attempts...

Darrell
 
I noticed the local drive specification "c:\...".

But what's the network drive where other users
are locked out?

Darrell
 
Actually, in the compiled code, the path is:

\\serv110\sys\software\vision_appt pointing to the

directory on the Novell network. I haven't tried the low level handle.
 
Do you by chance have a 'ghost' version of the app running?
Try pulling up the task list on your workstations and see if the app maybe didn't get properly shut down or released. It may have issued an FLOCK() and abended sometime.
Also, do you have any sort of REPLACE ALL type of commands which you run globally on the table? Those will FLOCK() the file before they do any replaces.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
When I checked the file this morning, it had been released. Don't ask me how or when :)

And no, I don't have any REPLACE ALL commands.

Also, I don't find the program running on any machine.

And we're using Novell 3.11
 
stanmurphy,

I found the following interesting and was wondering whether perhaps what you experienced is related. The work around of a dedicated volume, while a bit extreme, does appear to have few drawbacks.


Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top