Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conflict management in views
Message
De
12/11/2004 17:28:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/11/2004 13:08:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00960857
Message ID:
00961046
Vues:
20
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform