Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want -write protected checkbox, -refresh the datagrid
Message
 
À
13/11/1999 12:03:35
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00290859
Message ID:
00291033
Vues:
42
>Can I use the adLockBatchOptimistic? if the user do want cancel something in the datagrid.

Because you use adLockBatchOptimistic, I can say that you use ADO.

The sure way to do what you want can be to use disconnected recordset (set rs.activeconnection = nothing). Then if the user want to update, you can reconnect your recordset and use the UpdateBatch method. But using this method, I see 2 bad things:
1. It will be all or nothing (all changed records or none of them).
2. Collisions may occur (someone else can modify the same record you had modified).

Why not simply have a grid, a couple of textboxes (and other input controls) with an OK and a Cancel button and update only when the user click the OK button?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform