Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Issue in accessing SSAS cube using ADOMD.Net

$
0
0

Hi ,

My issue is "whenever i am updating any cell Inside Begin Transaction(without Commit/Rollback) and accessing the updated value,it is being reflected"

but at the same time if i try to do this with ADOMD.Net without Rollback/Commit,my transaction is getting rolled back(found using SQL Profiler) and i can't see the recent changes.

my code is like below:

[code]

 public void refreshCellset(string strQuery)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                SQLDataAccessFactory obj = new SQLDataAccessFactory();
                using (AdomdTransaction trans = obj.BeginAdomdTransaction())
                {
                    mAdomdCommand = new AdomdCommand(strQuery, obj.mAdomdConnection);
                    mAdomdCommand.CommandType = CommandType.Text;
                    mAdomdCommand.CommandTimeout = 360000;
                    mAdomdCommand.Execute();
                    if (mIsAdomdTransactionStarted)
                    {
                         trans.Commit();
                        obj.CloseAdomdConnection();
                    }
                    else
                    {
                        trans.Rollback();
                        obj.CloseAdomdConnection();
                    }

                }
                this.CloseAdomdConnection();
            }
        }

[/code]


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>