Question about cancelling the editing and update of record

Hello,

I am using VB6 with Micosoft ADO Control 6.0 to access the SQL Server 6.5.



I have created a command button known as Cancel . What this cancel button should perform would be



(1) Cancel any update from user editing its current record and to resume the

original outlook

(2) If the user try to add a record ( go to a blank new record) . By pressing this Cancel button should also return back to the record where he should be before the action of adding the new record.



(1) It should look like this for Cancel any editing changes



Name : abcd (Before editing)

Name : abcdefghijk (after inserting)

Name: abcd (after pressing the Cancel button)



How can all this be done?


Comments

  • try this: recordset.cancelupdate



    You can use the CancelUpdate method to cancel any pending updates resulting from an Edit or AddNew operation. For example, if a user invokes the Edit or AddNew method and hasn't yet invoked the Update method, CancelUpdate cancels any changes made after Edit or AddNew was invoked.



    Hope this helps,



    Oz



    : Hello,

    : I am using VB6 with Micosoft ADO Control 6.0 to access the SQL Server 6.5.

    :

    : I have created a command button known as Cancel . What this cancel button should perform would be

    :

    : (1) Cancel any update from user editing its current record and to resume the

    : original outlook

    : (2) If the user try to add a record ( go to a blank new record) . By pressing this Cancel button should also return back to the record where he should be before the action of adding the new record.

    :

    : (1) It should look like this for Cancel any editing changes

    :

    : Name : abcd (Before editing)

    : Name : abcdefghijk (after inserting)

    : Name: abcd (after pressing the Cancel button)

    :

    : How can all this be done?

    :






Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories