Hi,
I have 2 classes with some data insert methods, basicinfo and otherinfo. both methods named save and gets connection and transaction as parameters.
now i need to call both methods in a try catch block with transaction and want to catch it. if some error occur in the methods the try catch block of the calling code should catch the execption. how can i achieve this.
begin transaction
try
{
basicinfo.save(trn,cnn)
otherinfo.save(trn,cnn)
trn.commit
}
catch
{
trn.rollback
}
thanks