Solved

Coldfusion & Stored Porc. with array parameter

Posted on 2001-07-12
3
204 Views
Last Modified: 2013-12-24
I want to call a procedure with array parameter from ColdFusion.

My procedure is (Oracle8i):

create type array3 is varray(3) of number ;
 
create or replace procedure Array_1(rt_ array3, value_ out number)
is
  i number;
  nreturn_ number;
begin
  for i in 1..3 loop
   nreturn_:=rt_(i)+1;
  end loop;
  value_ := nreturn_;
end Array_1;
/

How can i write the code to call this procedure in ColdFusion?
0
Comment
Question by:hieutd
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
CF_Spike earned 300 total points
ID: 6279768
I haven't worked much with Oracle, but there is a good article on stored procedures and oracle on the allaire website:

http://www.allaire.com/Handlers/index.cfm?ID=8353&Method=Full

Spike
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 6281330
what is the data type of the in variable rt_ array3?
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 6281372
I am going under the assumption that rt_ array3 is VARCHAR. If not then the cfsqltype attribute for the first <cfprocparam> will have to be changed to the proper type.

IF you have any questions or need more expplanation let me know.

-Scott

---------------------Begin Example Code-------------


<CFSTOREDPROC PROCEDURE="Array_1"
    DATASOURCE="YourDataSourceNameGoesHere"
    >
     
<CFPROCPARAM TYPE="IN"
    Value="Value_Of__Input_For_rt_ array3_Goes_Here"
     cfsqltype="CF_SQL_VARCHAR"
    >

<CFPROCPARAM TYPE="OUT"
     Variable = "value_out_Variable_Name"
     cfsqltype="CF_SQL_INTEGER"
    >

</CFSTOREDPROC>

---------------End Example Code---------------------------
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question