Share via

Error pulling data from Sage 50 through Power Query

Anonymous
2018-05-01T10:23:36+00:00

I am trying to build a reporting model which extracts data from Sage 50 through Power Query.

When I set up the connections I can connect to the Sage Data, see the tables and create a connection.  When the connection tries to pull data I get the following error:

Error Message:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Stack Trace:

Server stack trace:

Exception rethrown at [0]:

   at Microsoft.OleDb.AsyncResult`1.get_Value()

   at Microsoft.Mashup.OleDbProvider.DataHost.BufferingMashupEvaluator.BufferingMashupEvaluation.GetBufferedReaderSource(AsyncResult`1 result)

   at Microsoft.Mashup.OleDbProvider.DataHost.BufferingMashupEvaluator.BufferingMashupEvaluation.OnEvaluationComplete(AsyncResult`1 result)

Exception rethrown at [1]:

   at Microsoft.OleDb.AsyncResult`1.get_Value()

   at Microsoft.Mashup.OleDbProvider.MashupRowset.get__Rowset()

   at Microsoft.Mashup.OleDbProvider.MashupRowset.get_ColumnsInfo()

   at Microsoft.OleDb.Rowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)

   at Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)

Stack Trace Message:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Invocation Stack Trace:

   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()

   at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)

   at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Exception exception)

   at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, WindowsHost windowsHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)

   at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()

   at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)

   at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.HandleException(Exception e)

   at Microsoft.Mashup.Client.Excel.OleDbProvider.ExcelMashupClassFactory.TraceAndReportException(String method, Exception exception)

   at Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)

Supports Premium Content:

False

Formulas:

section Section1;

shared AUDIT_HEADER = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    AUDIT_HEADER_Table = Source{[Name="AUDIT_HEADER",Kind="Table"]}[Data]

in

    AUDIT_HEADER_Table;

shared AUDIT_JOURNAL = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    AUDIT_JOURNAL_Table = Source{[Name="AUDIT_JOURNAL",Kind="Table"]}[Data]

in

    AUDIT_JOURNAL_Table;

shared AUDIT_SPLIT = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    AUDIT_SPLIT_Table = Source{[Name="AUDIT_SPLIT",Kind="Table"]}[Data]

in

    AUDIT_SPLIT_Table;

shared AUDIT_USAGE = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    AUDIT_USAGE_Table = Source{[Name="AUDIT_USAGE",Kind="Table"]}[Data]

in

    AUDIT_USAGE_Table;

shared NOMINAL_LEDGER = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    NOMINAL_LEDGER_Table = Source{[Name="NOMINAL_LEDGER",Kind="Table"]}[Data]

in

    NOMINAL_LEDGER_Table;

shared PURCHASE_LEDGER = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    PURCHASE_LEDGER_Table = Source{[Name="PURCHASE_LEDGER",Kind="Table"]}[Data]

in

    PURCHASE_LEDGER_Table;

shared SALES_LEDGER = let

    Source = Odbc.DataSource("dsn=Sage50_Skansen", [HierarchicalNavigation=true]),

    SALES_LEDGER_Table = Source{[Name="SALES_LEDGER",Kind="Table"]}[Data]

in

    SALES_LEDGER_Table;

I am using Excel 2016 MSO (16.0.9226.2114) 32 Bit

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

9 answers

