Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Invalid attribute value CF_SQL_STRING Error when submitting a Form

Explorer ,
Feb 05, 2019 Feb 05, 2019

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>

3.8K
Translate
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.

Translate
Advocate ,
Feb 05, 2019 Feb 05, 2019

Use CF_SQL_VARCHAR.

Translate
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

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

Translate
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

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

Translate
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

Thanks , appreciate your help. I will do.

Translate
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

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.

Translate
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

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

Translate
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
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?

Translate
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
Resources