Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't open file exclusively
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00999492
Message ID:
00999843
Views:
40
Strange INDEED!!!

Have a read of the following. It might suggest a possible problem (you do mention 2,000,000+ records).
http://fox.wikis.com/wc.dll?Wiki~HighRangeLockingBug~VFP

I'm thinking that some other file might "overlap" with the existing file, from a locked record 'ID' point-of-view.

If the file can be renamed at the user site, then can it also be zapped and then renamed back to original so your program will work?

good luck



>Well, it gets stranger all the time. I sent the user a small EXE that just opened the table and browsed it. Worked like a champ. In the little test EXE I opened the table using the DBCName!TableName syntax, but in the "real" program I was pointing to it like so: USE DATA\SC_PARTS
>
>So in the real progam, I switched to the DBCName!TableName syntax, not thinking it would make a difference and it didn't.
>
>The setting on EXCLUSIVE is OFF, the setting on MULTILOCKS in ON. The table is not opened in the DE. It is opened in an import method (I'm importing about 2 million records from text files) where the first thing I do is try to USE the table exclusively (since I want to ZAP it). There is no control on the form that uses the table for its ControlSource or RecordSource (or any other way). As I mentioned, the code works when running from my workstation and when running from the network (as the client is doing). The code is:
>
>
>try
>   select 0
>   use crossref!sc_parts  && exclusive
>catch to ErrObj
>   MsgText = "Error " + transform(ErrObj.ErrorNo) + ":  " +;
>             ErrObj.Message +;
>             gcCRLF + gcCRLF +;
>             iif(ErrObj.ErrorNo = 1705,;
>             "The SC_PARTS table could not be opened exclusively." +;
>             gcCRLF + "Close all other forms and try again.", "")
>   messagebox(MsgText, 64, "Import List Prices")
>   OkToContinue = .f.
>endtry
>if not OkToContinue
>   return
>endif
>
>
>>If you test these values immediately before the code fails, what do you get?
>> WAIT WINDOW SET('exclusive')
>> WAIT WINDOW SET('multilocks')
>> wait window used('mytable')
>> wait window dbc()
>>
>>can you post the line of code where the error is failing and describe where the error is occurring and describe where the code is located in your form?
>> - opening the table manually in the beforeopentables of the DE?
>> - possibly, you have a control on the form that is using the table
>> before you are running your code to open? (grid or listbox)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform