I'm experiencing the following sqlexception when running my dashboard in preview mode or published to the server.
I've checked all three datasources and they can connect successfully to my sql backend, I have also checked in Query View using the Execute button that each datasource can retrieve live data with no issue and also update the widgets. However, when running in preview mode I get the following exception. The dashboard was running seamlessly.
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'AS'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at Syncfusion.Dashboard.Base.Data.SqlQueryBuilder.ExecuteScalarQuery(String query, String connectionString, ConnectionProviderType type)
at Syncfusion.Dashboard.Base.Data.ServerDataProvider.GetRawDataRowCount(List`1 originalSchemaInfoCollection, String userName, List`1 tableRelation)
at Syncfusion.Dashboard.Base.Engine.RelationalEngine.GetRawDataCount(String userName)
at Syncfusion.DashboardService.DashboardService.<LoadDashboardAction>b__133_1(DataSource dataSource)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Syncfusion.DashboardService.DashboardService.LoadDashboardAction(Dictionary`2 dictionary, DashboardServiceArguments arguments, List`1 viewerActions, DashboardDataProcessor dataProcessor)
at Syncfusion.DashboardService.DashboardService.InitializeControls(DashboardServiceArguments arguments)
at SyncInvokeInitializeControls(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
ClientConnectionId:970d88dd-546b-4731-a196-eb07c3b7e622
Error Number:156,State:1,Class:15
ClientConnectionId before routing:f9ee215f-6cff-4fd6-91eb-657f2e65c50d
Routing Destination:e55e911cad55.tr29.westeurope1-a.worker.database.windows.net,11192