Highlighted

ColdFusion 2016 and Stored Procedure -dbvarname

Participant ,
Nov 26, 2016

Copy link to clipboard

Copied

There was discussion that ColdFusion was going to deprecate dbvarname with cf2016

I have code like this that works in CF2005 but I am migrating to CF2016 and am having issues with the Stored Procedure -dbvarname

This no longer works

<cfstoredproc datasource="#live#" procedure="ABX1265">

    <cfprocresult name = "resultXML" resultset = "1" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@COMPANY"   type="in" value="#companyCode#" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@ENVIRONMENT" type="in" value="#arguments.environment#">

</cfstoredproc>

  <cfquery name="out2" datasource="LIVE#companyCode#" >

#resultXML#

</cfquery>

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

@Weezerboy, I have to assume that, by CF2005 and ColdFusion Enterprise 12.0, you mean Coldfusion 5 and ColdFusion 2016 Enterprise. Yes, dbVarname was deprecated after Coldfusion 5. But it was apparently brought back to life in ColdFusion 11, amid some confusion.

See for example ColdFusion 11 and dbvarname attribute

In any case, what do your log files say? Do you get any error messages? What brand of database management do you use?

Have you tested whether the values of resultXML and LIVE#companyCode# are what you expect? You could debug your code as follows:

<cfstoredproc datasource="#live#" procedure="ABX1265">

    <cfprocresult name = "resultXML" resultset = "1" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@COMPANY"   type="in" value="#companyCode#" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@ENVIRONMENT" type="in" value="#arguments.environment#">

</cfstoredproc>

  <cfoutput>

datasource: LIVE#companyCode#<br>

resultXML: #resultXML#

</cfoutput>

Views

1.0K

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

ColdFusion 2016 and Stored Procedure -dbvarname

Participant ,
Nov 26, 2016

Copy link to clipboard

Copied

There was discussion that ColdFusion was going to deprecate dbvarname with cf2016

I have code like this that works in CF2005 but I am migrating to CF2016 and am having issues with the Stored Procedure -dbvarname

This no longer works

<cfstoredproc datasource="#live#" procedure="ABX1265">

    <cfprocresult name = "resultXML" resultset = "1" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@COMPANY"   type="in" value="#companyCode#" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@ENVIRONMENT" type="in" value="#arguments.environment#">

</cfstoredproc>

  <cfquery name="out2" datasource="LIVE#companyCode#" >

#resultXML#

</cfquery>

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

@Weezerboy, I have to assume that, by CF2005 and ColdFusion Enterprise 12.0, you mean Coldfusion 5 and ColdFusion 2016 Enterprise. Yes, dbVarname was deprecated after Coldfusion 5. But it was apparently brought back to life in ColdFusion 11, amid some confusion.

See for example ColdFusion 11 and dbvarname attribute

In any case, what do your log files say? Do you get any error messages? What brand of database management do you use?

Have you tested whether the values of resultXML and LIVE#companyCode# are what you expect? You could debug your code as follows:

<cfstoredproc datasource="#live#" procedure="ABX1265">

    <cfprocresult name = "resultXML" resultset = "1" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@COMPANY"   type="in" value="#companyCode#" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@ENVIRONMENT" type="in" value="#arguments.environment#">

</cfstoredproc>

  <cfoutput>

datasource: LIVE#companyCode#<br>

resultXML: #resultXML#

</cfoutput>

Views

1.0K

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
Nov 26, 2016 0
Adobe Employee ,
Dec 23, 2016

Copy link to clipboard

Copied

Hi Weezerboy,

Could you please tell me the update level of ColdFusion.

Thank You,

Abhishek

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
Reply
Loading...
Dec 23, 2016 0
Participant ,
Dec 23, 2016

Copy link to clipboard

Copied

ColdFusion Enterprise 12.0

Patrick Hutchinson | Office: 804-370-6873

<mailto:patrick.hutchinson2@gmail.com> patrick.hutchinson2@gmail.com | <https://www.linkedin.com/profile/preview?locale=en_US&trk=prof-0-sb-preview-primary-button> LinkedIn

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
Reply
Loading...
Dec 23, 2016 0
Adobe Community Professional ,
Dec 26, 2016

Copy link to clipboard

Copied

@Weezerboy, I have to assume that, by CF2005 and ColdFusion Enterprise 12.0, you mean Coldfusion 5 and ColdFusion 2016 Enterprise. Yes, dbVarname was deprecated after Coldfusion 5. But it was apparently brought back to life in ColdFusion 11, amid some confusion.

See for example ColdFusion 11 and dbvarname attribute

In any case, what do your log files say? Do you get any error messages? What brand of database management do you use?

Have you tested whether the values of resultXML and LIVE#companyCode# are what you expect? You could debug your code as follows:

<cfstoredproc datasource="#live#" procedure="ABX1265">

    <cfprocresult name = "resultXML" resultset = "1" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@COMPANY"   type="in" value="#companyCode#" >

    <cfprocparam cfsqltype="cf_sql_char" dbvarname="@ENVIRONMENT" type="in" value="#arguments.environment#">

</cfstoredproc>

  <cfoutput>

datasource: LIVE#companyCode#<br>

resultXML: #resultXML#

</cfoutput>

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
Reply
Loading...
Dec 26, 2016 0