This discussion is archived
2 Replies Latest reply: Nov 16, 2012 4:50 AM by 974629 RSS

APEX wrong Schema

974629 Newbie
Currently Being Moderated
Hello,

I am experiencing a rather worrying (although interesting) problem from an APEX app. I have a page which calls a packaged function from two different regions on the same page. the function is called to retrieve costing data for either the current record or a previous record (controlled by a in parameter in). The first call executes the function from our "test" schema and retrieves data correctly. When called the second time it is executing the function from our development schema and retrieving (invalid) records from the "development" schema! In each case the function (and package) name is not prefixed by the target schema nor indeed are any od our DML statements as we want all code to be portable form DEV to TEST to LIVE. Calling the same function from SQL developer consistently retrieves data from the development scheme irrespective of the in_params. I am using Oracle XE11.2 with Oracle 11.2.0.2.0 and APEX 4.0.2.00.09. I have found some docs on line referring to a similar issue in 10g but assumed the bug had been fixed so I am wondering if the issue is APEX related.

I should add that we have four seperate schemas but all tables, views, functions, procedures, packages etc are called the same in each schema

Grateful for any help

Edited by: 971626 on 16-Nov-2012 03:42
  • 1. Re: APEX wrong Schema
    Prabodh Guru
    Currently Being Moderated
    I am experiencing a rather worrying (although interesting) problem from an APEX app. I have a page which calls a packaged function from two different regions on the same page. the function is called to retrieve costing data for either the current record or a previous record (controlled by a in parameter in). The first call executes the function from our "test" schema and retrieves data correctly. When called the second time it is executing the function from our development schema and retrieving (invalid) records from the "development" schema! In each case the function (and package) name is not prefixed by the target schema nor indeed are any od our DML statements as we want all code to be portable form DEV to TEST to LIVE. Calling the same function from SQL developer consistently retrieves data from the development scheme irrespective of the in_params. I am using Oracle XE11.2 with Oracle 11.2.0.2.0 and APEX 4.0.2.00.09. I have found some docs on line referring to a similar issue in 10g but assumed the bug had been fixed so I am wondering if the issue is APEX related.
    I should add that we have four seperate schemas but all tables, views, functions, procedures, packages etc are called the same in each schema
    >

    Perhaps you have Public and/or Private Synonyms in different schemas created with the same names as the objects that leads to this?

    Cheers,
  • 2. Re: APEX wrong Schema
    974629 Newbie
    Currently Being Moderated
    Prabodh,

    Thanks for getting pack to me so quickly but we don't have any publi or private synonyms.

    Chris.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points