Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Matthew Parks / Matthew Parks (Matthew Parks)
Created: 04/16/2015
Components: Database
Versions: 11.0
Failure Type: Data Loss
Found In Build/Fixed In Build: CF11_Final / CF11 Update7
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Win 2012 Server x64
Vote Count: 16
Problem Description:Calling a Stored Procedure that has IN and OUT parameters, the LAST OUT parameter variable name is not able to be referenced by code.
Steps to Reproduce:
-- Table creation
create table Test
( id int,
name varchar2(20),
name1 varchar2(20),
name2 decimal,
name3 varchar2(20),
name4 varchar2(20),
name5 varchar2(20),
name6 varchar2(20),
name7 decimal,
name8 varchar2(20),
name9 varchar2(20),
name10 varchar2(20),
name11 varchar2(20));
-- Data insertion
insert into Test values(1, 'SomeText', 'SomeText', 23432.45, 'SomeText', 'SomeText', 'SomeText', 'SomeText', 34.34, 'SomeText', 'SomeText', 'SomeText', 'SomeText');
insert into Test values(2, 'SomeText', 'SomeText', 324.23, 'SomeText', 'SomeText', 'SomeText', 'SomeText', 56.5, 'SomeText', 'SomeText', 'SomeText', 'SomeText');
insert into Test values(3, 'SomeText', 'SomeText', 23232.2, 'SomeText', 'SomeText', 'SomeText', 'SomeText', 78.6, 'SomeText', 'SomeText', 'SomeText', 'SomeText');
insert into Test values(4, 'SomeText', 'SomeText', 7665.5, 'SomeText', 'SomeText', 'SomeText', 'SomeText', 789.5, 'SomeText', 'SomeText', 'SomeText', 'SomeText');
--create stored procedure
create or replace procedure spTest (idd in number, name out varchar2, name1 out varchar2, name2 out decimal, name3 out varchar2, name4 out varchar2, name5 out varchar2, name6 out varchar2, name7 out decimal, name8 out varchar2, name9 out varchar2, name10 out varchar2, name11 out varchar2) as
Begin
SELECT name, name1, name2, name3, name4, name5, name6, name7, name8, name9, name10, name11 into name, name1, name2, name3, name4, name5, name6, name7, name8, name9, name10, name11 FROM Test where id = idd;
End;
--Calling Stored ptocedure
<cfstoredproc procedure="spTest" datasource="oracle11g">
<cfprocparam type="IN" cfsqltype="CF_SQL_INTEGER" value="2">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name1">
<cfprocparam type="OUT" cfsqltype="CF_SQL_DECIMAL" variable="name2">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name3">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name4">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name5">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name6">
<cfprocparam type="OUT" cfsqltype="CF_SQL_DECIMAL" variable="name7">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name8">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name9">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name10">
<cfprocparam type="OUT" cfsqltype="CF_SQL_VARCHAR" variable="name11">
</cfstoredproc>
<cfoutput>
#name#<br>
#name1#<br>
#name2#<br>
#name3#<br>
#name4#<br>
#name5#<br>
#name6#<br>
#name7#<br>
#name8#<br>
#name9#<br>
#name10#<br>
#name11#<br>
</cfoutput>
Actual Result:
ERROR:
Event Name: onRequest
error message: Variable NAME11 is undefined.
error detail:
The contents of the tag stack are:
Template: C:\inetpub\dev.site.com\CF11_test.cfm
Line: 31
ID: ??
Where line 31 is the code #name11#<br> as you have given it.
Expected Result:
name11 has the returned value of the Stored Procedure like Name 1 - 10 do.
Any Workarounds:
At this point I do not know of a work around other than not INSTALLING update 5 for CF11.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3971083
External Customer Info:
External Company:
External Customer Name: Matthew
External Customer Email:
External Test Config: My Hardware and Environment details:
1. ORACLE 11g
2. Windows Server 2012 R2 Standard Edition
Attachments:
Comments: