Error frm-40735 ora-01422

Hi,
I have two tables:
dept(
dept_name VARCHAR2(10),
dept_info VARCHAR2(10),
CONSTRAINT dept_pk PRIMARY KEY (dept_name)
location(
loc_name VARHCHAR2(10),
loc_info VARCHAR2(10),
dept_name VARCHAR2(10),
CONSTRAINT loc_pk PRIMARY KEY (loc_name),
CONSTRAINT loc_fk FOREIGN KEY (dept_name)
REFERENCES dept (dept_name)
dept has the values ('dname1', 'dinfo1'), ('dname2', 'dinfo2'), ('dname3', 'dinfo3')
location has the values ('locname1', 'dname1', 'linfo1'), ('locname2', 'dname2', 'linfo2'), ('locname3', 'dname2', 'linfo3'), ('locname4', 'dname3', 'linfo4'), ('locname5', 'dname3', 'linfo5'),
I have a data block based on the location table. I also have a command button with the WHEN-BUTTON-PRESSED trigger:
BEGIN
SELECT loc_name, loc_info
INTO :DATABLOCK.LOC_NAME, :DATABLOCK.LOC_INFO
FROM location
WHERE dept_name = :DATABLOCK.DEPT_NAME;
END;
If I try to do a search for a dept_name that has only one value in location, the Form will work properly and retreive that row. However, if I do a search for a dept_name that has two or more values in the table, I get the FRM-40735 ORA-01422 ERROR. I can tell that the Form will not allow me to retreive more that one row at a time, but what is a way that I can retreive more than one row at a time? I have set the datablock to Tabular and display 10 records, so it could retrieve the right amount of rows. Please help.

I have a data block based on the location table.So do you want to show all the locations in that block which match the given DEPT_NAME ?
If your block is based on the location-table you would just set the WHERE-condition on that block and do a requery, there is no cursor needed for that, so try the following code in your WHEN-.BUTTON-PRESSED-trigger.
SET_BLOCK_PROPERTY('LOCATION', ONETIME_WHERE, 'dept_name=' || DATABLOCK.DEPT_NAME);
EXECUTE_QUERY;If you have to use a select to do something other with the result than populating the block, then for a select returning more than one row, you have to use a cursor, something like:
DECLARE
  CURSOR crDept IS
    SELECT loc_name, loc_info
      FROM location
    WHERE dept_name = :DATABLOCK.DEPT_NAME;
BEGIN
  FOR rec IN crDept LOOP
    IF :SYSTEM.RECORD_STATUS!='NEW' THEN
      CREATE_RECORD;
    END IF;
    :DATABLOCK.LOC_NAME:=rec.LOC_NAME;
    :DATABLOCK.LOC_INFO:=LOC_INFO;
  END LOOP;
END;

Similar Messages

  • Filling datarows before creating a new record  frm-40735 ora-01422

    Hello
    I want to create a user-control table where I Store in the Mastertable the user informations. in the 2 detail tables I store the programmnames of the first level, in the second table I store the name of the form and if the user is allowed to insert, amend or delete.
    I use a Master/2 Detail-Form. When I create a new record in the master block, I want to fill in the first and second detail block, informations of another user of the 2 detail tables. therefore I created a when-new-block-instance trigger with the following code:
    select programm
    into :k_zugriff.Programm
    from k_zugriff, K_benutzer
    where r_benutzer_zaehler=k_benutzer.zaehler
    and oracle_user='ROBERT';
    because this sql serves more than one row I receive the error code frm-40735 ora-01422
    so how could I solve the problem to insert 5-10 rows in :k_zugriff.Programm. I can not make an insert before I go to the block k_zugriff, because the user number is not commited known. Also I want to commit the form when all informations are filled in. in case of a mistake I want to exit the form with no commit;
    has anyone a usefull Idea?
    regards
    robert

    it works thank you. where can I get further information about this technik. are there any turtorials or something where I get information how to build this complex forms??
    right statement
    DECLARE
    CURsOR cr IS
    select programm
    from k_zugriff, K_benutzer
    where r_benutzer_zaehler=k_benutzer.zaehler
    and oracle_user='ROBERT';
    BEGIN
    FOR rec IN cr LOOP
    IF :SYSTEm.RECOrD_STATUS!='NEW' THEN
    CREATE_RECORD;
    END IF;
    :k_zugriff.Programm:=rec.PROGRAMM;
    END LOOP;
    END;

  • Error frm-40735 ora-01403

    I read that this is a general purpose error for Forms, but I couldn't find an answer for my situation. I have a datablock based on a view, and a command button that has a trigger for selecting values into the block where one of the blocks fields matches those records. Here is the pl/sql code for the button's when-button-pressed trigger:
    BEGIN
    SELECT VIEW.ATTRIBUTE1, VIEW.ATTRIBUTE2
    INTO :DATABLOCK.TEXTFIELD1, :DATABLOCK.TEXTFIELD2
    FROM VIEW
    WHERE :DATABLOCK.TEXTFIELD = VIEW.ATTRIBUTE3;
    END;
    When I try to run this in Forms, I get the Error frm-40735 ora-01403. I can run similar code from SQL Plus. I would really appreciate some help.
    regards

    Let me give a better example: If I have two tables:
    create table dept (
    dept_no NUMBER,
    dept_name VARCHAR2(10),
    CONSTRAINT dept_pk PRIMARY KEY (dept_no)
    create table Location (
    loc_no NUMBER,
    loc_name VARCHAR2(10),
    dept_no NUMBER,
    CONSTRAINT loc_pk PRIMARY KEY (loc_no),
    CONSTRAINT loc_fk FOREIGN KEY (dept_no)
    REFERENCES dept(dept_no)
    and I create a master-detail form between the two. If I try to search by the loc_name, with the two tables joined by the master-detail, and have a trigger on a command button with the code:
    BEGIN
    SELECT d.dept_no, d.dept_name
    INTO :DEPARTMENT.DEPT_NO, :DEPARTMENT.DEPT_NAME
    FROM Location l, Dept d
    WHERE :LOCATION.LOC_NAME = l.loc_name;
    END;
    why do I encounter the error?

  • Error FRM-40735, ORA-04062 While Making Payments

    Hi, while making payments it raised following errors:
    FRM-40735:POST-FORMS-COMMIT trigger raised unhandeled exception ORA-04062these are steps in navigation:
    invoice >> action 1...pay in full>>>payment method (bill payables)
    does anyone know how to overcome this error ??
    thx

    Was this working before? If yes, any changes been done recently?
    Do you have any invalid objects in the database?
    Please see these docs.
    Receipts Workbench Error: Listing of ORA Errors [ID 1364345.1]
    Receipts Workbench Error: Listing of FRM Errors [ID 1361887.1]
    Thanks,
    Hussein

  • FRM-40735 / ORA-01422

    Hello
    i have the following:
    CREATE TABLE INSP_EQUIPMENT_TYPE
      EQUIPMENT_TYPE_D  NUMBER(11)                  NOT NULL,
      EQUIPMENT_TYPE    VARCHAR2(50 BYTE)           NOT NULL,
      PRIORITY_ID       NUMBER(11)                  NOT NULL,
      PARENT_ID         NUMBER(11),
      LICENSE_FLAG      CHAR(1 BYTE)                NOT NULL,
      BEND1             VARCHAR2(30 BYTE),
      BEND2             VARCHAR2(30 BYTE),
      CLASS_ID          NUMBER(11)
    ALTER TABLE INSP_EQUIPMENT_TYPE ADD (
      CONSTRAINT INSP_EQUIPMENT_TYPE_PK PRIMARY KEY (EQUIPMENT_TYPE_D);
    ALTER TABLE INSP_EQUIPMENT_TYPE ADD (
      CONSTRAINT CLASS_ID_FK FOREIGN KEY (CLASS_ID)
        REFERENCES INSP_CLASS (CLASS_ID));
    ALTER TABLE INSP_EQUIPMENT_TYPE ADD (
      CONSTRAINT INSP_FK35 FOREIGN KEY (PRIORITY_ID)
        REFERENCES INSP_EQUIPMENT_PRIORITY (EQUIPMENT_PRIORITY_ID));from 1 single record insertion i got the above error.
    Regards,
    Abdetu..

    Sorry i didn't ..
    Well the stranger i have no Trigger on that datablock or the table.
    i have the only trigger on my form that displays the message from a table that have the common FRM messages that may be handeled.
    Any way the following is in ON-MESSAGE Trigger:
    DECLARE
         TEMP NUMBER;
         TEMP1 NUMBER;
         alert_result number;
         alert_message varchar2(200);
    begin
         TEMP1 := message_code ;
         select count(*)
         into   temp
         from   cde_message
         where  msg_code = temp1;
         If temp = 0 then
              alert_message := message_type||'-'|| To_Char(message_code) || ': ' || message_text;
         else
              select msg_desc
              into   alert_message
              from   cde_message
           where  msg_code = temp1;
         end if;
         Set_Alert_Property ('NOTE',ALERT_MESSAGE_TEXT,alert_message);
         alert_result := Show_Alert('NOTE');
    end;Got the following Error
    On message Trigger FRM-40735 caused unhandeled exception.ORA-01422
    Regards,
    Abdetu..

  • Error FRM-40735 , ORA-01438

    Hi,
    In my form, for the Master-Details Data Block, the DML source is Procedure,
    For eg, the DetailsBlock name is "Files", and given below is the procedure to update that block. I have two doubts regarding to it,
    1. When user click Save button , i want to execute this procedure for all the records, now it is updating only one row, because of dmlset(1) (how should i do loop, I am new baby).
    2. Insert into TableA query is not executing, i am getting the error ORA -01438
    Scenario is :
    The datas are loaded into block from TableA and TableB.If the value of the column VALIDREJECTION is "InValid" then that row shoube be updated in the TableA, if it is not in TableA, then it should be inserted to TableA. That is TableB contains all records(both Valid & InValid) , but TableA contains only records with VALIDREJECTION ='InValid"
    My Procedure is :
    procedure filesUpdate(dmlset in out disputeFiles_tab) is
    cursor c_files is
    select FILEID
    from TableA
    where FILEID=dmlset(1).FILEID;
    tempout TableA.fileid%type;
    begin
    if dmlset(1).VALIDREJECTION='Valid' then
         DELETE FROM TABLEA WHERE FILEID=dmlset(1).FILEID;
    else
    --if Valid changed to InValid and updated, then it should be inserted
    open c_files;
    fetch c_files into tempout;
    IF c_files%NOTFOUND then
    insert into TableA(FILEID,VALIDREJECTION,USERID)
    values(dmlset(1).FILEID,dmlset(1).VALIDREJECTION,
    dmlset(1).USERID);
    ELSE
    update TableA
    set FILEID=dmlset(1).FILEID,
    VALIDREJECTION=dmlset(1).VALIDREJECTION,
    USERID=dmlset(1).USERID,
    where FILEID=dmlset(1).FILEID;
    END IF;
    close c_files;
    end if;
    end;
    Thanks in Advance ,
    bye bye

    Hi,
    From oracle error documentation...
    ORA-01438: value larger than specified precision allowed for this column
    Cause: When inserting or updating records, a numeric value was entered that exceeded the precision defined for the column.
    Action:     Enter a value that complies with the numeric column's precision, or use the MODIFY option with the ALTER TABLE command to expand the precision.
    May be you are trying to enter CHAR value to NUMBER field.
    Check it out!

  • FRM-40735 ORA-01476

    I wrote this line in formula
    (:stot1+ :bottomcost.cmt1+ :bottomcost.cf1+ :bottomcost.oh1+ :bottomcost.ins1+ :bottomcost.naf1 + :bottomcost.com1) / nvl(:exc_rate,0)
    and there is no 0 Value but when I execute query then return this error
    FRM-40735
    ORA-01476

    I wrote this line in formula
    (:stot1+ :bottomcost.cmt1+ :bottomcost.cf1+
    :bottomcost.oh1+ :bottomcost.ins1+ :bottomcost.naf1 +
    :bottomcost.com1) / nvl(:exc_rate,0)
    and there is no 0 Value but when I execute query then
    return this error
    FRM-40735
    ORA-01476Never use / nvl(:exc_rate,0)
    If :exec_rate is null then you will get that error. Instead you use / nvl(:exc_rate,1) so if your divisor is = to zero you will return the value itself without dividing.
    Regards,
    Tony

  • Forms6i : FileUpload error FRM-40735

    Hi,
    I try to run the FileUpload demo on Solaris, and I get stuck with the error FRM-40735, ORA-105100 (WHEN-BUTTON-PRESSED trigger)
    I already read everything concerning this problem in this forum, but I don't know how to check my configuration.
    I read somrthing about "import java classes" but I obtained an error about Jvm.
    I also get this error on the server : "Could not load library libzip.so"
    My config is :
    server side : Solaris 8, ias9i, forms6i (6.0.8.24)
    client side : Windows XP pro, IE with Jinitiator 1.1.8.22
    I would appreciate any help...
    Thanks a lot

    Hi,
    The problem seems to require proper analysiz. I suggest customer support at metalink.oracle.com
    Frank

  • FRM-40735 & ORA-06544 errors

    Hello Friends,
    I have installed oracle database 9iR2 and 10gR2 on my windowsXP system When I run the Dynamic_build form through Dynamic_build form using the oracle 10g connection the form runs correctly but if I am connected to database 9i with the same forms it gives me the error
    Frm-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA-06544
    I am using forms 10gR2.
    Thanks
    Hardip

    From Oracle Database Documentation you'll get the following message:
    ORA-06544 PL/SQL: internal error, arguments: [string], [string], [string], [string], [string], [string], [string], [string]
    Cause: A PL/SQL internal error occurred.
    Action: Report as a bug; the first argument is the internal error number.
    I suppose you are performing some query which causes this error in 9i. You can verify this when performing this query also in sqlplus connected to your 9i Database.
    To Avoid this Error you'll probably get the advice from OSS to update your database to 9iR2 in minimum.
    regards

  • ERROR FRM-40735 while migrating from 6i to 9i using FMA

    Hi,
    We have migrated a sample form which is in 6i to 9i using Oracle Forms Migration Assistant. It is compiling without errors and while running hitting the error
    FRM-40735:PRE-FORM trigger raised unhandled exception ORA-06508.
    and not opening up the form...Please post any suggestions on this.
    madhu.

    Thank you very much for the help...I could resolve it by just adding the appropriate pll's in forms90 folder.
    Now, we are trying to implement the calender in forms 9i. As we are moving from Forms 6i C/S to Forms 9i, as a first step I've implemented calender in web forms 6i (using demo's in oracle doc's--using CalenderWidget Bean)
    I tried doing the same for Oracle 9i too but it didn't work..I mean it is deleting the code for the trigger
    WHEN_CUSTOM_ITEM_EVENT which is written for Bean.
    Please suggest me regarding how to proceed with this...
    thank you
    madhu.

  • SOLVED -- FRM-40735: ORA-06508 when callin RP2RRO

    Hi ,
    we made change to the call of the reports when migrating to 10gr2.
    in a when button pressed i receive the error FRM-40735: trigger raised unhandled exception ORA-06508 whe making a call to rp2rro.rp2rro_run_product.
    I've checked the forms path and seems to be ok the rp2rro.plx is reachable.
    I don't understand ???
    Any suggestion?
    Thanks
    JeanYves
    Message was edited by:
    JeanYves

    Hi Christian,
    You're rigth with the attachment.
    What is strange is that a collegue made a prototype whith rp2rro compiled and it works.
    Perhaps did he made the attachement by himself so that the name of the file location was rp2rro instead of rp2rro.pll.
    I have made a test whith a simple form calling rp2rro_run_product.
    The attachment said that rp2rro.pll is attached.
    when I place rp2rro.pll in the forms path then I have ORA-06508 but when I place rp2rro.plx then it works ! Also when I place both the plx and pll files.
    But for the others fmbs it does not work.
    Let's say another thing. the call to rp2rro is made not directly in the form but in another attached pll ( which have itself rp2rro.pll attached)
    FYI : in the forms_path i have first the pll location then after the fmb location.
    Is there an preferable order ?
    Or is there an order to compile first pll or first fmb?
    I really don't understand what goes on here. ???
    Thanks
    JeanYves

  • FRM-40735 / ORA-06508 when calling an attached package's procedure

    Hello all,
    I've a problem when calling a procedure in one of my attached libraries. the code is :
    when upper(trim(NOT_MSG_NAME)) = 'REN_MSG_REQ_REG_PERMENANT' then SERV.CLFRM_PBL_NRQP_F(:Parameter.NOTIFICATION_ID);
    and it gives me FRM-40735 stating that an ORA-06508 has occurred when calling the procedure.
    Important and funny thing is, when I add the path to the library , It works fine!
    When I attach it, removing the path, It goes wrong like I said..
    the location of the library is:D:\DevSuiteHome\cgenf61\ADMIN , the path is added in FORMS_PATH and all the other
    libraries attached to the form in the same path are working fine !
    I'm using forms builder 10.1.2.0.2, and the platform is windows and I've migrated from forms 9.0.4.0.19
    anybody having any ideas what the problem may be?

    Thank you Sarah
    In fact, somebody had modified the formsweb.cfg adding two working directory directives (It's a shared PC!). I recon none of them works though no configuration error is raised. I omitted both of them and the problem is gone .
    thank you again.

  • ERROR FRM-40735

    Hi,
    I'm using Oracle Forms 10.1.2.0.2 (10g).
    I'm using client_get_file_name function to get the filename and using webuitl.pll library files and simple code written in when-button-pressed trigger,
    DECLARE
    INPUT client_TEXT_IO.FILE_TYPE ;
    L_FILE_NAME VARCHAR2(50);
    BEGIN
    L_FILE_NAME := client_GET_FILE_NAME('C:\',NULL,'PDF Files (*.PDF)/*.PDF/',NULL,OPEN_FILE,FALSE);
    :TXT_DESTN_NAME := L_FILE_NAME;
    END;
    and i'm getting the error is
    FRM-40735 : when -button-pressed trigger raised unhandled exception-ORA-06508
    Thanks in advance

    Hello sir,
    When i complie webutil.pll file.Its gives errors like
    identifier WEBUTIL_DB.OPENBLOB must bedclared
    identifier WEBUTIL_DB.CLSOEBLOB' must bedclared
    in thePACKAGE BODY WEBUTIL_DB_LOCAL.
    But WEBUTIL_DB package is not in the webutil.pll
    thanks in advance

  • Sir how I avoid I this error FRM-40735: POST-QUERY trigger raised unhandled

    Hi master
    Sir this error crate may problem for me
    FRM-40735: POST-QUERY trigger raised unhandled exception ORA-01403
    sir how I avoid I this error and show my message
    or system not show this error and bypass this error
    please send me code how I avoid this error
    thanks
    aamir

    There may be many causes of this error. You better diagnose and remove them.
    1- A field length may be less than what your query return a data into it.
    2- A POST-CHANGE trigger on any data may return un-desired data (character into numrice field, longer value than a field etc).
    likewise.
    Regards
    Sayeed
    [email protected]

  • ORA-04103,FRM-40735,ORA-04062.

    Hi Expert ,
    how can resolve following error.
    After refresh the clone by prod backup ,the i have faced problem at ap module at front end level
    i have got following error
    1. FRM-40735: WHEN-CREATE-RECORD trigger raised unhandled exception ORA-04062.
    2. ORA-04103: no data found--------On click Pay In Full
    3. An Unexpected Error-4062 has occured, An alert has been sent to the system administrator,
    ORA-04103: no data found
    FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-04062.

    Please post the details of the application release, database version and OS.
    how can resolve following error.
    After refresh the clone by prod backup ,the i have faced problem at ap module at front end level
    i have got following error
    1. FRM-40735: WHEN-CREATE-RECORD trigger raised unhandled exception ORA-04062.
    2. ORA-04103: no data found--------On click Pay In Full
    3. An Unexpected Error-4062 has occured, An alert has been sent to the system administrator,
    ORA-04103: no data found
    FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-04062.Is this issue with all forms or specific ones only? If the latter, please post the form name/version and the navigation path.
    Please confirm that you have no invalid objects in the database and you have no errors in the database log file.
    Have you tried to regenerate the form manually or via adadmin and see if it helps?
    Thanks,
    Hussein

Maybe you are looking for

  • PDF size in Acrobat X

    I'm running CS6 and Acrobat X. I have simple, vector, 2-color business cards on an 8.5 x 11 sheet of paper. When I create a pdf, the file size is 2MB when it should only be about 100k or so. I'm noticing this with all my pdfs, no matter which format

  • Pagination Issue

    Hi Guys, I am trying to solve a pagination problem for my friend. He runs an antiques business, and wants to be able to select different items from a dropdown menu, which when listed are paginated so that they do not appear all on one page. I have do

  • Battery serial number on my mac

    recently I've given my macbook pro for harrdisk repair and after I took it back my battery doesn't last as long as it use to. I have a suspicion that they have kept my original battery and replaced it with an older one. is there any way you could tra

  • Bold 9700- software coming up as Sony erricson x10!

    Hi there I am really hoping you can help me. I have the bold 9700, purcahsed in the UK. I have installed software on laptop etc, and when i connected the Bold to the laptop it is recognising that it is a blackberry but when i went onto media files to

  • Terminal & mysql

    I have the GUI tools for mysql and have no problem creating and accessing databases through these tools, but I am unable to do anything with mysql through the terminal window. As a novice with the terminal and unix were should I start as no mysql com