Copy link to clipboard
Copied
Hello,
We using Cold fusion 2018 on Windows Server 2016.
When I am trying to submit a Form to call another page within the application I get an error which states "
Error Occurred While Processing Request. Please try again.
Invalid attribute value CF_SQL_STRING for attribute CFSQLType
The
error occurred on line 223
"
I am not sure why the string value is throwing up an error. Please advise
The code snippet used is shown below,
<cfoutput>
<CFSTOREDPROC PROCEDURE="dbo.PKG_CFSTOREDPROC.proc_print_calc" datasource="#datasource#" username=#Session.UserName# password=#Session.password#>
<CFPROCPARAM TYPE="In" CFSQLTYPE="CF_SQL_STRING" VALUE=#ipn#>
<CFPROCRESULT NAME="RefEquation">
</CFSTOREDPROC>
</cfoutput>
Use CF_SQL_VARCHAR.
Copy link to clipboard
Copied
Use CF_SQL_VARCHAR.
Copy link to clipboard
Copied
Thanks it works perfectly fine now. So should I replace all the CF_SQL_STRING with CF_SQL_VARCHAR
Copy link to clipboard
Copied
Yes, you need to replace all CF_SQL_STRING occurrences, because it is not a valid option.
Copy link to clipboard
Copied
Thanks , appreciate your help. I will do.
Copy link to clipboard
Copied
Yes, prior to CF2018, invalid values for CFSQLTYPE were ignored and automatically treated as "CF_SQL_VARCHAR". Starting with CF2018, an invalid CFSQLTYPE value will now throw an error.
Also, FYI - you no longer have to use the "CF_SQL_" prefix to the data types - you can just use "VARCHAR" or "DATE" or "INTEGER" or the like.
Copy link to clipboard
Copied
Thank you, I have replaced all occurrences of CF_SQL_STRING with VARCHAR
Copy link to clipboard
Copied
Why is this not documented here https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-p-q/cfqueryparam.html?
As much as I'd like to get rid of "cf_sql_" prefix I'm a bit uncomfortable making the switch when Adobe does not have this documented anywhere?