Sort by: Most helpful
  1. Anonymous
    2018-05-08T09:18:59+00:00

    Hi Neo,

    Apologies for the delay it was a holiday here in the UK yesterday.  Note I have used Sage through PowerQuery in other organisations so am at a loss as to why this isn't working.  Anyway the steps I followed per your request below:

    I booted Excel in safe mode

    Opened PowerQuery Editor

    Chose New Source

    Selected a New Sage Company with a single invoice in it - NB I created the company especially to test this

    Logged in to the company

    Chose "AUDIT_SPLIT" from the list of tables

    > Unexpected Error

    Feedback Type:

    Frown (Error)

    Error Message:

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Stack Trace:

    Microsoft.Mashup.Evaluator.Interface.ErrorException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

       at Microsoft.Mashup.Engine1.Library.Odbc.Interop.OdbcInterop.SQLColAttributeW(OdbcStatementHandle StatementHandle, UInt16 ColumnNumber, UInt16 FieldIdentifier, OdbcBuffer CharacterAttribute, Int16 BufferLength, Int16& StringLength, IntPtr& NumericAttribute)

       at Microsoft.Mashup.Engine1.Library.Odbc.Interop.OdbcStatementHandle.GetColumnAttribute(Int32 columnNumber, UInt16 fieldIdentifier, OdbcBuffer characterAttribute, Int16& stringLength, Int64& numericAttribute)

       at Microsoft.Mashup.Engine1.Library.Odbc.Interop.OdbcStatementHandle.TryGetColumnAttribute(Int32 columnNumber, SQL_DESC v3FieldId, SQL_COLUMN v2FieldId, OdbcBuffer buffer, Int16& resultLength)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcPageReader.CreateSchemaTable(OdbcStatementHandle statement, Int32 columnCount, OdbcTypeMap[]& typeMaps)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcPageReader.New(OdbcConnectionHandle connection, OdbcStatementHandle statement, OdbcBuffer parameterBuffer, RowRange rowRange, Boolean isBindColumnSupported)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcService.OdbcEngineConnection.ExecuteDirect(String commandText, IList`1 parameters, RowRange rowRange)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcCachingService.OdbcCachingConnection.ExecuteDirect(String commandText, IList`1 parameters, RowRange rowRange)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcTracingService.OdbcTracingConnection.ExecuteDirect(String commandText, IList`1 parameters, RowRange rowRange)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcDelegatingConnection.ExecuteDirect(String commandText, IList`1 parameters, RowRange rowRange)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcDataSource.<>c__DisplayClass15.<ExecuteCore>b__10()

       at Microsoft.Mashup.Engine1.Library.Common.DbExceptionHandler.RunWithRetryGuardT

       at Microsoft.Mashup.Engine1.Library.Common.DbExceptionHandler.InvokeT

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcDataSource.ExecuteCore(String commandText, IList`1 parameters, RowRange rowRange, String[] columnNames, ColumnConversion[] columnConversions)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcDataSource.ExecuteCoreDataReader(String commandText, IList`1 parameters, RowRange range, String[] columnNames, ColumnConversion[] columnConversions)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcDataSource.ExecuteWithoutPaging(String commandText, IList`1 parameters, RowRange range, String[] columnNames, ColumnConversion[] columnConversions)

       at Microsoft.Mashup.Engine1.Library.Odbc.OdbcQuery.<GetRows>b__17()

       at Microsoft.Mashup.Engine1.Library.Common.DeferredEnumerable.DeferredEnumeratorEnumerable`1.GetEnumerator()

       at Microsoft.Mashup.Engine1.Runtime.RetryQuery.RetryEnumerable.GetEnumerator()

       at Microsoft.Mashup.Engine1.Language.Query.QueryTableValue.GetEnumerator()

       at Microsoft.Mashup.Engine1.Runtime.DelegatingTableValue.GetEnumerator()

       at Microsoft.Mashup.Engine1.Runtime.DelegatingTableValue.GetEnumerator()

       at Microsoft.Mashup.Engine1.Runtime.TableValue.Microsoft.Mashup.Engine.Interface.ITableValue.GetEnumerator()

       at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.SerializeRows(Int32 count)

       at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.<>c__DisplayClass5.<RunStub>b__3()

       at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)

       --- End of inner exception stack trace ---

       at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass7.<TryReportException>b__6()

       at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action)

       at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)

       at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)

       at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.RunStub(IEngineHost engineHost, IMessageChannel channel, Func`1 getPreviewValueSource)

       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClassb.<OnBeginGetPreviewValueSource>b__9(EvaluationResult2`1 result)

       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass1e`1.<OnBeginGetResult>b__1b()

       at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)

       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResultT

       at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.<>c__DisplayClassa`1.<AddHandler>b__8(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)

       at Microsoft.Mashup.Evaluator.MessageHandlers.<>c__DisplayClassa`1.<AddHandler>b__8(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.EvaluationHost.Run()

       at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)

       at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass2.<CreateThreadStart>b__0(Object o)

       at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)

       at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass2.<CreateThreadStart>b__1(Object o)

       at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)

       at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)

       --- End of inner exception stack trace ---

       at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)

       at Microsoft.Mashup.Evaluator.RemoteEvaluationContainerFactory.Container.OnException(IMessageChannel channel, ExceptionMessage message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.<>c__DisplayClassa`1.<AddHandler>b__8(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

       at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitForT

       at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)

       at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Evaluator.Interface.NotifyingPreviewValueSource.get_SmallValue()

       at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult21 result, Func1 getStaleSince, Func`1 getSampled)

    Stack Trace Message:

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Invocation Stack Trace:

       at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()

       at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)

       at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Exception exception)

       at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, WindowsHost windowsHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)

       at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()

       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)

       at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.HandleException(Exception e)

       at Microsoft.Mashup.Client.ClientShared.WebDialogs.WebDialogBase`1.DelayedInitializationExceptionHandler.HandleException(Exception e)

       at Microsoft.Mashup.Client.ClientShared.WebDialogs.WebDialog.<>c__DisplayClassc.<OnAjaxException>b__b()

       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClassf.<Post>b__e(Object null)

       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

       at System.Delegate.DynamicInvokeImpl(Object[] args)

       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(Form form)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.RunDialog(Form form)

       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

       at Microsoft.Mashup.Client.ClientShared.Win32.DialogWindowBase.ShowModal(IWindowHandle windowHandle)

       at Microsoft.Mashup.Client.ClientShared.WebDialogs.WebDialog.<>n__FabricatedMethod8(IWindowHandle )

       at Microsoft.Mashup.Client.ClientShared.WebDialogs.WebDialog.<>c__DisplayClass6.<ShowModal>b__5()

       at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowModalT

       at Microsoft.Mashup.Client.ClientShared.WebDialogs.WebDialog.ShowModal(IWindowHandle owner)

       at Microsoft.Mashup.Client.ClientShared.Ux.FloatingDialog.NavigatorFloatingDialog.ShowOkCancel(IWindowHandle owner, WindowsHost windowsHost, Query query, ITelemetryService telemetryService, Boolean multiSelectionEnabledByDefault)

       at Microsoft.Mashup.Client.ClientShared.EditorDialogBaseDataImporter.ShowNavigator(Query query)

       at Microsoft.Mashup.Client.ClientShared.DataImporter.ShowNavigatorOnSourceQuery(Query query, IEnumerable`1& importedQueries)

       at Microsoft.Mashup.Client.ClientShared.DataImporter.ImportNavigationSource(Query query)

       at Microsoft.Mashup.Client.ClientShared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)

       at Microsoft.Mashup.Client.ClientShared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)

       at Microsoft.Mashup.Client.ClientShared.DataImporter.<>c__DisplayClass1b.<OnQuerySettingsResolved>b__18()

       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

       at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClassf.<Post>b__e(Object null)

       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

       at System.Delegate.DynamicInvokeImpl(Object[] args)

       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(Form form)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.RunDialog(Form form)

       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

       at Microsoft.Mashup.Client.ClientShared.Ux.HtmlForm.<>n__FabricatedMethod8(IWindowHandle )

       at Microsoft.Mashup.Client.ClientShared.Ux.HtmlForm.<>c__DisplayClass6.<ShowModal>b__5()

       at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowModalT

       at Microsoft.Mashup.Client.ClientShared.Ux.HtmlForm.ShowModal(IWindowHandle owner)

       at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.ShowModalQueriesEditorWindow(IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, QueriesEditorParameters queriesEditorParameters, Queries queries, IUndoScope undoScope)

       at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.<>c__DisplayClass5.<ShowModalQueriesEditorWindow>b__1(IUndoScope undoScope)

       at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.<>c__DisplayClass6.<>c__DisplayClass8.<InvokeUndoableActionWithDeferredStorage>b__5(IWorkbookStorageDeferrer deferrer)

       at Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.InvokeDeferredStorageAction(IWorkbook workbook, Action`1 action)

       at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.<>c__DisplayClass6.<InvokeUndoableActionWithDeferredStorage>b__4(IUndoScope scope)

       at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.<>c__DisplayClass2.<InvokeUndoableAction>b__0()

       at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)

       at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.InvokeUndoableAction(IWorkbook workbook, UndoableActionType actionType, Action`1 action)

       at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.InvokeUndoableActionWithDeferredStorage(IWorkbook workbook, UndoableActionType actionType, Action`1 action)

       at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.<>c__DisplayClass5.<ShowModalQueriesEditorWindow>b__0()

       at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.NotifyGetDataPresence(IWorkbook workbook, Action action)

       at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.ShowModalQueriesEditorWindow(IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, QueriesEditorParameters queriesEditorParameters, Queries queries)

       at Microsoft.Mashup.Client.Excel.DialogManager.TryShowModalEditor(IWindowHandle ownerWindow, IWorkbook workbook, Query query, Boolean isNewQuery, Boolean navigatorExpanded)

       at Microsoft.Mashup.Client.Excel.ExcelRibbonHandler.<>c__DisplayClass67.<OnShowEditorAction>b__66(IWorkbook workbook)

       at Microsoft.Mashup.Client.Excel.Shim.IWindowContextExtensions.TryInvokeOnParentWorkbook(IWindowContext windowContext, Action`1 action)

       at Microsoft.Mashup.Client.Excel.ExcelRibbonHandler.OnShowEditorAction(IWindowContext windowContext)

       at Microsoft.Mashup.Client.Excel.NativeRibbonHandler.<>c__DisplayClass1.<OnRibbonButtonAction>b__0()

       at Microsoft.Mashup.Client.Excel.NativeRibbonHandler.<>c__DisplayClass22.<InvokeRibbonActionAndHandleExceptions>b__21()

       at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

       at Microsoft.Mashup.Client.Excel.NativeRibbonHandler.InvokeRibbonActionAndHandleExceptions(Action action)

       at Microsoft.Mashup.Client.Excel.NativeRibbonHandler.OnRibbonButtonAction(IntPtr uiFrame, Int32 buttonID)

       at Microsoft.Mashup.Client.Excel.NativeExcelConnectorBase.<>c__DisplayClass6a.<OnRibbonButtonActionCallback>b__69()

       at Microsoft.Mashup.Client.Excel.ExcelCallbackManager.InvokeAndReturnHResult(Action action)

       at Microsoft.Mashup.Client.Excel.NativeExcelConnectorBase.OnRibbonButtonActionCallback(IntPtr uiFrame, Int32 buttonID)

    Supports Premium Content:

    False

    Formulas:

    section Section1;

    shared #"NavigatorBase_91d0a2b1-c164-4a77-8869-8d7a95e95d56" = let

        Source = Odbc.DataSource("dsn=Skansen_New", [HierarchicalNavigation=true])

    in

        Source;

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-05-06T11:45:23+00:00

    Hi Tim,

    Have you tried my info above? Can you insert your data from Sage Line 50 normally now? Please share with me your recent progress.

    Thanks,

    Neo

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-05-04T17:34:44+00:00

    Hi Tim,

    Sorry for the delay reply.

    To check whether this issue is related to Add-ins, please Start your Office in safe mode to see the outcome. If this issue doesn't happen in safe mode, please click File>Options>Add-ins>To disable Add-ins one by one to check which one caused this case.

    If this issue still exists in safe mode, to check if this issue is related to Sage Line 50, please create some new data to see if you can get that date normally via Power Query.

    Please have a try and share with me your result.

    Thanks,

    Neo

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2018-05-01T14:20:24+00:00
    1. I open power query go to new source and choose the ODBC Data source for the sage data I have set up.  This lists the tables, I pick one, the system thinks then gives me the error
    2. Windows 8.1 - 6.3.9600
    3. I have changed nothing, I have been unable to get this to work since I started trying a week ago
    4. Yes - I can link to an excel spreadsheet and the data is pulled in

    I am able to pull data through Microsoft Query using the same data sources but want to use the advanced functionality in Power Query to transform the data.

    I am using the Sage Line 50 v24 ODBC Driver version 24.01.141.00

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2018-05-01T13:05:21+00:00

    Hi Tim,

    Regarding "Attempted to read or write protected memory. This is often an indication that other memory is corrupt", please make sure your resources are properly accessible.

    To troubleshoot this issue, please also share with me related info as below:

    1. The detailed steps about how do you connect your data via Excel.
    2. Version number of your OS(Win+R>type CMD>OK).
    3. What have you changed before this issue happens?
    4. Can you insert data normally from other sources?

    Thanks,

    Neo

    Was this answer helpful?

    0 comments No comments