Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Function

Status
Not open for further replies.

klemen

Programmer
Feb 12, 2001
5
SI
I'am having a trouble getting a return value from an Oracle Function.

This is function works fine:

function SIFRANT (val IN CHAR, sif IN CHAR)
return CHAR
as
tkst CHAR;
Begin
End;

How do I get at that returned value in CF?

Thanks.



 
I've never worked with oracle but if the function behaves the same as something like the min() function, you could access it's value like this:

<cfquery name=&quot;q1&quot; datasource=&quot;d1&quot;>
select SIFRANT (val IN CHAR, sif IN CHAR) as var1
</cfquery>

<cfoutput>#q1.var1#</cfoutput>

Hope this helps,
GJ
 
I use CFSTOREDPROC to call my Oracle procedures. I've never tried it with functions though...

<CFSTOREDPROC procedure=&quot;proc_name&quot; datasource=#DataSource# dbtype=&quot;ODBC&quot; username=#ODBC_Username# password=#ODBC_Password#>

<CFPROCPARAM type=&quot;IN&quot; dbvarname=val cfsqltype=CF_SQL_CHAR value=#Whatever#>
<CFPROCPARAM type=&quot;IN&quot; dbvarname=sif cfsqltype=CF_SQL_CHAR value=#Whatever#>

<CFPROCPARAM type=&quot;Out&quot; cfsqltype=&quot;CF_SQL_VARCHAR&quot; variable=&quot;p_output_variable&quot; dbvarname=&quot;p_output_variable&quot;>

</CFSTOREDPROC>


Hope this helps !

SimonA
 
i've tried and used cfstoredproc with plsql functions and it was working fine
the only difference with calling a procedure is that you have to add something at the end of the tag to specify you're expecting a return value : <cfstoredproc ..... here goes the property ??i don't remember the name of it but it's for sure in any doc???>
 
i would like to get the syntex that i can give some one
access to the table that i use or access to some column in a table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top