Skip to content

Commit 1521dce

Browse files
committed
fixing "Commit()" method not found error
1 parent db0a05a commit 1521dce

7 files changed

Lines changed: 15 additions & 5 deletions
13.5 KB
Binary file not shown.

SQL2017_BidsHelper.csproj.user

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
<StartProgram>C:\Program Files %28x86%29\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe</StartProgram>
66
<StartArguments>/rootsuffix Exp</StartArguments>
77
</PropertyGroup>
8+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
9+
<StartAction>Program</StartAction>
10+
<StartProgram>C:\Program Files %28x86%29\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe</StartProgram>
11+
<StartArguments>/rootsuffix Exp</StartArguments>
12+
</PropertyGroup>
813
</Project>

SSAS/Tabular/TabularActionsEditorPlugin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ private void ExecSandbox(Microsoft.AnalysisServices.BackEnd.DataModelingSandbox
149149
TabularHelpers.SaveXmlAnnotation(cube, SSAS.TabularActionsEditorForm.ACTION_ANNOTATION, form.Annotation);
150150

151151
cube.Update(UpdateOptions.ExpandFull);
152-
tran.Commit();
152+
tran.GetType().InvokeMember("Commit", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, tran, null); //The .Commit() function used to return a list of strings, but in the latest set of code it is a void method which leads to "method not found" errors
153+
//tran.Commit();
153154
}
154155
};
155156
#if DENALI || SQL2014

SSAS/Tabular/TabularDisplayFolderPlugin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ private void ExecSandbox(DataModelingSandboxWrapper sandboxParam)
235235
TabularHelpers.EnsureDataSourceCredentials(sandboxParam.GetSandbox());
236236
cube.Parent.Update(UpdateOptions.ExpandFull);
237237

238-
tran.Commit();
238+
tran.GetType().InvokeMember("Commit", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, tran, null); //The .Commit() function used to return a list of strings, but in the latest set of code it is a void method which leads to "method not found" errors
239+
//tran.Commit();
239240
}
240241
};
241242
#if DENALI || SQL2014

SSAS/Tabular/TabularHideMemberIfPlugin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ internal void SetHideMemberIf(Microsoft.AnalysisServices.BackEnd.DataModelingSan
248248
d.Process(ProcessType.ProcessFull);
249249
}
250250

251-
tran.Commit();
251+
tran.GetType().InvokeMember("Commit", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, tran, null); //The .Commit() function used to return a list of strings, but in the latest set of code it is a void method which leads to "method not found" errors
252+
//tran.Commit();
252253
}
253254

254255
};

SSAS/Tabular/TabularSyncDescriptionsPlugin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ internal void ExecuteSyncDescriptions(Microsoft.AnalysisServices.BackEnd.DataMod
199199
if (iDescriptionsSet > 0)
200200
db.Update(UpdateOptions.ExpandFull);
201201
#endif
202-
tran.Commit();
202+
tran.GetType().InvokeMember("Commit", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, tran, null); //The .Commit() function used to return a list of strings, but in the latest set of code it is a void method which leads to "method not found" errors
203+
//tran.Commit();
203204
}
204205

205206
MessageBox.Show("Set " + iDescriptionsSet + " descriptions successfully.", "BIDS Helper - Sync Descriptions");

SSAS/Tabular/TabularTranslationsEditorPlugin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ private void AlterDatabase(List<SSAS.TabularTranslatedItem> translatedItems)
389389
TabularHelpers.EnsureDataSourceCredentials(sandboxWrapper.GetSandbox());
390390
cube.Parent.Update(UpdateOptions.ExpandFull);
391391

392-
tran.Commit();
392+
tran.GetType().InvokeMember("Commit", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, tran, null); //The .Commit() function used to return a list of strings, but in the latest set of code it is a void method which leads to "method not found" errors
393+
//tran.Commit();
393394
}
394395
};
395396
#if DENALI || SQL2014

0 commit comments

Comments
 (0)