![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When activating the code below I get this error Data source provider error. Multiple-step OLE DB operation generated errors. check each ole db status value, if available. No work was done. ...can't I do update cube in this context ? Sub writebacktest() Dim db As ADODB.Connection Dim sQry As String Dim sConnection As String Dim rs As Cellset Dim i As Integer, j As Integer, k As Integer Dim intCellY As Integer, intCellX As Integer Dim ws As Worksheet '*-------------------------------------------------------------------------- ------------------------ '* Construct your MDX query how you wish, this may take parameters 'from a drop down box on a report '* or just be typed in here. '*-------------------------------------------------------------------------- ------------------------ 'this one works-->sQry = "SELECT [Aktivitet].members on rows, [Sted].members on columns from TotalBudget where ([Measures].[Budgetbeløb])" sQry = "update cube [Totalbudget] set ([Measures].[Budgetbeløb],[Artskonto].[All Artskonto].[10],[Sted].[all Sted].[30 Patent- og brugsmodelområdet],[Aktivitet].[All aktivitet].[36504 Periodika],[Tid].[All Tid].[2005].[1. kvartal]) = 20000000 use_equal_allocation" 'Open a new ADO connection Set db = New ADODB.Connection 'Change the data source to your server name and the provider toMSOLAP (I think!) sConnection = "datasource=localhost;PROVIDER=MSOLAP.2;DATABASE=p vs_demo2;" 'Use this user name and password to connect to the server. db.Open sConnection, "Admin", "" 'Open a CellSet to store the results of the query. Set rs = New Cellset 'Tidy the query of an erroneous spaces sQry = Trim(sQry) 'Open the query that was constructed above With rs .Open sQry, db End With db.CommitTrans End Sub |
#3
| |||
| |||
|
|
Tried another structure again with no luck - at some point it actually tells me something specific is wrong with my mdx statement and when this is fixed the same error occurs. Tried searching the web for help but many different explanations - yet no one that preciously matched my setup. One said to downgrade the MDAC - could this be true ? On machine A where it is working I'm using MDAC 2.6 and the machine where it isn't I'm using MDAC 2.7. Seems like a bit drastic approach though ? "Michael Vardinghus" <xxx (AT) xxx (DOT) com> wrote in message news:#cNylYZsFHA.3640 (AT) tk2msftngp13 (DOT) phx.gbl... When activating the code below I get this error Data source provider error. Multiple-step OLE DB operation generated errors. check each ole db status value, if available. No work was done. ...can't I do update cube in this context ? Sub writebacktest() Dim db As ADODB.Connection Dim sQry As String Dim sConnection As String Dim rs As Cellset Dim i As Integer, j As Integer, k As Integer Dim intCellY As Integer, intCellX As Integer Dim ws As Worksheet '*-------------------------------------------------------------------------- ------------------------ '* Construct your MDX query how you wish, this may take parameters 'from a drop down box on a report '* or just be typed in here. '*-------------------------------------------------------------------------- ------------------------ 'this one works-->sQry = "SELECT [Aktivitet].members on rows, [Sted].members on columns from TotalBudget where ([Measures].[Budgetbeløb])" sQry = "update cube [Totalbudget] set ([Measures].[Budgetbeløb],[Artskonto].[All Artskonto].[10],[Sted].[all Sted].[30 Patent- og brugsmodelområdet],[Aktivitet].[All aktivitet].[36504 Periodika],[Tid].[All Tid].[2005].[1. kvartal]) = 20000000 use_equal_allocation" 'Open a new ADO connection Set db = New ADODB.Connection 'Change the data source to your server name and the provider toMSOLAP (I think!) sConnection = "datasource=localhost;PROVIDER=MSOLAP.2;DATABASE=p vs_demo2;" 'Use this user name and password to connect to the server. db.Open sConnection, "Admin", "" 'Open a CellSet to store the results of the query. Set rs = New Cellset 'Tidy the query of an erroneous spaces sQry = Trim(sQry) 'Open the query that was constructed above With rs .Open sQry, db End With db.CommitTrans End Sub |
![]() |
| Thread Tools | |
| Display Modes | |
| |