Invalid attribute value CF_SQL_STRING Error when submitting a Form

Explorer ,
Feb 05, 2019 Feb 05, 2019

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>

Views

1.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Advocate , Feb 05, 2019 Feb 05, 2019
Use CF_SQL_VARCHAR.

Likes

Translate

Translate
Advocate ,
Feb 05, 2019 Feb 05, 2019

Copy link to clipboard

Copied

Use CF_SQL_VARCHAR.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2019 Feb 06, 2019

Copy link to clipboard

Copied

Thanks it works perfectly fine now. So should I replace all the CF_SQL_STRING with CF_SQL_VARCHAR 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 06, 2019 Feb 06, 2019

Copy link to clipboard

Copied

Yes, you need to replace all CF_SQL_STRING occurrences, because it is not a valid option.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2019 Feb 06, 2019

Copy link to clipboard

Copied

Thanks , appreciate your help. I will do.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 06, 2019 Feb 06, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2019 Feb 06, 2019

Copy link to clipboard

Copied

Thank you, I have replaced all occurrences  of CF_SQL_STRING with VARCHAR

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 20, 2019 Dec 20, 2019

Copy link to clipboard

Copied

LATEST

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines