tracker issue : CF-3973457

select a category, or use search below
(searches all categories and all time range)
Title:

cfprocparam out parameters are no longer defined after update 5.

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): burak toker / burak toker (burak toker)

Created: 04/21/2015

Components: Database

Versions: 11.0

Failure Type: Data Loss

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: ALL / Windows 7 SP1 64-bit

Vote Count: 0

Duplicate ID:	CF-3971083

Problem Description: While using cfstoredproc with out parameter, the variable literally disappears. 

Steps to Reproduce: On SQL Server 2008 :

1. create table:
CREATE TABLE [dbo].[UserTest](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[EmailAddress] [varchar](250) NULL,
 CONSTRAINT [PK_dbo.UserTest] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]

GO


2. Create stored procedure :

CREATE PROCEDURE [dbo].[PROC_ADD_USERTEST]

	@EmailAddr		VARCHAR(250)= NULL,
	@NewUserID		INT OUTPUT

AS
BEGIN

	INSERT INTO dbo.UserTest ( emailAddress ) 
	VALUES ( @EmailAddr );
			
	set @NewUserID = ident_current('dbo.UserTest');
			
END

GO

3. Run Stored proc and see the results:

DECLARE	@return_value int,
		@NewUserID int

EXEC	@return_value = [dbo].[PROC_ADD_USERTEST]
		@EmailAddr = N'z@z.com',
		@NewUserID = @NewUserID OUTPUT

SELECT	@NewUserID as NewUserID

SELECT	'Return Value' = @return_value

GO


select * from dbo.UserTest 

4. create a cfm and put 

<cftry>
	<cfscript>
    setting showdebugoutput=true;
    local = structNew();
    callResult = structNew();
	callResult.qryResult = {};
    
    local.emailAddr = 'b@b.com';
    </cfscript>
    
    <cfstoredproc procedure="proc_add_usertest" datasource="#application.stldsn#" >
		<cfprocparam type="in" cfsqltype="cf_sql_varchar"  dbvarname="@EmailAddr" 	value="#trim(local.emailAddr)#" null="#not len(local.emailAddr)#">
        <cfprocparam type="out" cfsqltype="cf_sql_integer" dbvarname="@NewUserID"   variable="newUID"> 
        <cfprocresult name="callResult.qryResult">	
    </cfstoredproc>
    
    <cfdump var="#callResult#" label="callResult">
	<cfoutput>newUID = #newUID#</cfoutput>
    
	<cfcatch>
    	<cfdump var="#cfcatch#">
        <cfdump var="#variables#" label="variables"> 
    </cfcatch>
</cftry>

Observe the error message: Message 	Variable NEWUID is undefined. 


Actual Result:

Variable NEWUID is undefined. 

Expected Result:

NewUserID  = 1  or some other integer.

Any Workarounds: undo CF11 Update 5.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3973457

External Customer Info:
External Company:  
External Customer Name: burak
External Customer Email:  
External Test Config: My Hardware and Environment details:



windows 7 pro, CF11. Rest not relevant.

Attachments:

Comments:

Hi Burak, We tried replicating the issue using the given code with ColdFusion 11 Update 5 build #11,0,05,293506 I also tried it with JDK 1.7 Update 55 and JDK 1.8 Update 45 and it is working for me. Please share the below mentioned information which can help me in replicating this issue: 1. Settings summary 2. DB Server along with build information 3. Database driver being used for data source connection. 4. Exception Stacktrace (exception.log), if any You can attach these files either to bug or send it to me at nimsharm@adobe.com
Comment by Nimit S.
7748 | April 22, 2015 02:24:15 AM GMT
Hi Nimit, I just emailed you supplemental information you requested. Please let me know if you have any questions. thanks
Comment by External U.
7749 | April 22, 2015 10:17:45 AM GMT
Hi Burak, This issue is only occurring if you have "Request Debugging Output" option enabled. This is a duplicate of bug #CF-3971083. So, I am closing this bug and I have marked other bug as "ToFix".
Comment by Nimit S.
7750 | April 27, 2015 02:13:24 PM GMT