I m facing one problem here is the scenario
1> I m inserting a row into a table using NH and i m mofifying the same row , but all i need to do in single transaction , my update code is i m doing through SP
2> So my code sequence is like this
a> BeginTransaction
b> Inserting a record using NH
c> Create command object , Enlist that command object with
session.Transaction.Enlist(cmd)
d> cmd.ExcecuteNonquery()
e> commit the transaction
so i ahve table say Members which contains ID, name, rollupmap columns,
I m inserting a row having values for name, ID using NH code
using SP i m updating rollupmap column
This does not work, it stores only null value, because it does not get the record just inserted.
Now with ADO.NET
All the steps are done using ADO.NET inseted of NH
1> BeginTransaction
2> Insert a record
3> Update a record
4> Commit the transaction
What i observe that i updates rollupmap value properly
====================
Can anyone give any input on this ?????????
|