Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for uniqueness - what's the problem in this code
Message
From
02/05/2002 13:18:19
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00651801
Message ID:
00651990
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
Hi nadya,

>The appender application could be run by only one user. I don't use buffering at all for this particular application.

>Do you think, it could be some internal NT buffering, which causes this select to return incorrect results?

I'm indeed talking about buffering on the OS level, thus not the buffering mechanism in VFP. When VFP opens a table, the OS buffers a portion of the table regardless of the VFP buffering mechanism. So, if you're issueing a SELECT command, you're not entirely sure that you've got the most recent data unless:

1. You've got exclusive access to these tables
2. You've flock-ed the tables
3. You're the only one who could change the tables.

In cases where one of the tables could be changed (insert, modify or delete records) by other users on the network, one of the three methods above must be used in order to make sure you're working with the most recent data.

Also, do not forget, that between the SQL-statement and the actual insert of a new record in the table another user might have changed one of the source tables. In these cases autogenerated primarykeys are very practical.

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform