Calling Oracle overloaded stored procedures from CF 6.1

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Calling Oracle overloaded stored procedures from CF 6.1

    Did any of you tried to call an Oracle overloaded stored procedure from CF 6.1?
    You will be amazed to know that it doesn't work. :))

    Please test this :
    Write two Oracle stored procedures having the same name but different
    parameters :

    CREATE OR REPLACE PACKAGE BODY Test
    AS

    -- one parameter --
    PROCEDURE TestProc(y OUT ref_cursor)
    IS
    BEGIN
    OPEN y FOR SELECT 1 FROM dual;
    END TestProc;

    -- 2 parameters
    PROCEDURE TestProc(x VARCHAR2, y OUT ref_cursor)
    IS
    BEGIN
    OPEN y FOR SELECT 2 FROM dual;
    END TestProc;

    END;

    Don't forget to write also the specification of the package and then try to
    call one of these procedures from coldfusion :

    <CFSTOREDPROC procedure="TEST.TESTPROC" datasource="DS" username="USER"
    password="PASS">
    <cfprocparam type="In" cfsqltype="cf_sql_varchar" value="param" >
    <cfprocresult name="rezultat">
    </CFSTOREDPROC>

    Anctiously waiting.....

    dragoshbalan Guest

  2. Similar Questions and Discussions

    1. Stored Procedures with Date data types and Oracle
      This should be easy.... But i keep getting the error: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to...
    2. Oracle Thin Client and Stored Procedures
      We have a stored procedures in Oracle that we are trying to call from ColdFusion MX 7 using the Oracle Thin Client. The request hangs -- we never...
    3. Calling Multiple Stored Procedures inside a cfquery
      All, I have ColdFusion page that contains a Company dropdown, a To Date and From Date and submit button The user can select an ?individual...
    4. Cannot view Oracle Stored Procedures in Dreamweaver XP
      Does anyone know how to get round this? I've defined and tested the connection to the Oracle database and everything seems to work OK, but when I...
    5. Calling stored procedures from Access modules
      I am upgrading an Access app for a client to SQL Server. I'd like to convert many of his queries into stored procedures but I will need a way to...
  3. #2

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    You don't use parameter x in the second stored procedure. Hopefully you created
    these procedures first with ref_cursor declared. Please send full right code
    and I could test it in CF 7 with Oracle9i to compare if problem still exists.

    CF_Oracle Guest

  4. #3

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    Nice to see that someoune watches over this forum,

    Yes you're right I didn't use the x parameter , but remember this is only a
    test procedure , I don't think it matters I only want to show you a "strange"
    situation ....
    Here is the complete source :
    Oracle code :
    1.Package specification :

    CREATE OR REPLACE PACKAGE Test
    AS
    TYPE ref_cursor IS REF CURSOR;

    PROCEDURE TestProc(y OUT ref_cursor);
    PROCEDURE TestProc(x VARCHAR2, y OUT ref_cursor);
    END;

    2. Here is the body:

    CREATE OR REPLACE PACKAGE BODY Test
    AS

    -- one parameter --
    PROCEDURE TestProc(y OUT ref_cursor)
    IS
    BEGIN
    OPEN y FOR SELECT 1 FROM dual;
    END TestProc;

    -- 2 parameters
    PROCEDURE TestProc(x VARCHAR2, y OUT ref_cursor)
    IS
    BEGIN
    OPEN y FOR SELECT 2 FROM dual;
    END TestProc;

    END;

    3. The coldfusion code is the same , just place the call to one of these
    procedures in any page.

    <CFSTOREDPROC procedure="TEST.TESTPROC" datasource="DS" username="USER"
    password="PASS">
    <cfprocparam type="In" cfsqltype="cf_sql_varchar" value="param" >
    <cfprocresult name="rezultat">
    </CFSTOREDPROC>

    For any other question don't hesitate to request.
    Thanks .

    dragoshbalan Guest

  5. #4

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    Did you look at refcursor problem there?
    [url]http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=0 0000313.htm[/url]

    CF_Oracle Guest

  6. #5

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    As far as I can understand the topic refers to "cursors passed as parameters".
    This is not our case .

    Thanks.
    dragoshbalan Guest

  7. #6

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    I re-created this package in Oracle 9i and modified code for calling storedproc
    to
    <CFSTOREDPROC procedure="TEST.TESTPROC" datasource="#REQUEST.DSN#">
    <cfprocparam type="OUT" cfsqltype="cf_sql_refcursor" value="2">
    <cfprocresult name="rezultat">
    </CFSTOREDPROC>
    Got error:
    Error Executing Database Query.
    [Macromedia][Oracle JDBC Driver]The specified SQL type is not supported by
    this driver.

    The error occurred in C:\Inetpub\wwwroot\... line 38

    36 :
    37 : <cfprocparam type="OUT" cfsqltype="cf_sql_refcursor" value="2">
    38 : <cfprocresult name="rezultat">
    39 : </CFSTOREDPROC>

    By the way we run CF 7 and according to documentation cf_sql_refcursor is
    valid type.

    Good luck in your search!




    CF_Oracle Guest

  8. #7

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    One more thing if it could help you: when I omit this refcursor parameter or
    put different type there was another error:
    [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TESTPROC' ORA-06550:
    line 1, column 7: PL/SQL: Statement ignored

    CF_Oracle Guest

  9. #8

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    So you received the same error as mine ,only that you work with ColdFusioon 7.
    I think somebody from macromedia support must be noticed !
    dragoshbalan Guest

  10. #9

    Default Re: Calling Oracle overloaded stored procedures from CF6.1

    I just received a notification from Macromedia's Documentation Manager sayin'
    "I checked and am sorry to say that this isn't supported. There is a bug
    for this issue, 53122, but it hasn't been addressed. "

    So the bug is confirmed. Good to know that somebody watches over this forum .
    Waiting the fix.
    :

    dragoshbalan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139