Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO and doing the edit thing
Message
 
 
À
03/09/2002 01:12:07
Jordan Pastourel
Worksafe Management Systems
Toowong, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00696110
Message ID:
00698305
Vues:
9
Hi!

Yes, ADO recordset field has UnderlyingValue property that gives you a hint what is currently on the server for that field. It is analogue of VFP's function CurVal(). There is also analogue of OldVal() - OriginalValue. Using these 2 values you can compare them (do not forget about NULL value :) ) and if they do not match - this indicates somebody changed data on the server and thus you risk to overwrite them (that usually requires confirmation from user). In my applications I even provide user a hint what was changed. I also saw an application where user can confirm overwriting field by field.

To use UnderlyingValue property, connection should be alive. This means you should have some built in approach across the tires to implement all above.

>Hi all,
>this might be an obvious question, but i was wondering about how to handle multi-users through using ADO.
>I have my program written in tiers with the data layer accessing a Foxpro database through ODBC drivers. the resulting recordset is returned to the Business layer and the connection is closed. My question is this:
>
>If you edit a record and make changes, is there a specific way to handle the situation where someone else has made changes to the same record? I thought about locking the record, but that wouldn't work since the connection is closed after the fetch would it (even if it did work, what about if the client side crashes)? How can i handle this? Am i doing something wrong?
>
>thanks
>Jordan
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform