Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

cfprocparam : How do I call stored proc with db defined variable %TYPE?

$
0
0

I have a stored proc in Oracle. One of the input params is a defined type (see below). The error I get whenever I call the cfstoredproc is "expression is of wrong type ORA-06550". It's a formatted varchar, it's a table column. There's no CFPROCPARAM type that matches that.

 

The type is a package-defined specific format (table column): EMAIL_ADDRESSES_TABLE.USER_ID%TYPE. The table column USER_ID is: USER_ID VARCHAR2(8 BYTE). The USER_ID is a 0-padded numeric, like '00001234'

my call:

    <cfstoredproc procedure="PK_EMAIL.get_emails" datasource="#MYDSN#">

      <cfprocparam type="in" cfsqltype="CF_SQL_VARCHAR" variable="p_user_id" value="#formattedUserId#">

      <cfprocparam type="in" cfsqltype="CF_SQL_NUMERIC" variable="p_active_only" value="1">

      <cfprocresult name="spResult">

    </cfstoredproc>

the stored proc function:

   

   FUNCTION get_emails(

    p_user_id  IN EMAIL_ADDRESSES_TABLE.USER_ID%TYPE,

    p_active_only  IN SIMPLE_INTEGER

   )RETURN EMAIL_ADDRESSES_TABLE;

 

The error I get from the system is

 

    [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1,column18: PLS-00382: expression isof wrong type ORA-06550: line 1,column7: PL/SQL: Statement ignored


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>