philipptx
Goto Top

Verbindung mit Excel zum SQL Server

Hallo zusammen,

wir würden gerne via Excel eine Verbindung zum SQL Server aufbauen, damit wir dort direkt die Daten abrufen können.
Wir haben uns mit dem Server verbunden, nun sehen wir in der Excel Vorschau die Daten welche wir abrufen möchten.

Wenn wir dann die Daten abrufen erhalten wir von Excel ein Fehler, den ich leider nicht identifizieren kann.

Feedback Type:
Frown (Error)

Error Message:
Unbekannter Fehler (Ausnahme von HRESULT: 0x80004005 (E_FAIL))

Stack Trace:
   bei System.StubHelpers.MngdSafeArrayMarshaler.ConvertSpaceToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome)
   bei Microsoft.Mashup.Client.Excel.NativeExcelFunctionsC2R.Microsoft.Mashup.Client.Excel.INativeExcelFunctions.LoadQuery(IntPtr workbookPointer, MarshalledConnectionInfo connectionInfo, Boolean showDialog, NativeFillObjectType defaultFillObjectType, Boolean defaultLoadToDataModel, CommitQueryChangesCallback commitCallback, DiscardQueryChangesCallback discardCallback)
   bei Microsoft.Mashup.Client.Excel.Fill.PassiveFillManager.NotifyExcelOnQueryLoading(IWorkbookIdentity workbookIdentity, IEnumerable`1 addedQueries, Boolean promptForLoadOptions, FillObjectType defaultsFillObjectType, Boolean defaultAddToDataModel, CommitQueryChangesCallback commitCallback, DiscardQueryChangesCallback discardCallback)
   bei Microsoft.Mashup.Client.Excel.Fill.PassiveFillManager.<>c__DisplayClass6.<TryInitializeLoadFlow>b__2()
   bei Microsoft.Mashup.Client.Excel.Shim.NativeRefreshCachingServices.InvokeWithRefreshSession(IWorkbook workbook, Action action)
   bei Microsoft.Mashup.Client.Excel.Fill.PassiveFillManager.TryInitializeLoadFlow(IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, Queries queries, QueriesDiffs queriesDiffs, InitialFillTargets defaultFillTargets, QueriesCommitPoint queriesCommitPoint, IQueryServices queryServices, Action onFillStarted, Boolean promptForLoadOptions, Boolean allowExistingWorksheet, Boolean showCancelConfirmation)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass16.<OnImportSuccess>b__11(IUndoScope undoScope)
   bei Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.<>c__DisplayClass2.<InvokeUndoableAction>b__0()
   bei Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.Microsoft.Mashup.Client.Excel.Shim.IDeferredStorageInvoker.InvokeDeferredStorageAction(IWorkbook workbook, Action action)
  bei Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)
   bei Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.InvokeUndoableAction(IWorkbook workbook, UndoableActionType actionType, Action`1 action)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.OnImportSuccess(IEnumerable`1 importedQueries, DataImportDestination destination)
   bei Microsoft.Mashup.Client.UI.Shared.DataImporter.ProcessImportedQueries(IEnumerable`1 importedQueries, DataImportDestination destination)
   bei Microsoft.Mashup.Client.UI.Shared.DataImporter.ImportNavigationSource(Query query)
   bei Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
   bei Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass20.<GetPreviewResult>b__1f()
   bei Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.Microsoft.Mashup.Client.Excel.Shim.IDeferredStorageInvoker.InvokeDeferredStorageAction(IWorkbook workbook, Action action)
   bei Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass20.<GetPreviewResult>b__1e(IWorkbook workbook)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClassa.<>c__DisplayClassc.<NotifyGetDataPresence>b__9()
   bei Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.NotifyGetDataPresence(IWorkbook workbook, Action action)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClassa.<NotifyGetDataPresence>b__8(IWorkbook workbook)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClassf.<InvokeOnWorkbook>b__e(IWorkbook workbook, IWindowContext windowContext)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook[T](Func`3 action, T defaultValue)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook(Action`1 action)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.NotifyGetDataPresence(Action`1 action)
   bei Microsoft.Mashup.Client.Excel.ExcelDataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
   bei Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass20.<OnQuerySettingsResolved>b__1d()
   bei Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Stack Trace Message:
Unbekannter Fehler (Ausnahme von HRESULT: 0x80004005 (E_FAIL))

Invocation Stack Trace:
   bei Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
   bei Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
   bei Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception)
   bei Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
   bei Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
   bei Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
   bei Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
   bei Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   bei Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClassf.<Post>b__e(Object null)
   bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
   bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
   bei System.Delegate.DynamicInvokeImpl(Object args)
   bei System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   bei System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   bei System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Error Code:
-2147467259 (0x80004005)

Supports Premium Content:
True

Formulas:


section Section1;

shared vwSynAuswertungBelege = let
    Quelle = Sql.Database("192.168.0.15:1435", "TxLogistik"),  
    dbo_vwSynAuswertungBelege = Quelle{[Schema="dbo",Item="vwSynAuswertungBelege"]}[Data]  
in
    dbo_vwSynAuswertungBelege;

Habt ihr dazu eine Idee?

Ich bin über jede Hilfe dankbar!

Viele Grüße
Philipp

Content-Key: 1200141644

Url: https://administrator.de/contentid/1200141644

Printed on: April 23, 2024 at 06:04 o'clock

Member: ukulele-7
ukulele-7 Aug 27, 2021 at 07:53:26 (UTC)
Goto Top
Zitat von @PhilippTX:

Habt ihr dazu eine Idee?
Nein nicht wirklich. Was hast du denn schon versucht? Kannst du ein ganz einfaches Query a la SELECT * FROM tabelle gegen die DB ausführen? Hat der Benutzer ausreichend Rechte? Welche Excel und welches SQL Version?