Hi
Upgraded last Friday night to Kinetic 2022.1, and most things are great - especially the ones that people properly tested and allowed us to fix before going live… .
This one is a bit weird. It’s a dashboard, with a tracker view filtering on a date column. On the deployed dashboard, if I select a date and refresh it doesn’t produce an error - but it also doesn’t work. In the Dashboard screen itself with developer mode turned on, it shows this error:
Reviewing the server side error:
Ice.Common.EpicorServerException: Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
---> System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
at System.Data.SqlClient.SqlConnection.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)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Ice.Blaq.Execution.QueryExecutor.ExecuteAndFillDataSetInternal(IDbConnection dbconn, QueryInfo queryInfo, DataSet resultDataset, Action`2 perfLogger, ISqlDumper sqlDumper) in C:\_releases\ICE\ICE4.2.100.16\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 112
at Ice.Blaq.Execution.QueryExecutor.<>c__DisplayClass3_0.<ExecuteAndFillDataSet>b__0(IDbConnection dbconn) in C:\_releases\ICE\ICE4.2.100.16\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutor.cs:line 40
at Ice.Blaq.Execution.QueryExecutionHelper.DoJobWithObject[TObj](Func`2 theJob) in C:\_releases\ICE\ICE4.2.100.16\Source\Server\Internal\Lib\Ice.Lib.Blaq\Execution\QueryExecutionHelper.cs:line 203
ClientConnectionId:f454269d-19df-49f2-8d27-3d6abdb3209d
Error Number:319,State:1,Class:15
--- End of inner exception stack trace ---
The BAQ query doesn’t even include a ‘with’ clause - ignoring the warning that what is displayed might not actually be what is executed, but it’s a pretty simple query.
/*
* Disclaimer!!!
* This is not a real query being executed, but a simplified version for general vision.
* Executing it with any other tool may produce a different result.
*/select
[PartLot].[FirstRefDate] as [PartLot_FirstRefDate],
(Ice.StringTime(PartTran.SysTime, 'HH:MM:SS')) as [Calculated_LotCreateTime],
(case Part.MtlAnalysisCode
when 'CU0' then 'Culture - Serac'
when 'CU1' then 'Culture - Bulk Fill'
when 'UF0' then 'UF'
when 'FR0' then 'Fresh'
else 'Unknown Dept'
end) as [Calculated_Dept],
[PartLot].[PartNum] as [PartLot_PartNum],
[PartLot].[LotNum] as [PartLot_LotNum],
[PartLot].[ExpirationDate] as [PartLot_ExpirationDate],
[PartLot].[SampleID_c] as [PartLot_SampleID_c],
[UD39].[SendToLab_c] as [UD39_SendToLab_c],
[JobHead].[ReqDueDate] as [JobHead_ReqDueDate],
((case when JobHead.ReqDueDate is null then PartLot.FirstRefDate else JobHead.ReqDueDate end)) as [Calculated_JobDate],
[UD39].[ViscAtPack_c] as [UD39_ViscAtPack_c],
[UD39].[ViscAt24Hr_c] as [UD39_ViscAt24Hr_c],
[UD39].[Bostwick_c] as [UD39_Bostwick_c],
[UD39].[pHResultAtPack_c] as [UD39_pHResultAtPack_c],
[UD39].[pHResult24Hr_c] as [UD39_pHResult24Hr_c],
[UD39].[FatAtPack_c] as [UD39_FatAtPack_c],
[UD39].[ResultTS_c] as [UD39_ResultTS_c]
from Erp.PartLot as PartLot
left outer join Ice.UD39 as UD39 on
PartLot.SampleID_c = UD39.SampleID_c
PartLot.Company = UD39.Company
inner join Erp.Part as Part on
PartLot.Company = Part.Company
and PartLot.PartNum = Part.PartNum
and ( Part.AnalysisCode = 'F/P' )
left outer join Erp.PartTran as PartTran on
PartLot.Company = PartTran.Company
and PartLot.PartNum = PartTran.PartNum
and PartLot.LotNum = PartTran.LotNum
and ( PartTran.TranType = 'MFG-STK' )
left outer join Erp.JobHead as JobHead on
PartTran.Company = JobHead.Company
and PartTran.JobNum = JobHead.JobNum
where (PartLot.FirstRefDate >= dateadd (day, -30, Constants.Today) and not PartLot.PartNum in ('COD000KA', 'NEW000KA'))
order by PartLot.FirstRefDate, PartLot.PartNum
Anybody else seen anything similar in upgrades? I’d love a pointer, because nothing obvious is jumping out at me right now. I even picked up on the “change tracking context” reference and disabled the Data Directive that does Change Log for testing, no change.
Many Thanks
Mark