Unable to Access Database

thequizman

New Member
Joined
Nov 5, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi everyone, I have a strange question, that none of my "experts" have been able to solve.
I am trying to get data from a SQL server Database, and when I first attempted this I managed to get to the tables window. However, I was then asked to repeat my login and password, and before I realised it had defaulted to my Windows credentials, I clicked OK. I was then unable to access anything, as there was a logon/password error.
I closed Excel and started again, but now can't get past the first hurdle. When I select te SQL Database and enter the server name and click OK, I get this error :-
1604596625745.png


The details show this :-
Code:
Feedback Type:
Frown (Error)

Error Message:
Error

Stack Trace:
Microsoft.Mashup.Evaluator.Interface.ErrorException: The user name or password is incorrect.
---> System.Security.SecurityException: The user name or password is incorrect.
---> System.Security.SecurityException: The user name or password is incorrect.

   at System.Security.Principal.WindowsIdentity.KerbS4ULogon(String upn, SafeAccessTokenHandle& safeTokenHandle)
   at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName, String type)
   at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName)
   at Microsoft.Mashup.Engine1.Runtime.CredentialExtensions.GetImpersonationWrapper(String username, String password, IEngineHost host, IResource resource)
   at Microsoft.Mashup.Engine1.Runtime.CredentialExtensions.GetImpersonationWrapper(IResourceCredential credential, IEngineHost host, IResource resource)
   at Microsoft.Mashup.Engine1.Library.Common.SqlResourceCredentialDispatcher.GetImpersonationWrapper(WindowsCredential credential)
   at Microsoft.Mashup.Engine1.Library.Common.SqlResourceCredentialDispatcher.Apply(WindowsCredential credential)
   at Microsoft.Mashup.Engine1.Library.Common.ResourceCredentialDispatcher.Apply(IResourceCredential credential)
   at Microsoft.Mashup.Engine1.Library.Common.SqlResourceCredentialDispatcher.Apply(ResourceCredentialCollection credentials)
   at Microsoft.Mashup.Engine1.Library.Common.ConnectionStringResourceCredentialDispatcher.ConstructConnectionString(String server, String database, ResourceCredentialCollection credentials, Nullable`1 connectionTimeout)
   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.CreateConnectionInfo()
   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.get_ConnectionInfo()
   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.LoadCachedServerMetadata()
   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.CreateConnection()
   at Microsoft.Mashup.Engine1.Library.Common.DbValueBuilder.ConnectionReader..ctor(DbEnvironment environment, Func`2 readerWrapper)
   at Microsoft.Mashup.Engine1.Library.Common.NativeQueryTableValue.Initialize(Boolean selectTopForTableSchema)
   at Microsoft.Mashup.Engine1.Library.Common.NativeQueryTableValue.EnsureInitialized(Boolean selectTopForTableSchema)
   at Microsoft.Mashup.Engine1.Library.Common.NativeQueryTableValue.GetEnumerator()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Mashup.Engine1.Library.Sql.SqlModule.DatabasesFunctionValue.DatabasesTableValue.GetDatabases()
   at Microsoft.Mashup.Engine1.Library.Sql.SqlModule.DatabasesFunctionValue.DatabasesTableValue.GetEnumerator()
   at Microsoft.Mashup.Engine1.Language.Query.SkipTakeEnumerable.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__DisplayClass0_0.<RunStub>b__0()
   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__DisplayClass11_0.<TryReportException>b__1()
   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__DisplayClass9_0.<OnBeginGetPreviewValueSource>b__0(EvaluationResult2`1 result)
   at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass12_1`1.<OnBeginGetResult>b__0()
   at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
   at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
   at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
   at Microsoft.Mashup.Evaluator.MessageHandlers.<>c__DisplayClass3_0`1.<AddHandler>b__0(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__DisplayClass3_0`1.<AddHandler>b__0(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__DisplayClass3_0.<CreateThreadStart>b__0(Object o)
   at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
   at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass3_0.<CreateThreadStart>b__1(Object o)
   at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
   at Microsoft.Mashup.Container.BootstrapAppDomainManager.Execute(String[] argv)
   --- 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__DisplayClass3_0`1.<AddHandler>b__0(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.WaitFor[T](IMessageChannel channel)
   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(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

Stack Trace Message:
Error

Invocation Stack Trace:
   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
   at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
   at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
   at Microsoft.Mashup.Client.UI.Windows.UIHost.RaiseErrorDialog(IWindowHandle activeWindow, FeedbackPackageInfo feedbackPackageInfo, Exception e, LocalizedString dialogTitle, LocalizedString dialogMessage, Boolean useGDICapture)
   at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
   at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass62_0.<GetPreviewResult>b__1()
   at Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.Microsoft.Mashup.Client.Excel.Shim.IDeferredStorageInvoker.InvokeDeferredStorageAction(IWorkbook workbook, Action action)
   at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass62_0.<GetPreviewResult>b__0(IWorkbook workbook)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass55_1.<NotifyGetDataPresence>b__1()
   at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.NotifyGetDataPresence(IWorkbook workbook, Action action)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass55_0.<NotifyGetDataPresence>b__0(IWorkbook workbook)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass56_0.<InvokeOnWorkbook>b__0(IWorkbook workbook, IWindowContext windowContext)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook[T](Func`3 action, T defaultValue)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook(Action`1 action)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.NotifyGetDataPresence(Action`1 action)
   at Microsoft.Mashup.Client.Excel.ExcelDataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass78_1.<OnQuerySettingsResolved>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3_0.<Post>b__0(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)


Supports Premium Content:
True

ExceptionResultMessage:
The user name or password is incorrect.


Formulas:


section Section1;

shared Query1 = let
    Source = Sql.Databases("PRI-V-LDSQL01")
in
    Source;

Can anyone offer any advice please and bear in mind I am a novice!

many thanks
 
Last edited by a moderator:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top