Without Automatic Row Processing (DML)

Hi All
I try to make one page to show use DML statements without standard Automatic Row Process.
What I have:
One page with:
region: Report - select empno, ename, sal, deptno from emp;
region: Form with items: p6_empn, p6_ename, p6_sal, p6_deptno
addictionaly in that moment I have:
process CreateProcess:
begin
insert into emp (empno, ename, sal, deptno)
values (emp_seq.nextval, :P6_ENAME, :P6_SAL, :P6_DEPTNO);
commit;
end;
and button CREATE.
Create Process is fired when I push CREATE button and Insert statement works corecctly. Branch is on the same page. (I use request).
Now I would like to show update and delete statements.
In Report I have in column EMPNO standard button Edit (each row)
(<img src="#IMAGE_PREFIX#edit.gif" alt="Edit">)
I have process SelectProcess:
begin
select ename,sal,deptno
into :p6_ename, :p6_sal, :p6_deptno
from emp
where empno = :p6_empno;
end;
It is fired In Load _ Before Header
When I push Edit in one row I would like to see details of employee in Form, but I see nothing. In session state all is correct - I see :p6.... with name, sal and ...
I dont know how to connect this process with buton and branch.
could you help me?

Hi,
I have done a quick test for this - [http://htmldb.oracle.com/pls/otn/f?p=25946:1]
On the Edit page, I have a process called P2_LOAD_DATA that runs "On Load - Before Header", is conditional on P2_EMPNO being NOT NULL and using the following code:
BEGIN
SELECT EMPNO, ENAME, JOB
INTO :P2_EMPNO, :P2_ENAME, :P2_JOB
FROM EMP
WHERE EMPNO = :P2_EMPNO;
END;I have a button with a Button Name setting of "UPDATE" (user sees this as Apply Changes)
I then have a process that runs "On Submit - After Computations and Validations" and is conditional on REQUEST = UPDATE. The code is:
BEGIN
UPDATE EMP
SET ENAME = :P2_ENAME,
JOB = :P2_JOB
WHERE EMPNO = :P2_EMPNO;
END;The source settings on P2_EMPNO, P2_ENAME and P2_JOB are as I described in my previous post.
One thing to check - do you have a "reset page" process? If so, remove it.
Andy

Similar Messages

  • Inserts using Automatic Row Processing (DML)  should not clear cache

    Hi,
    I am using APEX 4.0.1.00.03.
    I created a form on a table for inserts and updates.
    After I do an insert, the Automatic Row Processing (DML) clears cache for all items on the page.
    But the user wants to see the data he inserted without having to query. How can I achieve this?
    Thanks
    Chandra

    There isn't any "reset page" process on my page.
    --Chandra.                                                                                                                                                                                               

  • Automatic Row Processing (DML) process is not updating the record

    Hi all,
    I have an application which was working fine last week and tested and backuped to new application. This Monday, one of the form in that application is not updating the data all of a sudden. I debug that by having page 0 variable and assign the value from the column variable to page 0 variable. Whatever value I changed to the column variable was getting updated to page 0 variable. But it is not updated in the database. So, I changed the success message of the "Automatic Row Processing (DML) process" and I can see the success message on the page, but the column value does not get updated. But when I go back and checked my backup application, that page is working fine. For now, I copy that from the backup application, but I would like to know why this is happening?
    Thanks
    SHY

    Hi Scott,
    Thank you very much for your response. Because of the database complexity, I can't create/import the application on the apex.oracle.com. I am just wondering why this is happening. One of my coworker said same thing happened to her in one of her project and it gets resolved once she restart the server. I am not able to restart the server to check and see if this resolved as the application is on the client server. Do we need to clean up any log file? Thanks.
    SHY

  • Automatic Row Processing (DML) - Return Key Into Item

    Hello,
    This question is on Apex 4.2:
    I'm Displaying the [UNIKEY] column value after the record is inserted into the table using :
    page process > process row table_name > Source: Automatic Row Processing (DML) > Return Key Into Item > "Item Name"
    This works fine while inserting records, my question is why this does not respond on update / delete ?
    ϯ LT

    LT
    Check your branches.
    What might be happening is that on insert and update an other branch is followed.
    Where the branch of the insert either isn't clearing the cache of the page or is setting the item with it's own value.
    The branch on the update on the other hand is clearing the cache of the page and not setting the item.
    With a delete there is a clear cache process generate by the wizard. Check if this process is only running on the delete and not on the update.
    From memory the process is called something with reset.
    If the above doesn't help try to replicate the problem on apex.oracle.com and give access with a guest developer account so we can have a look.
    Nicolette

  • Automatic Row Processing (DML)

    Hello,
    I have an Automatic Row Processing (DML) in a page, but I forgot to add a column in the table where I record the data. So I added the item that I forgot in the page but when I tried to insert the data on the table it shows me this error: ORA-06550: line 1, column 146: PL/SQL: ORA-00904: "PCD": invalid identifier ORA-06550: line 1, column 13: PL/SQL: SQL Statement ignored. I think this is because the column is missing in the "insert query", so I'm wondering how can I add that column in the query... in the automatic row processing it does not show me how can I add that... in the source type in the item that I want to add... I selected Database column.. so the problem is not from there... thanks in advance.
    Regards

    Hi,
    do you mean the "Oracle Employee ACE" icon next to my name? That's not something you can set on your own. Before I joined Oracle I was an Oracle ACE Director which was converted to an Oracle Employee ACE as soon as I started working for Oracle.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Automatic Row Processing (DML) Update problem

    Hi All,
    I am using Oracle 10.2.0.3 on Windows Server 2003 with "Application Express 3.1.0.00.32".
    I have two schemas in the database, A and B
    B has all the tables which holds the production data
    A has all the synonymns for all of B's objects and plus insert, delete, update, execute rights on B's objects.
    I have a view MyView which basically reads from a table from B's schema
    and an APEX form based on this view... so far so good.
    Problem is when I generate a form using form wizard and try to update a record in the table in B's schema, I get the following error: I cannot use B as the OWNER in APEX, because for other reasons, I need to use A.
    Automatic Row Processing (DML)
    ORA-20505: Error in DML: p_rowid=CA-4837-AHU-002, p_alt_rowid=OBJ_CODE, p_rowid2=, p_alt_rowid2=. ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "97813992F558009979B5B86C925AD4AC" application checksum = "FA8AB5EC759780B0048E2C11584CD5E6"
    Does anybody know why I get this error message? Is it possible to update the table using the view? I know for sure that my browser is not caching the data and someone else is not editing the same record.
    Thanks in advance,
    Sinan

    Hi,
    Problem is when I generate a form using form wizard and try to update a record in the table in B's schema, I get the following error: *I cannot use B as the OWNER in APEX*, because for other reasons, I need to use A.As highlighted, you need to grant insert, delete, update, execute rights on B schema's objects to APEX schema. Also, you may need to use "Instead of" trigger for view.
    Regards,
    Mangal

  • Strange behaviour  Automatic Row Processing (DML) process

    Hi all,
    I'm executing a process with a fetch Automatic Row Processing (DML) over a synonym and it works perfectly but when i change the table owner it doesn't work anymore and give the error:
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Unable to fetch row.
    I thought it could be from the permissions of that owner over that synonym so i give it all grants, but still no luck.
    Does anyone knows if there are some limitations for the Automatic Row Processing (DML) process?

    Once again thanks for the reply Munky,
    The original table created on schema1 (ADMGIN) :
    SQL> desc MAN_ALT_TAB
    Name Null? Type
    ALT_ID NOT NULL NUMBER
    ALT_DES VARCHAR2(50)
    AAT_COD NOT NULL VARCHAR2(10)
    ALT_ID_REL NUMBER
    ALT_MUL_REG VARCHAR2(1)
    ALT_FOR_DES VARCHAR2(4000)
    The synonym created in schema2 (PORTAL) :
    CREATE OR REPLACE SYNONYM "PORTAL"."MAN_ALT_TAB" FOR "ADMGIN"."MAN_ALT_TAB";
    Grants on the schema1 (ADMGIN) owner:
    GRANT ALL ON MAN_ALT_TAB TO PORTAL;
    There isn't a new table in the schema2 only a synonym.
    The synonym isn't created in schema1 it was created in schema2.
    Regards Pedro.

  • Automatic Row Processing (DML) using synonym name instead of table

    I want my APEX form to select info using the table name but perform all the DML (add, change, delete) using the synonym name. I created the form using the wizard and went into the "Process Row of xxx" process that was created. I tried changing the table name to synonym name under the 'Source: Automatic Row Processing (DML)' section, but it still uses the table name. Is this possible or do I need to manually create processes using the synonym names

    Hi,
    when I change the Table Name property in the "Automatic Row Processing (DML)" process to a non existing table it raises an error when I run the page and try to save something. So it's actually using the value.
    Does the synonym point to the same table or a different table? What is the intention behind selecting from the table but updating through the synonym?
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com/
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/
    The ApexLib Framework: http://apexlib.sourceforge.net/

  • How to copy a record with an Automatic Row Processing (DML) ?

    Hi,
    I want to duplicate (to copy) a record.
    I have a form, with an Automatic Row Processing (DML), looking for the PK stored into an item named P26_ID and populating the values into the corresponding items of the form.
    I have an Automatic Row Processing (DML) which permit to update, delete and modify the row.
    So far so good.
    I thought it would be good if I calculate a new value for the PK and stored it into the P26_ID.
    Then I thought the Automatic Row Processing (DML) would see that it is a new value for the PK and would "decide" insert a new record.
    But it does not work like that. I thought it was because the item P26_ID is database column type; so I switched to another item named P26_ID_NEW and put this new pk into this item. I then created another Automatic Row Processing (DML), triggered by this button, and which will look into this new item. It does not work either.
    Where do i go wrong ?
    Thank you for your kind help !
    Christian

    Christian:
    Assuming that the 'Duplicate' function is available only when the page is in 'Edit' mode, ie. a record has already been loaded into the form you can do the following to duplicate this record
    1) Define a button named 'Duplicate'
    2) Set the target of this button to be 'URL'
    3) Set the URL for this button to be
    javascript:duplicate();
    4) Add this bit of JS into the page HTML header<script>
    function duplicate() {
    $s('<name_of_PK_page_item>','');
    doSubmit('CREATE');
    </script>Varad

  • Edit SQL generated from Automatic Row Processing (DML)

    Is there any way to see/edit the insert/update SQL that is run when using the "Form with Report" wizard ? I've used the wizard to generate a list of rows from a table, with edit buttons next to each line. The Edit button links to a detail screen where the user can Create/Update/Delete.
    I have NOT NULL fields on each row that are auto-populated using triggers, so they are marked as read only on the Detail screen, but set to Optional since the user is not required (or even allowed) to set them. This works for inserts, but when App Express does an update, it sets the fields to NULL (or so I assume, based on the error message), so the update fails.
    The whole point of using this tool was because the wizards make it so easy to put screens up, I hate to have to write it myself....
    I don't understand why the tool would set the fields to NULL anyway, when they have values already. If all fields need to be updated, it should just update them to their current values. Am I missing something here?

    Well, scratch that. I wrote too fast.
    Tabular form doesn't work either.
    Is there any way to make a non-updatable column updateable AFTER you use the Tabular Form wizard?
    Is there any way to allow the user to define the Primary Key? I've tried to make the field updateable, or even just show it, but the system does not hold my changes on save.

  • How to get the new Primary Key after the Automatic Row Processing (DML)

    Hi,
    I have a nice master detail form.
    I want, immediately after submitting the page when creating a new record in the master table, that the user may input the associated table (the detail table). For that I have created a branch that goes back to the very same page after creating the record (ie submitting the page with the button Create). In the Action of the branch, i have put P30_FICHE_ID (the item containing the primary key of the master table) with its value : &P30_FICHE_ID.
    Unfortunately I see that the item is not populated with the very new primary key. it seems normal becaus after submitting the page the tiem is not populated. This is my question : how to retrieve the newly created primary into the item P30_FICHE_ID in order to begin immediately to add rows to the detail table ?
    Hope I'm clear. My english not perfect.
    Thank you for your kind help !
    Christian
    Edited by: Christian from France on Oct 16, 2009 6:36 AM

    Christian,
    After creating Master-detail form, goto your Detail page. In this page you can see one conditonal brach which will point to 'Master' page.
    Edit this branch and here you can see this branch fires when request is in 'SAVE,DELETE,CREATE' (in Expression1). Now change the value in Expression1 to 'SAVE,DELETE'. This will do the needful :-)
    Cheers
    Hari
    Edited by: Hari_639 on Oct 16, 2009 8:02 PM

  • Processing Static (via automatic row processing) & Dynmaic fields

    Hi,
    I have a page that has 2 sections. Section S is statically driven which I'd like to process via a Automatic Row Process DML. Section D is for dynamic fields which I process via a PL/SQL script.
    I need to process Section D (dynamic) first.
    Now they're 2 things that I'm noticing when I try this. Can someone please confirm.
    - After my process of Section D it seems to make a commit. I know this since I have a error in Section S, and the values from Section D are committed to the DB. I need to make sure a commit only occurs after all page processes have completed error free.
    - My Automatic Row Process DML for Section S doesn't seem to work at all. It can't seem to read the values at all. I know this since I have several columns which are "NOT NULL" and the appropriate error messages are being raised. The Automatic Row Fetch for Section S does work properly.
    For the time being the work around is writing a process for the entire page which includes both Section S and Section D. The thing is I thought that HTMLDB would be able to help me out a lot with Section S since it had static fields etc.

    Martin - I would try to debug these two processes separately. If the Auto DML process isn't firing, perhaps the button used to submit the page isn't setting the request to one of the standard values recognized by the Auto DML package ('INSERT','CREATE','CREATE_AGAIN','CREATEAGAIN' for inserts and 'SAVE','APPLY CHANGES','UPDATE','UPDATE ROW','CHANGE','APPLY' or like 'APPLY%CHANGES%' for update).
    A commit happens whenever session state is changed, so if your process saves an item value, that would do it. If you think that is not the cause of the commit, let me know the details of the process and I'll take a closer look. There is no way to prevent the commit when session state is updated.
    Scott

  • No automatic row fetching (DML)

    All,
    I want to generate a process which fetches my rows automatically.
    I've done this before several times.
    But now my new process is not fetching rows.
    I don’t get an error message, the text fields are just empty.
    During creating the new process I see an empty LOV
    for field ‘Item Containing Primary Key Column Value’
    in section ‘Source: Automatic Row Processing (DML)’
    although there are about 7 items (text fields) at this page.
    Any help appreciated,
    lucio

    Lucio:
    I think you need to set the 'Source Type' attribute of the form fields to be 'Database Column' and in the 'Source value or Expression' field provide the database column to which the page item corresponds to.
    varad

  • Solved: Delete Using Automatic Row Processing

    See Scott's reply below for the answer.
    Hi there,
    I have an application built in APEX 3.0.1 that I would like to be able to use a button to delete a single row from an underlying database table (owned by the parsing schema).
    My APEX page has a 3 HTML regions on it:
    1. Only a Select List and Go button for User selection (of Debit Note)
    2. Ten display Items (Text Field, Disabled saves state) displaying further information about User selection
    3. Conditional Delete button (region with custom image) - only displays when P73_DEBITNOTEID is NOT NULL
    I'd like this button to be used to Delete the Selected Item and thought I'd be able to use a Data Manipulation Page Process - Automatic Row Processing (DML) page process to do this.
    However, when I go through the wizard the Select item containing primary key column value field has no values in the search list.
    My first question is why was there no values in the list?
    So I manually entered the Item I required (P73_DEBITNOTEID) but when I run the page and click the button I get a PL/SQL missing expression error.
    What is the best practice method to do DML actions on the underlying database tables. The tables are all owned by the parsing schema.
    Your help in resolving this matter would be greatly appreciated.
    Kind Regards,
    Gary.

    Gary,
    The DML processes (and the creation wizards for them) are for use with items having source type Database Column. If your page items don't use this source type, then neither the Automated Row Fetch nor the Automatic Row Processesing (DML) process types will work.
    Scott

  • Automatic Row Processing and Casade Delete

    I have Automatic Row Processing for delete on a table, however I have FK's dependent on this table. How do I do a cascade delete using Automatic Row Processing DML for a delete ?
    Any way besides writing a trigger ?

    My fault, my constraint was not written properly to indicate on delete cascade.

Maybe you are looking for

  • Can't synch videos to ipod

    i have a 5th gen ipod, i recently switched computers from windows to a mac. I've synched my music and photos, however my ipod won't recognise mp4 films other than the ones i've purchased from itunes. Does anyone know how to resolve this ?. Thanks.

  • How to get PS to recognize my Epson scanner

    I have PS CS4 for Mac (running Snow Leopard), and am trying to figure out how to Import or scan something into PS.  With my Windows machine I used to use Epson TWAIN from the Import menu.  The only Import options I have on my Mac version are: Video F

  • Does the Intel have problems with flip4mac?

    Hi, I have a new intel Core 2 duo iMac and there are two websites that I cannot view flip4mac plugsin on but I can on all other websites. My powerpc eMac can view the websites (videos) that I can't view on my iMac and both of my computers have the ex

  • Reg completion of PI sheet

    Dear all, When  should  we complete a PI sheet in a process order. Thanks in advance

  • Mac Mini G4 with Photoshop CS2

    I have a Mac Mini G4 512 MB of Ram. I want to get Photoshop CS2. Has anyone experienced slow response or issues with Photoshop CS2 on a Mac Mini G4?