Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 108: What gives?
Message
From
07/12/2006 12:30:14
 
 
To
07/12/2006 08:54:09
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01175426
Message ID:
01175758
Views:
15
Sergey,
Thank you for the feedback. Question, will using APPEND BLANK instead fix this?

>The INSERT INTO command briefly locks the table header. If 2 inserts happen at the same time, you'll get error 108. Also some commands, like DELETE FOR/WHILE, REPLACE FOR/WHILE look the table whick could cause a similar result.
>
>>
>>Error 108: You have attempted a USE, DELETE, or RENAME command on a file that is being used by another user on a network
>>
>>I get this error and I don't see how it would happen based on this scenario. The error does not happen too often - maybe five times a year.
>>
>>
>>Use MyTable IN 0 alias MyTable again shared && Was able to open the file successfully.
>>Insert into MyTable (fld1, fld2) Values (NextId(), "Hello World") && Error 108 happens!!!
>>
>>function NextId()
>>local nNextId
>>nNextId = -1
>>cAlias=alias()
>>use MyId in 0 alias MyId again shared
>>go top
>>if rlock()
>>  replace nextid with nextid + 1
>>  nNextId = nextid
>>  unlock
>>endif
>>use in select('MyId')
>>select (cAlias)
>>return nNextId
>>
>>Environment:
>>1. MyApp.exe runs on several MyAppServers. There are at least 25 instances of MyApp.exe running.
>>2. Data resides on MyDataServer.
>>3. At any given second, there can be at least 5 queries, updates or inserts (any or all) against MyTable.
>>4. SET REPROCESS TO 2
>>
>>
>>What preventive code should I put in - probably before the INSERT statement? I don't want to use the AutoInc functionality as the tables are before that version of VFP.
ramil
~~ learning to stand still
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform