Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP, FLOCK() and NT
Message
From
09/03/1999 09:58:17
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00195513
Message ID:
00195519
Views:
24
Hi Luis ---

First off, do I know you? Your name seems familiar....

Anyway, I have had this problem with sequential keys, especially with Win95 peer-to-peer LANs and a lot of other situations where Windows servers are involved. I think it has something to do with the way Windows brokers LOCK requests. There was an MS KB article about not using buffered databases and LOCKs on Win95, NT a few years back but never saw that KB again. Anyway, check to make sure your key table is not being buffered. Failing that, a fallback position is to make API calls to CoCreateGUID and use GUIDs (guaranteed unique) as your key values (although I'm sure that this comment will generate some feedback :-)

In the Files section here, there are example files on creating GUIDs....failing that, I think that Rick Strahl has some example files at his westwind site.


>This is not VPM related but it is VFP related.
>Does anybody knows about a possible bug in VFP that it produces duplicates
>when the dataset resides on a NT server ?
>A customer started to have duplication of keys, we couldn't reproduced it
>when we had the dataset on a win95 machine, but when we put the dataset on a
>NT machine we saw it right the way.
>Specifically, we have a GetNextID() function that FLOCK() the system.dbf
>which stores the last key number for all our tables.
>So maybe that has something to do FLOCK() and NT ?
>
>Thanks
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform