![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I´m doing a ASP.NET page (vb.net) and trying to Writeback a value in a Cube through the UPDATE CUBE Statement. Just to test I'm using the Bugdet Cube of FoodMart 2000, which I changed to allow Write Back. Using the MDX Application Sample I could execute the following commands without any problem: UPDATE CUBE [Budget] SET ([Account].[Lease],[Store].[Store 20], [Category].[Forecast],[Time].[1],[Measures].[Amount]) = 10 and after that one line was inserted in the Writeback table. But if I execute the same statement in the ASP.NET I get an error message saying that the Cube is read-only and the UPDATE couldn't be processed. These are my codes, first using ADODB: 'Code using ADODB Dim conAS As New ADODB.Connection Dim MDXset As String conAS.Mode() = ConnectModeEnum.adModeReadWrite conAS.ConnectionString() = "provider=MSOLAP;Data Source= localhost;Initial Catalog=FoodMart 2000" conAS.CommandTimeout() = 300000 conAS.Open() 'A simple CUBE UPDATE just in leaf member of all dimensions that works fine in the MDX Sample Application MDXset = "UPDATE CUBE [Budget] SET ([Account].[Lease],[Store].[Store 20],[Category].[Forecast],[Time].[1],[Measures].[Amount]) = 10" conAS.BeginTrans() conAS.Execute(MDXset) conAS.CommitTrans() conAS.Close() When I get the following error message: "The operation has failed because of an attempt to update a read-only object" And second an alternative code using OleDB: 'Code using OleDB Dim MDXSet As String Dim mConn = New OleDbConnection("provider=MSOLAP;Data Source=LocalHost;Initial Catalog=FoodMart 2000") Dim Command As OleDbCommand Dim mTrans As OleDbTransaction 'A simple CUBE UPDATE just in leaf member of all dimensions that works fine in the MDX Sample Application MDXSet = "UPDATE CUBE [Budget] SET ([Account].[Lease],[Store].[Store 20],[Category].[Forecast],[Time].[1],[Measures].[Amount]) = 10" mConn.Open() mTrans = mConn.BeginTransaction() Command = New OleDbCommand Command.Connection() = mConn Command.CommandText() = MDXSet Command.Transaction() = mTrans Command.ExecuteNonQuery() mTrans.Commit() Getting the error message: "Updates cannot be propagated to cube 'Budget' because it is a read-only cube. The operation has failed because of an attempt to update a read-only object" I also tried to use this ConnectionString: "provider=MSOLAP;Data Source=localhost;Initial Catalog=FoodMart 2000;" & _ "Writeback Timeout=300;Cache Ratio=0.1;Cache Ratio2=0.1;Default Isolation Mode=0;Execution Location=3;Client Cache Size=0;Secured Cell Value=3;" But even so the error persists! Does anybody can help me?? I really have no idea what else I could try about it! |
#3
| |||
| |||
|
|
Could it be related to security ? What are the credentionals under which you connect to AS from the ASP.NET page ? -- ================================================== Mosha Pasumansky - http://www.mosha.com/msolap Development Lead in the Analysis Server team All you need is love (John Lennon) Disclaimer : This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== "Vinicius Bellino" <vbellino (AT) uol (DOT) com.br> wrote in message news:93d12908.0405071508.1e519105 (AT) posting (DOT) google.com... Hello, I´m doing a ASP.NET page (vb.net) and trying to Writeback a value in a Cube through the UPDATE CUBE Statement. Just to test I'm using the Bugdet Cube of FoodMart 2000, which I changed to allow Write Back. Using the MDX Application Sample I could execute the following commands without any problem: UPDATE CUBE [Budget] SET ([Account].[Lease],[Store].[Store 20], [Category].[Forecast],[Time].[1],[Measures].[Amount]) = 10 and after that one line was inserted in the Writeback table. But if I execute the same statement in the ASP.NET I get an error message saying that the Cube is read-only and the UPDATE couldn't be processed. These are my codes, first using ADODB: 'Code using ADODB Dim conAS As New ADODB.Connection Dim MDXset As String conAS.Mode() = ConnectModeEnum.adModeReadWrite conAS.ConnectionString() = "provider=MSOLAP;Data Source= localhost;Initial Catalog=FoodMart 2000" conAS.CommandTimeout() = 300000 conAS.Open() 'A simple CUBE UPDATE just in leaf member of all dimensions that works fine in the MDX Sample Application MDXset = "UPDATE CUBE [Budget] SET ([Account].[Lease],[Store].[Store 20],[Category].[Forecast],[Time].[1],[Measures].[Amount]) = 10" conAS.BeginTrans() conAS.Execute(MDXset) conAS.CommitTrans() conAS.Close() When I get the following error message: "The operation has failed because of an attempt to update a read-only object" And second an alternative code using OleDB: 'Code using OleDB Dim MDXSet As String Dim mConn = New OleDbConnection("provider=MSOLAP;Data Source=LocalHost;Initial Catalog=FoodMart 2000") Dim Command As OleDbCommand Dim mTrans As OleDbTransaction 'A simple CUBE UPDATE just in leaf member of all dimensions that works fine in the MDX Sample Application MDXSet = "UPDATE CUBE [Budget] SET ([Account].[Lease],[Store].[Store 20],[Category].[Forecast],[Time].[1],[Measures].[Amount]) = 10" mConn.Open() mTrans = mConn.BeginTransaction() Command = New OleDbCommand Command.Connection() = mConn Command.CommandText() = MDXSet Command.Transaction() = mTrans Command.ExecuteNonQuery() mTrans.Commit() Getting the error message: "Updates cannot be propagated to cube 'Budget' because it is a read-only cube. The operation has failed because of an attempt to update a read-only object" I also tried to use this ConnectionString: "provider=MSOLAP;Data Source=localhost;Initial Catalog=FoodMart 2000;" & _ "Writeback Timeout=300;Cache Ratio=0.1;Cache Ratio2=0.1;Default Isolation Mode=0;Execution Location=3;Client Cache Size=0;Secured Cell Value=3;" But even so the error persists! Does anybody can help me?? I really have no idea what else I could try about it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |