Roll back sql statement
hi friends
i have vb.6 app. and in this app. i can delete ,select, update the records in database ms access .
so if i delete a record and i want to roll back it what to do here.
what is the query to rollback any deleted records.
for ex:
i have two table A and B so when i insert a record into A
and when insert into B table it deleted from table A
so here if i delete from table B it restor the same record to TABLE A.
THANK U. BYE
# 1 Re: Roll back sql statement
U should use transctions. Inside a transaction U can rollback or commit transaction.
If transaction is already commited U can only reinsert rows...
Hope that it helps.
Krzemo at 2007-11-9 13:43:14 >

# 2 Re: Roll back sql statement
Transactions are the way to go when you need a commit/rollback functionality.
From what you have written in the example, it looks like best to have a trigger set to insert on table B and delete on table B. That is the best approach to doing this. What database are you using? Regards.