tags:

views:

30

answers:

2

Hi I am working on a Vb.Net application . I have a compose message web form where users will compose a message , but after the users click the send button I am inserting in the message table. All is working fine , infact great . Now I am thinking of adding a undo button where I will show this button if the user will click the send button . If the user clicks the send button and leaves the undo button the insert query will be fired. But if the user clicks the send button , but then he clicks the undo button the the insert query should not be fired or it should be rolled back ...or something ...I mean the user should be back on his compose message state as before.

A: 

Well rollback refers to something else.

You should delete the entry you have just inserted and insert it again. Look into insert or replace syntax, it might help you.

Pentium10
A: 

What determines when a message gets sent? If it's a batch process, you could just leave the inserted data as is and eventually timeout the undo button's enabled property.

adamcodes