Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect database changes or changes made to the recordset
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00386186
Message ID:
00386277
Vues:
17
You might try checking the Recordset.Status property. This gives you the stats of the current record in the Recordset. If it is equal to adRecModified (2) then ...

I haven't tested this so YMMV.

>>>>>Hi,
>>>>>
>>>>>I'm new to VB. I'm using VB and SQL for my app. I can't find a way to detect changes made to a recordset. Would somebody help me on this? Please provide some simple codes. This will be really helpful.
>>>>
>>>>Which changes? Changes made by other users once a recordset is open? You need a server sided cursor (CursorLocation = adUseServer) with a CursorType set to adOpenKeySet or adOpenDynamic.
>>>
>>>Sorry that i was't clear on my question. This is my situation. I have created a VB form with a few controls on it. These controls are hooked up to an ADO recordset. In addition, I have a 'save' and 'close' buttons on my form. If an user makes some or no changes to my form, when he/she click on the 'close' button, I want to detect if there are any changes made so that i can prompt him/her.
>>>
>>>Thx.
>>
>>When I give that kind of functionnality, I use the Change event of every control to flag a variable and use this variable!
>>
>>I think that bound controls have the DataChanged property but I never use them!
>
>
>
>Is this the ONLY way to go? or are there any other ways? Anyone? Please help.
>
>Thanks
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform