Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Two questions about Oracle stored procedure.

    1.How could I get the return value from a Oracle Stored Procedure with output parameter via operationId?

    Datasource Code:
    <operationBinding operationType='fetch' operationId='new'>
    <customSQL>
    Call ABC(1);
    </customSQL>
    </operationBinding>
    Procedure Code:
    create or replace procedure ABC (aa out int)
    as
    begin
    aa:=2;
    end;

    JSP Code:
    isc.DataSource.get("Student").fetchData({},'',{operationId:'new'})

    Imformation in Console:
    output parameter not a bind variable parameter for a function or a procedure

    so I tried that:
    Datasource Code:
    <operationBinding operationType='fetch' operationId='new'>
    <customSQL>
    Call ABC(MyPackage.aaa);
    </customSQL>
    </operationBinding>

    Package Code:
    create or replace package MyPackage
    IS
    aaa int;
    End MyPackage;
    create or replace Package Body MyPackage
    AS
    End MyPackage;

    Imformation in console:
    ‘AAA’ is not a procedure or is undefined

    Then How to transfer output variables to the stored procedure ‘ABC’?

    2.How could I call an Oracle Stored Procedure without output parameter?
    Datasource Code:
    <operationBinding operationType='fetch' operationId='new'>
    <customSQL>
    Call ABC();
    </customSQL>
    </operationBinding>

    Procedure Code:
    create or replace procedure ABC
    as
    a int;
    begin
    a:=1;
    end;

    JSP Code:
    isc.DataSource.get("Student").fetchData({},'',{operationId:'new'})

    Imformation in Console
    Unable to execute extracting on PLSQL statement



    1.How could I get the return value from a Oracle Stored Procedure with output parameter via operationId?

    Datasource Code:
    <operationBinding operationType='fetch' operationId='new'>
    <customSQL>
    Call ABC(1);
    </customSQL>
    </operationBinding>

    Procedure Code:
    create or replace procedure ABC (aa out int)
    as
    begin
    aa:=2;
    end;

    JSP Code:
    isc.DataSource.get("Student").fetchData({},'',{operationId:'new'})

    Imformation in Console:
    output parameter not a bind variable parameter for a function or a procedure

    so I tried that:
    Datasource Code:
    <operationBinding operationType='fetch' operationId='new'>
    <customSQL>
    Call ABC(MyPackage.aaa);
    </customSQL>
    </operationBinding>

    Package Code:
    create or replace package MyPackage
    IS
    aaa int;
    End MyPackage;
    create or replace Package Body MyPackage
    AS
    End MyPackage;

    Imformation in console:
    ‘AAA’ is not a procedure or is undefined

    Then How to transfer output variables to the stored procedure ‘ABC’?

    2.How could I call an Oracle Stored Procedure without output parameter?
    Datasource Code:
    <operationBinding operationType='fetch' operationId='new'>
    <customSQL>
    Call ABC();
    </customSQL>
    </operationBinding>

    Procedure Code:
    create or replace procedure ABC
    as
    a int;
    begin
    a:=1;
    end;

    JSP Code:
    isc.DataSource.get("Student").fetchData({},'',{operationId:'new'})

    Imformation in Console
    Unable to execute extracting on PLSQL statement

    #2
    uh...is there anyone?

    Comment


      #3
      For users finding this thread via search:
      Answered in http://forums.smartclient.com/forum/...ored-procedure

      Comment

      Working...
      X