Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conflict management in views
Message
From
12/11/2004 17:28:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/11/2004 13:08:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00960857
Message ID:
00961046
Views:
22
>Hello,
>
>on MS-SQL Server you can use "Key Field & Timestamp"
>which is IMHO the best conflict check method (no long SQL statement - very fast)

Indeed, that sounds quite efficient.

>if you use other DB backends you can code a special CursorAdapter class that uses the same concept (isn't that much effort)
>
>i don't have coded a field based conflict checking system yet since it's really much work for very little value, for me this scheme was ok (pseudocode)
>
>IF !TABLEUPDATE(.t.,.f.,'someview')
> MESSSAGEBOX('Another user has changed the record .. the record is now reloaded .. !')
> TABLEREVERT('someview')
> REFRESH('someview')
> RETURN
>ELSE
>.. code to set form to non-editing status ..
>ENDIF

Yes, this is more or less what I was doing. But I had done my testing with tables, and used tables most of the time. And in the case of views, I had been thinking - erroneously - that everything would work fine if I checked "Key fields only".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform