Need help in Transactionscope
I am using Transactionscope for transaction. In this transaction... I used two databases Oracle and Sql server.
1st - Get data from Sql server
2nd - Upload sql data on oracle server
3rd - Now update flag on sql server of uploaded data
above task done on the button click
var transactionOptions = new TransactionOptions();
transactionOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;
transactionOptions.Timeout = TransactionManager.MaximumTimeout;
using (TransactionScope DispTran = new TransactionScope(TransactionScopeOption.Required, transactionOptions))
{
try
{
objUploadReceive.updateDispatchHDRData();
objUploadReceive.updateDispatchDTLData();
DispTran.Complete();
lblMessage.Text = "Dispatch Data Upload Successfully.";
DispTran.Dispose();
}
catch (TransactionException ex)
{
common.writeLog(ex.Message, "Interface Updation Dispatch", "Exception");
MessageBox.Show("Transaction Exception Occured");
}
}
when I clicked on the button to perform task. It will upload data . at the same time when i checked data in oracle it is showing. But when i clicked second or third time on the button . It shows last data. Means it is unable to show live data . after closing the application the i am able to get data in oracle...
I need a suggestion where is the mistake.