The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

How to call stored procedures in a Package in Oracle 10g?

Last post 07-10-2007, 4:43 PM by curtis. 20 replies.
Page 2 of 2 (21 items)   < Previous 1 2
Sort Posts: Previous Next
  •  07-10-2007, 11:38 AM 3768 in reply to 3764

    Re: How to call stored procedures in a Package in Oracle 10g?

    We create a package to hold our cursor type, look a the top of our generated stored procedure output, it's at the very top.  But we don't put our procs in a package you are correct. I'm not sure honestly what the syntax would look like in a package. Either way we just missed this release so a quick fix probably isn't forthcoming.

    [modified]

    Can you do some kind of trace in Oracle and show us what the differnence is between pure ADO.NET code that works and the EntitySpaces that fails? We might be able to use the options like Ignore Schema / Ignore Catalog in the Generated master to control this?


    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  07-10-2007, 12:05 PM 3769 in reply to 3768

    Re: How to call stored procedures in a Package in Oracle 10g?

    ouuuccchh (in my best ET voice).   I'll try.

     
    I'm not sure that I know what is pure ADO.NET. Would you consider the code posted above http://community.entityspaces.net/forums/permalink/3768/3675/ShowThread.aspx#3675 to be pure ADO.NET?  If so, I'll attempt to get  a trace for you.

     BUT, You do have an example of a call to a procedure in a package that returns a refcursor

    MYGENERATION.esAggregateTestLoadByPK

    Maybe if I can see that that portion of the package, I can figure out what syntax it takes to make that type of call work. 

     

    Curtis

  •  07-10-2007, 12:20 PM 3770 in reply to 3769

    Re: How to call stored procedures in a Package in Oracle 10g?

    Maybe if I can see that that portion of the package, I can figure out what syntax it takes to make that type of call work. 

    Just run our Oracle Stored Procedure template on one of our tables, it's all right there in the output window after you run it in MyGeneration.


    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  07-10-2007, 12:37 PM 3772 in reply to 3770

    Re: How to call stored procedures in a Package in Oracle 10g?

    I think you're trying to confuse me :)

     

    I want to see the procedure esAggregateTestLoadByPK located in your package MYGENERATION.  It's not a generated procedure.

     

  •  07-10-2007, 4:23 PM 3776 in reply to 3772

    Re: How to call stored procedures in a Package in Oracle 10g?

    Wink It's just the LoadByPrimary key stored proc for our AggregateTest table, here it is.

     

    Code:
    CREATE OR REPLACE PROCEDURE "MYGENERATION"."proc_AggregateTestLoadByPrimaryKey"
    (
    pID IN "AggregateTest"."ID"%type,
    outCursor OUT "MYGENERATION".ENTITYSPACES.sqlcur
    )
    IS
    BEGIN
    OPEN
    outCursor FOR
    SELECT

    "ID",
    "DepartmentID",
    "FirstName",
    "LastName",
    "Age",
    "HireDate",
    "Salary",
    "IsActive"
    FROM "AggregateTest"
    WHERE
    "ID" = pID
    ;
    END ;
    /
     

     


    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  07-10-2007, 4:43 PM 3777 in reply to 3776

    Re: How to call stored procedures in a Package in Oracle 10g?

    oh. I was confused. (does that mean you suceeded?) I thought you had a working copy of a procedure inside a package that returned a refcursor.  That one is not in a package either.
Page 2 of 2 (21 items)   < Previous 1 2
View as RSS news feed in XML