[APEX 4.0] Create PL/SQL APIs

In the SQL Studio, I noticed the "Create API in PL/SQL" in the lower right corner. But when you try to create it, I can't select a table, althouhg my diagram has several tables. Why does this work? Otherwise explain what this creation of the API in the APEX...

Hello

It's the same functionality as in the APEX 3.x if you go to the workshop of SQL > object browser > create button > package
You can find "together with methods on one or more database tables", which generates the insert, update, and delete procedures and md5 checksums. It is very convenient as a starting point for your own packages.

If something does not work in APEX 4.0, you can save it as Feedback. You can also search for existing comments.

Kind regards
Dimitri
----------------------------------
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/

Tags: Database

Similar Questions

  • PL/SQL API to set the text for the notification

    Hello

    Anyone can indicate APEX PL/SQL API to set the value of notification page text?

    I found call WWV_FLOW.show_error_message which display the error message, but doesn't seem that she also transaction Rollback - so I need to have something similar for notifications. Directly manipulate WWV_FLOW.g_notification works not as well - I had invalid checksum error.

    Any ideas will be appreciated.

    Sincerely
    Husbands

    Sentinel page is too early in the treatment of set this global but you should be able to use before header process, or at any other point in shooting to set. What is an API, it is not a because a simple assignment to the global level will be sufficient.

    Scott

  • create the SQL server programmatially data source

    Hello

    I would like to create a SQL server by programming in LabVIEW data source. The SQL server version that I used is from 2005. Can someone give some ideas? An example of code will be more favorable.

    Thank you

    Jane

    You can build the connection string you even.  The open function in the Toolbox of data base accepts a string as well (it's polymorphic) who can be the connection string.  This is the site I use to understand.  Is the most common things.  You may need to search Google more specific elements.

    http://www.ConnectionStrings.com/

    If you want to use the other option, someone has achieved a UDL editor in LabVIEW.  You can use this code to create your own UDL which can use the Open DB function:

    https://decibel.NI.com/content/docs/doc-18613

    I have used the above code, so can't comment on that.

  • Apex - dbms_job.submit (Oracle) in SQL commands

    I have connected to oracle apex (version 4.2.5.00.08) at the URL https://apex.oracle.com/pls/apex/f?p=4550:1:0:

    I am trying to execute the procedure of dbms_job.submit through SQL Workshop-> SQL commands)

    The code is as shown below

    *************************************************************************************************************************

    declare

    -jobno number;

    jobno varchar2 (20);

    Start

    dbms_job. Submit (work = >: jobno,)

    This = > ' START

    emp_pack.remove_dept (16);

    END;',

    next_date = > trunc (sysdate + 1).

    interval = > 'trunc(sysdate+1) '.

    );

    -dbms_output.put_line ('Job No. :'||: jobno);

    commit;

    dbms_output.put_line ('Job No. :'|| is jobno);

    end;

    *************************************************************************************************************************

    The procedure of package I'm talking in the parameter 'WHAT' is defined as shown below

    create or replace package emp_pack is

    process remove_emp()emp_id in NUMBER)

    process remove_dept()dept_id in NUMBER)

    end emp_pack ;


    create or replace package body emp_pack

    is

    process remove_emp()emp_id in NUMBER( )

    is

    begin

    delete from EMP

      where EMP .EmpNo = emp_id ;

    end remove_emp;

    process remove_dept()dept_id in NUMBER( )

    is

    begin

    delete from dept

      where Dept .DeptNo = dept_id ;

    end remove_dept

    end emp_pack ;

    *************************************************************************************************************************

    while trying to run the piece of code (I'm passing avlaue from 35 to the jobno to the RUN time parameter) is the error I get

    ORA-06502: PL/SQL: digital or value error: character string buffer too small


    I tried to know everything, I have, but have not been able to determine what is causing the error. Help, please

    Super weird... I just ran the following on apex.oracle.com and got "1 row (s) deleted', not 'treated statement."

    declare
      l_job int;
    begin
      /* dbms_job.submit( l_job, 'begin delete from emp; end;' ); */
      rollback;
    end;
    
  • How to get the schema of the APEX by username in PL/SQL?

    Hey, guys:

    I have to write a PL/SQL procedure, which can become the apex (schema of the user) user group that we have defined by their Summit. I know I can get user account in reference to v (app_user), but I'm not familiar with the APEX API security management. is there a method to get the user APEX scheme providing the username as a parameter?

    Thank you.

    Sam

    lxiscas wrote:
    Hey, guys:

    I have to write a PL/SQL procedure, which can become the apex (schema of the user) user group that we have defined by their Summit. I know I can get user account in reference to v (app_user), but I'm not familiar with the APEX API security management. is there a method to get the user APEX scheme providing the username as a parameter?

    Thank you.

    Sam

    You can simply use APEX_UTIL. GET_GROUPS_USER_BELONGS_TO

  • V8: Adding the extension to a data request created via the API

    Infra Enterprise version: 8.0.34.0

    Version of database: Oracle 9i 9.2.0.6.0

    I create a web application that registers a specific request through the RequestCreate API function. Unfortunately it doesn't seem to be any support to add data to the extension fields created from application designer. I thought to add data manually by using an insert statement. Is the Ref table su_extension_data field an auto-increment field or do I need get the max (ref), add 1, use either the ref to new records? It seems that, based on the infra_queries.sql file, I provide the ref for the extension data.

    All this seems to be a recipe for disaster. Is there a better way to add extension information to a request?

    Thank you

    All references are managed by the SU_NUMBER_ALLOC table. The NUMBER_ALLOC column is the next value to be used for the table defined in the column TABLE_ALLOC. If the value should be incremented or as kentyrr suggested to use the procedure stored in the ALLOCATEUNIQUEREF.

    You need to expand the stored procedure / SQL custom that will insert the extension using ALLOCATEUNIQUEREF fields and call using the function API ExecuteQuery. If you insert multiple extension fields, you can use the nQuantity parameter in order to book a bunch of refs for your instructions insert only once.

  • APEX how to create an apex_collection

    Hello

    I currently work in a 'Survey' application and I want to store data and at the end to submit them.
    I read some topics and oracle bind on apex_collection, but I have the problem to the implementation, I don't know where and how to start:
    1. I have a page containing:
    A. report brings me data from a database. (these are questions)
    B. 1 point with 5 values (radio button) different types of responses
    I want to accomplish is to answer all questions and save all the answers at the end of DB. For this I thought to use the apex_collection to collect the information and after will see :).

    Can someone tell me how to create a collection (it's a process?) and How to store the responses ?
    Select a.question_num ||'.',
           b.text
    from xxgrp.xxgrp_hr_survey_dtl_360 b,
         xxgrp.xxgrp_hr_survey_dtl a
    where a.question_id = b.question_id  
    Thank you

    Indeed, the collection is a process.

    I'm still waiting in my business logic where the best place is to create. You say you have need some kind off investigation app.

    In this case, I would create when you open the first page off your App survey know that you can create it only once. If there is already let them down but in the API, there are procedures like create or truncate the collection.

    Everything you use in the API are procedures of the apex.

    Concerning

    Nico

  • To access the tips of existing PL/SQL API

    Hi all in the JDev/ADF community,

    I am a beginner in ADF coming from a form and background of PL/SQL. Using JDeveloper 11.1.1.2, I lived quite a few examples and read a lot of different guides developers. I'm happy with the basics of the model controller architecture and display when simply based on database tables. For example, I can create a fairly complex page with tabs, master relationships / detail, editing etc.

    The app I am writing to you in the end is to sit on top of an existing PL/SQL packages that provide most of the data and logic that surround it.

    So, to finally get to my question... I wonder what is the best way to approach using aspects of the API of PL/SQL in British Colombia ADF? I saw some things in the background documentation around the use of an API of simple table with procedures for insert/update/delete, however I cannot find directions on how to access the data returned in associative arrays. For example, there is a procedure that is called with a particular key value (will be passed as a parameter to the page) which returns then several tables of different records PL/SQL (for example, the OUT parameters). I need to access this information during a session of the app, so I think I need somehow to load it into an entity or view object. Y at - it an interface to access the record types and table PL/SQL in this way?

    Obviously, I want to reuse as much of the existing infrastructure, as I can, but if there are areas where this would result in unnecessary complexity on the side of the ADF, I'd consider reworking of these parts.

    I'm not a complete solution at this stage - just a few pointers on what direction to look would be much appreciated.

    Thank you very much

    Kevin.

    Published by: user11363101 on March 11, 2010 11:33 (added version JDev)

    I would like to just one part of your question, given that Frank has indicated you in the General documentation to call PL/SQL from ADF business components address.

    You asked specifically about the transmission of arrays and associative arrays to and from PL/SQL procedures. These are artifacts of PL/SQL that do not interact with the outside environment. The main problem is that the modules developed in Java and other languages cannot easily discover the metadata for these tables. You'll need to translate into objects Oracle you set with the CREATE TYPE command. Here is one of my favorites:

    CREATE TYPE vc_arraytype AS TABLE OF VARCHAR2(4000);
    

    Then you declare objects of this type, and given that plug-ins can ask the database 'what is a VC_ARRAYTYPE?', they can use these objects. You would change your PL/SQL so that it uses tables from database nested as it instead of collections of native PL/SQL, or create procedures of wrapper which translate the tables of database embedded in the forms required by your initial proceedings, call the initial procedures, can translate the results if necessary.

    Associative arrays with non-integer index are a particular problem, because there is no equivalent type that you can create with CREATE TYPE. You can use a pair of nested tables, one for the clues and one for values, or create a record type such as

    CREATE TYPE assoc_rectype AS OBJECT(name VARCHAR2(30), val VARCHAR2(4000));
    

    Then a table nested in these folders:

    CREATE TYPE assoc_arraytype AS TABLE OF assoc_rectype;
    
  • <>- Web Services <>- PL/SQL API UI

    Hi all

    We have inherited an existing application that has this architecture:
    UI - c# (WinForms, not web-based), completely independent of the DB
    WS - Web services, c#
    DB - Oracle 10g, > 500 paintings
    API - PL/SQL

    Because the user interface is blind DB, some information (parameters) can be sent backwards and this forces highly customized WS (from thousands of them; so, low probability of being in the future by other applications). In addition, each custom WS calls a custom MS.
    What I would do is, if is not allowed to use generic WS, at least to be able to write generic SP (PL/SQL).

    Here's a simple example:
    say a user enter 5 fields in a user interface. These channels are sent on the reverse, as input. We know what table and columns 5 channels, but only in the WS (not in the user interface). So upside I can build:
    INSERT INTO tableName (c1,..., c5) VALUES (v1,..., v5)
    and then call a GSP that will simply run the SQL statement.

    The problem here is that some other applications would like to insert other attributes of a column in the table, and I don't want to write of cSP for, say, 2 fields or 6, etc.. Instead, an SP must be written.

    Any ideas?
    Thank you very much.

    user10817976 wrote:
    Any ideas?

    How much effort do you spend trying to work around something that is architecturally incorrect? Fixing it is not possible, because it will need a complete rewrite. So where you draw the line and cut your losses?

    The answer is sooner rather than later. I know a couple of systems where these issues were known and ignored - and put on hold to address at a later stage. In the meantime the monster grows in size, and it becomes more and more difficult (and much more expensive) to solve the basic problems. And then 8 + years pass and you are so deep in that flawed architecture, there is almost no loophole that is not custom, you and the business. And a lot of trouble.

    Like cancer... the best treatment for imperfect architecture is early treatment.

    I would stop all development on this architecture. Provide for basic maintenance only. Identify the basic elements required by the user base. To implement these on APEX as soon as possible. This will allow to spend the rest of the system through to APEX to a more structured and better controlled method in treating back problems (such as data modeling, design and implementation physical db) too much respite.

  • Essbase Administration Service - create rules SQL file - connection error

    Hello

    I am creating the rules SQL files in Essbase Administration Console.

    When I press the OK/recover button in open SQL data source window I get this error:

    cannot connect to establish a connection with the SQL Server database see log for more information

    I tried the ODBC connections and BEAK .

    When I test the ODBC connection in Windows administrative tools > Data Sources (ODBC) > system DSN, it works correctly. but in open SQL error there.

    I tried two separate databases for my test.

    an Essbase server machine.

    a separate server.

    both give me the same error.

    SRD: 11g R2

    Essbase: 11.1.2

    ODBC1.jpgODBC2.jpgodbc3.jpg

    Do you have any suggestions?

    Create the DSN using DataDirect Oracle Wire Protocol 7.0 in (System DSN) ODBC administrators and test the connection of the Rules file. It will work.

    I think that u used Oracle in oracle11glcinet_home

  • Can SQL gurus, you create a SQL to do this?

    I have a query that brings together the records of 2 columns:

    ROOM_DESC Detail_count

    Not reserved - clean, 4

    Not reserved - salty, 30

    Reserved - clean, 8

    Reserved - salty, 47

    Is what I want, without creating a temporary table, use the SQL existing as an input and output it:

    Rooms, 89

    Clean, 12

    Dirty, 77

    Even if getting to the rooms is not technically possible, to get the other 2 total records would be great.

    Hello

    This looks like a job for the REPORT GROUP.

    Here's one way:

    WITH original_query AS

    (

    SELECT...  AS room_desc

    ,        ...  AS detail_count

    ...

    )

    got_room_grp AS

    (

    SELECT SUBSTR (room_desc
    , INSTR (room_desc, "-") + 3
    ) AS room_grp

    detail_count

    Of original_query

    )

    SELECT NVL (room_grp, 'Rooms') AS grp_label

    SUM (detail_count) AS detail_count

    OF got_room_grp

    GROUP OF ROLLUP (room_grp)

    ORDER BY NULLS FIRST room_grp

    ;

    According to what did you do in the original request, there might be a much simpler way.  Chances are, you can derive from room_grp without devoting a separate subquery, as I did above.  You might be able to do all the work without any subqueries in all.

    If you would care to post CREATE TABLE and INSERT instructions for sample data and your needs, then I could test it and maybe show you a simpler and more efficient way.

    The query above assumes that room_desc always contains "-", followed by another text.  If this isn't the case, then you need a slightly more complicated expression for grp_label in the main query:

    ...

    SELECT THE CHECK BOX

    WHEN you GROUP (room_grp) = 0

    THEN room_grp

    ELSE 'rooms '.

    END AS grp_label

    ...

    or perhaps other slight modifications, but the general approach here show will still work.

  • Error ora-02019 in PL/SQL call in the apex, but not in a SQL Client

    Hello

    I encountered a strange problem. I have a process page type PL/SQL that runs on submit a form.

    This process calls a PL/SQL package function.

    When I run the PL/SQL Code from a SQL, for example SQL Navigator Client it works without problems.

    When trying to run from the APEX, it is always fails with the error:

    ORA-02019: description of the connection to the remote database not found

    It's the SAME code in both situations.

    It's the process code:

    DECLARE

    v_result INTEGER. v_result_msg VARCHAR2 (4000);

    v_ref_date DATE; v_reset INTEGER.

    BEGIN

    -Prepare the arguments

    v_ref_date: = TO_DATE (: P73_REFERENCE_DATE, ' DD/MM/YYYY');

    v_reset: =: P73_RESET;

    -Use the feature

    TRC.trc_jobs.xade_daily_job (v_ref_date, v_reset, v_result, v_result_msg);

    END;

    When I debug Apex I trace to the bottom of the error, in a job that makes a join with a table in a database link.

    It is the offending function:

    FUNCTION (p_series_name IN VARCHAR2, p_date AS get_series_cfi_code,

    p_date_active_flag in FULL)

    RETURN VARCHAR2

    IS

    v_cfi_code instrument_type.full_cfi_code@dl_herds%TYPE;

    CURSOR c_get_series_cfi_code IS

    SELECT it.full_cfi_code

    I, instrument_type@dl_herds INSTRUMENTS it

    WHERE i.series_name = p_series_name

    AND ((i.expiration_date = p_date AND p_date_active_flag = 0) OR)

    (i.expiration_date > = p_date AND p_date_active_flag = 1))

    AND i.product_id2 = it.id

    ORDER BY i.expiration_date;

    BEGIN

    OPEN c_get_series_cfi_code.

    SEEK c_get_series_cfi_code INTO v_cfi_code;

    CLOSE C_get_series_cfi_code;

    RETURN v_cfi_code;

    END get_series_cfi_code;

    No idea why this is happening?

    I think to reproduce the table locally to eliminate the use of dblink as a last resort.

    APEX Version: 4.2.4.00.08

    Database version: 12.1.0.1.0

    NLS: UTF - 8

    TIA,

    Dionisis

    Are you sure that the dblink is accessible from the scheme of the analysis of the application? Run the code in your sql client in the same pattern?

  • Directory of the creat Developer SQL

    HY gurus,

    I try to create the directory in SQL Developer and it gives me an error: ORA-01031: insufficient privileges. I want to create the directory of the user who is localhost, also I want the path to my FX_Folder folder that is located on drive D:\ on my computer. I need help?

    Thank you

    Hello

    You want to create an Oracle Directory?

    grant CREATEANYDIRECTORY to your_user

    Concerning

  • APEX Websheets: Section of PL/SQL not available

    Hello everyone,
    creating a new section of the page as a user websheet, I like to choose the type of section "PL/SQL". But it appears not only text, Navigation, data and graphics are available.

    • The property Websheet 'allow SQL and PL/SQL' is set to Yes
    • The feature Instance "activate SQL and PL/SQL Access in Websheets" is set to Yes (and the new application websheet was created after I had set it to Yes)

    I have also enabled these settings back to ensure that they were properly stored.

    Is there another switch, that I forgot?

    Request Express 4.2.3.00.08, 11G R2 Enterprise Edition, installed on a Windows 7 laptop.
    Thanks for your ideas,
    Andreas

    Hi Andreas,

    This is deliberate. We had to remove the ability to create new areas of PL/SQL in Websheets in 4.2.2 because of security concerns during an internal audit function (the function has been questioned, not the implementation). It has been listed as bug 16536609 (Deprecate support of the section of PL/SQL Websheets) in known issues, but no doubt he deserved a more visible documentation.

    Kind regards

    Christian

  • Create a user: API request error

    Hello

    I would like to create a user via the REST API, but I don't understand why I get from VMWare REST API (vcloud) this result: Page NOT FOUND

    api1.PNG

    Equal content:

    api2.png

    Thank you in advance,

    "" Can you try to change the value of the 'xmlns' attribute in your XML query to: xmlns = "http://www.vmware.com/vcloud/v1"

    Looks like you are trying to use the API v1.0 in the URL, but you're passing v1.5 namespace.

Maybe you are looking for