Hii to All,


My question is


Databse: MS Access
Language is : VB .Net

I have two tables(Table 1 and table 2) related through primary key. Two classes, class 1 works with table 1 and class2 works with table 2.

So, what i am doing is call method in first class perfom "Insert " on table 1, get primary key of table 1, then call method in second class which works with tabl2 and "Insert" record record in table 2 with Primary key. (Which is foriggn key for table 2)

If Second "insert" failed by any chance, i am not able to rollback first "Insert" performed table 1 as both are in different classes.

My question is How to Develop classes or methods in data tier which only works with database.? and where i can able to Roll Back first "Inert" in case if second "Insert" failed. ?

Please give your feedback ... or any reference.....

Thanks in advance...

HDave