我们正在升级到 ColdFusion 2016 以使用 SqlServer 2017。我们当前的版本(ColdFusion 10/SqlServer 2008)运行良好。
我们正在开发环境中测试我们的代码以发现它的任何问题,我不断遇到同样的错误,这有点神秘。我不确定它是 ColdFusion 2016 和 SqlServer2008 的组合,还是只是从 CF10 升级到 CF2016。它涉及 CFStoredProc 命令。
代码是:
<CFSTOREDPROC DATASOURCE="MedScribeSQL" PROCEDURE="dbo.usp_ChartRestrictionCheck">
<CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="Org" TYPE="In" VALUE="#Cookie.Org#">
<CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="Chartnum" TYPE="In" VALUE="#TRIM(Variables.PTChartnum)#">
<CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="Username" TYPE="In" VALUE="#Cookie.Username#">
<CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="ReturnChart" TYPE="Out" VARIABLE="RestrictionReturnChart">
<CFPROCPARAM CFSQLTYPE="CF_SQL_DATE" DBVARNAME="ReturnExpiryDate" TYPE="Out" VARIABLE="RestrictionReturnExpiryDate">
</CFSTOREDPROC>
当页面运行时,我收到以下错误:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '='.
The error occurred in D:/Websites/AcumenEHR/health/CustomTags/checkMRAccess.cfm: line 78
Called from D:/Websites/AcumenEHR/health/HCNHeader.cfm: line 127
Called from D:/Websites/AcumenEHR/health/HCNHeader.cfm: line 1
Called from D:/Websites/AcumenEHR/health/records/Visit_summary/hpsummary2.cfm: line 23
Called from D:/Websites/AcumenEHR/health/CustomTags/checkMRAccess.cfm: line 78
Called from D:/Websites/AcumenEHR/health/HCNHeader.cfm: line 127
Called from D:/Websites/AcumenEHR/health/HCNHeader.cfm: line 1
Called from D:/Websites/AcumenEHR/health/records/Visit_summary/hpsummary2.cfm: line 23
76 : <CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="Username" TYPE="In" VALUE="#Cookie.Username#">
77 : <CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="ReturnChart" TYPE="Out" VARIABLE="RestrictionReturnChart">
78 : <CFPROCPARAM CFSQLTYPE="CF_SQL_DATE" DBVARNAME="ReturnExpiryDate" TYPE="Out" VARIABLE="RestrictionReturnExpiryDate">
79 : </CFSTOREDPROC>
80 :
我在文档中找不到任何关于为什么会引发错误的信息。我想知道是否有人对此有过类似的经历,并且可以指出我的修复方向,因为同样的错误发生在许多地方。
谢谢