Skip to main content
Known Participant
February 5, 2019
解決済み

Invalid attribute value CF_SQL_STRING Error when submitting a Form

  • February 5, 2019
  • 返信数 2.
  • 4127 ビュー

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>

    このトピックへの返信は締め切られました。
    解決に役立った回答 EddieLotter

    Use CF_SQL_VARCHAR.

    返信数 2

    iq11作成者
    Known Participant
    February 6, 2019

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

    Carl Von Stetten
    Legend
    February 6, 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.

    Participant
    December 20, 2019

    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?

    EddieLotter
    EddieLotter解決!
    Inspiring
    February 5, 2019

    Use CF_SQL_VARCHAR.