Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File is in Use by Another User
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00676168
Message ID:
00676215
Views:
12
>AFAIK Insert command locks the table header, thus the Error you're getting.

I thought something along this line.... when I read from the INSERT - SQL help info...
"If the table you specify isn't open, it is opened exclusively in a new work area and the new record is appended to the table. The new work area isn't selected; the current work area remains selected.

If the table you specify is open, INSERT appends the new record to the table. If the table is open in a work area other than the current work area, it isn't selected after the record is appended; the current work area remains selected."

Does the "append" do a momentary lock on the table for the append? If so, then the simultaneous attempts by the 2 batch files would cause the problem....sigh....

>>You may surround your insert with explicit flock() or try to use this table in buffering mode and then tableupdate. I think, the first method would be better.

Yeah, I think so too...

So I need to add to the AUDITBAT code the following?....

SET REPROCESS TO 10 SECONDS (set locking attemt to 10 seconds)

Then

IF FLOCK('auditbat')
Do the insert and/or update stuff
ELSE
Don't do any of it.
ENDIF

Thanks!
>
>>The Error : "File is in Use by Another User"
>>
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform