Error message in PL/SQL

Hi,
I've created a PL/SQL process source (on load - before header) which counts the records of a table.
If the number of records is 1 or less the values of the table are to be inserted in the text fields of my HTML form. If there is more than one record in the table I'd like to display an error message that the text fields can't be edited. How can I realize this error message in PL/SQL?
Thanks in advance.
Mark

1.) Create a hidden item on your page.
2.) In your Page Rendering PL/SQL Process add logic which assigns 'EDIT' or 'NO_EDIT' to the hidden item.
3.) Create a "Message" HTML region which conditionally displays based of the value of your hidden item being 'NO_EDIT'.
4.) Make your edit field conditionally Read Only based on the value of your hidden item being 'NO_EDIT'.
There may be an easier way but I got this to work
Mike

Similar Messages

  • Error messages in Pl Sql developer are in those funny characters

    Hi,
    Can someone help me on how to change the erroe messages to english in Pl Sql developer? when I run a query in pl sql developer the error messages gives the error code and those characters.
    thanks.
    Edited by: 848824 on Mar 30, 2011 11:45 PM

    hi
    u can try something like this.
    EXCEPTION
       WHEN invalid_number OR STANDARD.INVALID_NUMBER THEN
          -- handle the error
    END;OR
    RAISE FORM_TRIGGER_FAILURE;hope this helps u....
    sarah

  • 30EA3 SQL Developer 3 error message while migrating SQL sever database

    I was mirating a SQL sever 2005 database to Oracle 11g, and got the following error message during the process:
    "Migration action have failed. Check the migration reports for Detail. :null".
    After the error message, I could see the "Captured Database Objects" and "Converted Database objects" under the "Migration Projects". However, if I open the generated scripts, it only contains the fowlloing, nothing else:
    "SET DEFINE OFF;
    PROMPT Creating User Emulation ...
    CREATE USER Emulation IDENTIFIED BY Emulation DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
    GRANT CREATE SESSION, RESOURCE, CREATE VIEW, CREATE MATERIALIZED VIEW, CREATE SYNONYM,CREATE PUBLIC SYNONYM TO Emulation;"
    What's the cause of this problem, please advice. Thanks.
    Bob

    Hi Bob,
    The next thing in the generation script should have been the definition of the sqlserver_utilities package.
    This package emulates some of the system functions found in SQL Server.
    It gets placed into your converted model as the very last step of the conversion.
    Building the generation script (where your failure happened) is straight forward and I wouldn't expect an error here.
    I would guess something went wrong during the capture or conversion and is only surfacing during the generation phase when it tried to write the sqlserver_utilities package to the generation file.
    I could be wrong, but I would manually check that conversion completed successfully first.
    1) Browse you converted model under
    Migration Projects "Nav" : Projects > YourProjectName > YourModelName(default a date)> Converted Database Objects > Procedures > YourProcName
    a) Are there any red crosses on any of these nodes in your navigator ?
    b) If you right click on a converted database name is "reconvert" grayed out or available?
    c) run the following in the SQL Worksheet against the same connection you used for the migration repository
    select * from md_packages;
    Is there one row there with the definition of sqlserver_utilities in its package_header and native_sql columns?
    Also do you have anything in the capture issues, conversion status or conversion issues reports (double click you project and the migration reports should pop up on the right hand side, each report a separate tab) ?
    Just trying to pinpoint what happened here.
    Thanks for your feedback,
    Dermot
    SQL Developer Team.
    Edited by: Dermot ONeill on Feb 16, 2011 2:48 PM

  • The error message when wrapping sql scripts

    the following is my code for testing the function of wrapper:
    CREATE OR REPLACE PROCEDURE testproc
    p_gydm varchar2,
    p_ret out number,
    p_msg out varchar2
    IS
    BEGIN
    p_ret := 10;
    p_msg := 'testing code completed';
    END TESTPROC;
    SHOW ERROR;
    i save it as test.sql,when i wrapped it like that:
    wrap iname=c:\test
    the error message is:
    kgepop:no error frame to pop to for error 1801.
    what's the problem.Thanks.
    dart lee

    You need to run it from the operating system prompt, not the SQL prompt, and you need to specify the full path. For example, I saved your script to a file named test.sql in my c:\oracle81\bin directory, then successfully ran the following from the c:\> DOS prompt:
    C:\>wrap iname=c:\oracle81\bin\test
    Alternatively, you can run it from the SQL prompt, using the HOST command. I also tested this succesfully:
    SQL> HOST wrap iname=c:\oracle81\bin\test
    Using either method above, it produced the following wrapped file, in the following directory, by default, because I did not specify an output file:
    c:\oracle81\bin\test.plb

  • Error message when installing SQL Server 2014 Express

    When installing SQL Server 2014 Express,
    I get the error shown below.
    Why do I get this and how to correct for it?
    TITLE: Microsoft SQL Server 2014 Setup
    The following error has occurred:
    An error occurred during the installation of assembly 'Microsoft.VC80.MFC,version="8.0.50727.4027",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'. Please refer to Help and Support for more
    information. HRESULT: 0x80070422. 
    For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0xDF039760%25401201%25401
    BUTTONS:
    OK
    Thanks

    Hi,
    here is the log file:
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2068052081
      Start time:                    2015-04-14 10:25:00
      End time:                      2015-04-14 10:38:21
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for Adv_SSMS:        Use the following information to resolve the error, and then try the setup process again.
      Next step for Conn:            Use the following information to resolve the error, and then try the setup process again.
      Next step for SDK:             Use the following information to resolve the error, and then try the setup process again.
      Next step for BC:              Use the following information to resolve the error, and then try the setup process again.
      Next step for SSMS:            Use the following information to resolve the error, and then try the setup process again.
      Next step for SQLEngine:       Use the following information to resolve the error, and then try the setup process again.
      Next step for Replication:     Use the following information to resolve the error, and then try the setup process again.
      Next step for Browser:         Use the following information to resolve the error, and then try the setup process again.
      Next step for ComponentUpdate: Use the following information to resolve the error, and then try the setup process again.
    Machine Properties:
      Machine name:                  BRENDA-PC-HOME
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   italiano (Italia)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered  Configured
    Package properties:
      Description:                   Microsoft SQL Server 2014 
      ProductName:                   SQL Server 2014
      Type:                          RTM
      Version:                       12
      SPLevel:                       0
      Installation location:         C:\Users\Brenda\Downloads\SQLEXPRWT_x64_ENU\x64\setup\
      Installation edition:          Express
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      true
      AGTSVCACCOUNT:                 NT AUTHORITY\SERVIZIO DI RETE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    true
      ENU:                           true
      ERRORREPORTING:                false
      FEATURES:                      SQLENGINE, REPLICATION, CONN, BC, SDK, SSMS, ADV_SSMS
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    SQLEXPRESS
      INSTANCENAME:                  SQLEXPRESS
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  Latin1_General_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQL$SQLEXPRESS
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           Brenda-PC-Home\Brenda
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      UpdateEnabled:                 true
      UpdateSource:                  MU
      USEMICROSOFTUPDATE:            true
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       Client Tools Connectivity
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       Client Tools SDK
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       Management Tools - Basic
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       SQL Browser
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
      Feature:                       Setup Support Files
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Setup Support Files
      Component error code:          1935
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SqlSupport_Cpu64_1.log
      Error description:             An error occurred during the installation of assembly 'Microsoft.VC80.ATL,version="8.0.50727.6229",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information. HRESULT: 0x80070422.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=SqlSupport.msi%40CreateShortcuts%401935%3a0x80070422
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20150414_102458\SystemConfigurationCheck_Report.htm

  • Error Message from Microsoft SQL Server Management Studio

    I have problem editing the views that I created.  I never have this problem before and I don't know if
    I have touched something on the pane that alters my viewing on Microsoft SQL Server Management Studio.  For example, if I want to edit the top 200 rows of my view called dbo.sl_admission_reg9, it will give me this error:
    Invalid prefix of suffix characters (MS Viual Database Tools).
    Please help.
    Thank you very much.
    Sally

    Are you trying to edit the top 200 rows of a SQL Server 2012 database using the 2008 R2 SQL Server Management
    Stud? If so you just need to upgrade SQL Server Management Studio to 2012 or edit the rows using a SQL query.
    [Personal Site] [Blog] [Facebook]

  • Where is SQL*Loader error message in oracle 8i documentation?

    I have error message which is SQL*Loader-522: lfiopn failed for
    file (D:\xiaw\Badfiles\faculty_info.BAD). I can't find the
    solution from oracle 8i documentation. Can someboday help me?
    Thanks
    wei

    Wei:
    They're in Chapter 24 of the Error Messages manual:
    SQL*Loader-00522 lfiopn failed for file (string)
    Cause: LFI failed to open the file.
    Action: Check for any possible operating system errors and/or
    potential memory problems.
    Hope this helps.
    Peter

  • Changing SQL error Message

    Hi,
    I want to return a relevant Error Message whenever an SQL Exception occurs. For e.g. If a unique Constraint exists i want to return a relevant message like "A record already exists." Can i do the same?
    Maybe a good feature to have in the next version of Oracle, if it doesnt exist :)
    Regards,

    As 3360 points out, you cannot do this at the sql level (and a good thing too), but if you encapsulate all of your DML logic into packages (which is generally a good thing to do), then you can return wehat ever you want as an error message.
    SQL> CREATE TABLE t (id NUMBER PRIMARY KEY, descr VARCHAR2(10));
    Table created.
    SQL> CREATE PACKAGE t_pkg AS
      2     PROCEDURE ins_t (p_id IN NUMBER,
      3                      p_descr IN VARCHAR2);
      4     PROCEDURE upd_t (p_id IN NUMBER,
      5                      p_descr IN VARCHAR2);
      6     PROCEDURE del_t (p_id IN NUMBER);
      7  END;
      8  /
    Package created.
    SQL> l
      1  CREATE PACKAGE BODY t_pkg AS
      2  null_id EXCEPTION;
      3  no_record EXCEPTION;
      4  PRAGMA EXCEPTION_INIT (null_id, -1400);
      5
      6  PROCEDURE ins_t (p_id IN NUMBER,
      7                   p_descr IN VARCHAR2) IS
      8  BEGIN
      9     INSERT INTO t VALUES(p_id, p_descr);
    10  EXCEPTION
    11     WHEN dup_val_on_index THEN
    12        RAISE_APPLICATION_ERROR (-20001, 'what do u think u r trying to do!!!');
    13     WHEN null_id THEN
    14        RAISE_APPLICATION_ERROR (-20002, 'gimme a break I need an ID');
    15     WHEN OTHERS THEN
    16        RAISE_APPLICATION_ERROR (-20003, 'now I''m really confused');
    17  END;
    18
    19  PROCEDURE upd_t (p_id IN NUMBER,
    20                   p_descr IN VARCHAR2) IS
    21  BEGIN
    22     UPDATE t
    23     SET descr = p_descr
    24     WHERE id = p_id;
    25     IF sql%ROWCOUNT = 0 THEN
    26        RAISE no_record;
    27     END IF;
    28  EXCEPTION
    29     WHEN no_record THEN
    30        RAISE_APPLICATION_ERROR (-20004, 'It''s not there so I''m not doing it');
    31     WHEN OTHERS THEN
    32        RAISE_APPLICATION_ERROR (-20003, 'now I''m really confused');
    33  END;
    34
    35  PROCEDURE del_t (p_id IN NUMBER) IS
    36  BEGIN
    37     DELETE FROM t
    38     WHERE id = p_id;
    39     IF sql%ROWCOUNT = 0 THEN
    40        RAISE no_record;
    41     END IF;
    42  EXCEPTION
    43     WHEN  no_record THEN
    44        RAISE_APPLICATION_ERROR (-20004, 'It''s not there so I''m not doing it');
    45     WHEN OTHERS THEN
    46        RAISE_APPLICATION_ERROR (-20003, 'now I''m really confused');
    47  END;
    48  END;
    49  /
    Package body created.
    SQL> exec t_pkg.ins_t(1, 'One');
    PL/SQL procedure successfully completed.
    SQL> exec t_pkg.ins_t(1, 'One');
    BEGIN t_pkg.ins_t(1, 'One'); END;
    ERROR at line 1:
    ORA-20001: what do u think u r trying to do!!!
    ORA-06512: at "OPS$ORACLE.T_PKG", line 12
    ORA-06512: at line 1
    SQL> exec t_pkg.upd_t(2, 'Two');
    BEGIN t_pkg.upd_t(2, 'Two'); END;
    ERROR at line 1:
    ORA-20004: It's not there so I'm not doing it
    ORA-06512: at "OPS$ORACLE.T_PKG", line 30
    ORA-06512: at line 1
    SQL> exec t_pkg.upd_t(1, 'Way too long for the field');
    BEGIN t_pkg.upd_t(1, 'Way too long for the field'); END;
    ERROR at line 1:
    ORA-20003: now I'm really confused
    ORA-06512: at "OPS$ORACLE.T_PKG", line 32
    ORA-06512: at line 1TTFN
    John
    P.S. 3360, thanks for the IM error message, I just might use it.

  • How to show custom error message in WebADI Excel template?

    Hi,
    I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
    WebADI Interface API Returns is set to  "Error Message".
    I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
    Instead it is showing "SQL exception occurred during PL/SQL upload".
    Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
    TIA
    Narasimha

    The custom API errors are visible in the BNE log but not on the Excel.
    BNE Log=>
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
      at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
      at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
      at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
      at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
    How to show the same error in the excel template?
    Here is the package:
    CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
    AS
       PROCEDURE upload_data (
                              P_CONTAINER_ID IN VARCHAR2
                            , P_SAIL_DATE IN DATE
                            , P_PO_NO IN VARCHAR2                     
                             ) IS
        --declare
        lv_err_msg      VARCHAR2(240);
        lf_err_flag     NUMBER := 0;
        ln_temp         NUMBER;
        BEGIN
        --------------------- checking for mandatory parameters---------------------------
          IF (P_CONTAINER_ID IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
          END IF;
          -------------Validation for Sail Date Format----------------------
          IF (P_SAIL_DATE IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
          ELSE
             BEGIN
                SELECT 1
                  INTO ln_temp
                  FROM DUAL
                 WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
             END;
          END IF;
          -------------Validation for PO_Number----------------------
          IF (P_PO_NO IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
          ELSE
             BEGIN
                SELECT count(1)
                  INTO ln_temp
                  FROM PO_HEADERS
                 WHERE Attribute4 =  P_PO_NO;
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
             END;
          END IF;
         -----------------------Insert Record----------------------------
         IF lv_err_msg is NULL THEN
         BEGIN
             INSERT
              INTO XXP2P_HW_COST_FACTORS_STG
                     CONTAINER_ID
                    ,SAIL_DATE
                    ,PO_NO
                    , ERROR_FLAG
                    , ERROR_MSG
                   ,CREATED_BY
                    ,CREATION_DATE
                    ,LAST_UPDATED_BY
                    ,LAST_UPDATE_DATE
                    ,LAST_UPDATE_LOGIN              
                VALUES
                     P_CONTAINER_ID
                    ,P_SAIL_DATE
                    ,P_PO_NO              
                    ,lf_err_flag
                    ,lv_err_msg
                  ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.LOGIN_ID              
                  --  commit;
                  DBMS_OUTPUT.put_line
                    '-' || 'After ap_invoices_interface'
            EXCEPTION
            WHEN OTHERS THEN
              ROLLBACK;
              lf_err_flag := 1;
              lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
              raise_application_error(-20001, lv_err_msg);
            END;
        ELSE
              raise_application_error(-20001, lv_err_msg);
        END IF;
      END upload_data;                        
    END XXPO_COSTFACTS_WEBADI_PKG;

  • Display error message in forms from function "verify_function"

    Hi,
    We have a number of users with our own created profile attached to them.
    We have enabled the 'PASSWORD_VERIFY_FUNCTION' for our own profile.
    Function "verify_function" is used to validate a user's password.
    In "verify_function" we have used "raise_application_error" message in case password validation fails.
    Example:
    raise_application_error(-20001,'Password must be minimum 8 characters in length and maximum 30 characters long');Question) "raise_application_error" displays the error message only in SQL Plus prompt. How do I display the same message from Oracle forms?.
    I have used DBMS_ERROR_TEXT & DBMS_ERROR_CODE in ON-ERROR trigger. This is not displaying the error message in forms in case validation failed in "verify_function". Oracle simply clears the username/password field with a new window. We want to display the error message that occured in "verify_function".
    Thanks

    use the following code in validating the item, e.g when-button-pressed
    begin
    verify_function;
    exception
    when others then
    message(sqlerrm);
    raise form_trigger_failure;
    end ;
    OR
    instead of writing a procedure rewrite it as a function to return 1 if password is correct or 0 if password is wrong
    Regards
    Jihad

  • JSP error message

    I use Jdev3.1 and Oracle8.1.6 deploy locally to TOMCAT3.1
    I got some problem:
    -JBO 26080 error while selecting entity for typepiece
    ORA-01002 fetch out of sequence
    -When I insert a new row an leave blank a mandatory attribute I got the following message:Error Message: JBO-27014: Attribute TpStockMin in TypePiece is required=>ok. Then I go back with IE5 add the corresponding value to the mandatory attribute and then got "JBO 27102 Attempt to access dead view row"
    -and a lot of Error Message: JBO-27122: SQL error during statement preparation.
    Can JDev Team or other explain me what is wrong!!!
    thanks.
    Olivier

    I found that jbomt.zip file has MetaObjectManager.class.
    I added wrapper.classpath which include
    jbomt.zip file but still error occured..
    where directory should I locate that file ?

  • Db server doesn't start. Error message: ORA-00020: maximum number of proces

    After I changed the parameter from archive log mode. My db server is having problems.
    I can't log in as sys using sqlplus. when I log in through sqlplus /nolog, and tried to shut down, here is the error message:
    $ sqlplus /nolog
    SQL*Plus: Release 10.1.0.3.0 - Production on Mon Apr 23 11:43:07 2007
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> connect / as sysdba
    Connected to an idle instance.
    SQL> shutdown immediate
    ORA-24324: service handle not initialized
    ORA-24323: value not allowed
    ORA-00020: maximum number of processes (%s) exceeded
    SQL>
    I am stuck on this. i have changed the value of processes in init.ora, but this error still exists. i think I need to do: create spfile from pfile='init.ora', but I need to log in to do, but I can't log in sys.
    Please help.
    Thanks.

    i forgot shutdown abort. used that, created spfile from pfile, and it works ok now.

  • CAS Policy Manager error when installing Server SQL express 2012

    Hello everyone,
    I was wondering if anyong can help me with this.
    I am trying to install SQL server express 2012 on a windows 7 computer and am unable to install it.
    When I try to start the installer I get the error "Microsoft .NET Framework CAS Policy Manager has stopped working"
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: caspol.exe
      Application Version: 2.0.50727.5420
      Application Timestamp: 4ca2b8df
      Fault Module Name: ntdll.dll
      Fault Module Version: 6.1.7601.18247
      Fault Module Timestamp: 521eaf24
      Exception Code: c0000005
      Exception Offset: 0000000000027689
      OS Version: 6.1.7601.2.1.0.256.1
      Locale ID: 1033
      Additional Information 1: 00a4
      Additional Information 2: 00a4a2975d5a28cfbbc1bf906fc7eacd
      Additional Information 3: 0146
      Additional Information 4: 0146abaed829ebf2f677c0e9088e54ea
    And after I hit close program on that I get the error:
    CasPol.exe - Application Error
    The application was unable to start correctly (0x0000005). Click OK to close the application.
    And I have tried redownloading it multiple times.
    I have run the .net cleanup tool and a repair tool
    I have uninstalled and reinstalled .net as well to the lastest version.
    With no luck at all.
    Any suggestions on what I might be able to do to fix this?
    An help would be greatly appreciated.

    Hello,
    It points to fact that your .Net Framework is corrupt.Use below tool to repair .Net framework
    .Net framework repair tool
    Additional helpful articles to refer
    CAS policy error message
    CAS policy error message when
    installing SQL server
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • OWA_COOKIE.GET and error message ORA-01403

    Hello Everyone,
    I have a process Get Username Cookie as below:
    declare
    v varchar2(255) := null;
    c owa_cookie.cookie;
    begin
    c := owa_cookie.get('LOGIN_USERNAME_COOKIE');
    :P101_USERNAME := c.vals(1);
    exception when others then null;
    end;
    When the process run, it raises an error message,
    "Invalid PL/SQL expression condition: ORA-01403: no data found Invalid PL/SQL expression condition: ORA-01403: no data found"
    How do I not show this error on the screen but something more meaningful?
    Thanks so much in advance.
    MT

    Hi,
    I think error do not come from that code you did post.
    Check what is that process condition.
    Regards,
    Jari

  • Need help to debug SQL Tuning Advisor Error Message

    Hi,
    I am getting an error message while try to get recommendations from the SQL Tuning Advisor.
    Environment:
    Oracle Version:  11.2.0.3.0
    O/S: AIX
    Following is my code:
    declare
    my_task_name  varchar2 (30);
    my_sqltext    clob;
    begin
    my_sqltext := 'SELECT DISTINCT MRKT_AREA AS DIVISION, PROMO_ID,
                    PROMO_CODE,
                    RBR_DTL_TYPE.PERF_DETL_TYP, 
                    RBR_DTL_TYPE.PERF_DETL_DESC,
                    RBR_DTL_TYPE.PERF_DETL_SUB_TYP,
                    RBR_DTL_TYPE.PERF_DETL_SUB_DESC,
                    BU_SYS_ITM_NUM,
                    RBR_CPN_LOC_ITEM_ARCHIVE.CLI_SYS_ITM_DESC,
                    PROMO_START_DATE,
                    PROMO_END_DATE,
                    PROMO_VALUE2,
                    PROMO_VALUE1,
                    EXEC_COMMENTS,
                    PAGE_NUM,
                    BLOCK_NUM,
                    AD_PLACEMENT,
                    BUYER_CODE,
                    RBR_CPN_LOC_ITEM_ARCHIVE.CLI_STAT_TYP,
                    RBR_MASTER_CAL_ARCHIVE.STATUS_FLAG
    FROM  (PROMO_REPT_OWNER.RBR_CPN_LOC_ITEM_ARCHIVE
    INNER JOIN PROMO_REPT_OWNER.RBR_MASTER_CAL_ARCHIVE
    ON (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_PROMO_ID = PROMO_ID)
    AND (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_PERF_DTL_ID = PERF_DETAIL_ID)
    AND (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_STR_NBR = STORE_ZONE)
    AND (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_ITM_ID = ITM_ID))
    INNER JOIN PROMO_REPT_OWNER.RBR_DTL_TYPE
    ON (RBR_MASTER_CAL_ARCHIVE.PERF_DETL_TYP = RBR_DTL_TYPE.PERF_DETL_TYP)
    AND (RBR_MASTER_CAL_ARCHIVE.PERF_DETL_SUB_TYP = RBR_DTL_TYPE.PERF_DETL_SUB_TYP)
    WHERE ( ((MRKT_AREA)=40)
    AND ((RBR_DTL_TYPE.PERF_DETL_TYP)=1)
    AND ((RBR_DTL_TYPE.PERF_DETL_SUB_TYP)=1) )
    AND ((CLI_STAT_TYP)=1 Or (CLI_STAT_TYP)=6)
    AND ((RBR_MASTER_CAL_ARCHIVE.STATUS_FLAG)=''A'')
    AND ( ((PROMO_START_DATE) >= to_date(''2011-10-20'', ''YYYY-MM-DD'')
    And (PROMO_END_DATE) <= to_date(''2011-10-26'', ''YYYY-MM-DD'')) )
    ORDER BY MRKT_AREA';
    my_task_name := dbms_sqltune.create_tuning_task
                                 (sql_text => my_sqltext,
                                  user_name => 'PROMO_REPT_OWNER',
                                  scope     => 'COMPREHENSIVE',
                                  time_limit => 3600,
                                  task_name  => 'Test_Query',
                                  description  => 'Test Query');
    end;
    begin
      dbms_sqltune.execute_tuning_task(task_name => 'Test_Query');
    end;
    set serveroutput on size unlimited;
    set pagesize 5000
    set linesize 130
    set long 50000
    set longchunksize 500000
    SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('Test_Query') FROM DUAL;
    Output:
    snippet .....
    FINDINGS SECTION (1 finding)
    1- Index Finding (see explain plans section below)
    The execution plan of this statement can be improved by creating one or more
    indices.
    Recommendation (estimated benefit: 71.48%)
    - Consider running the Access Advisor to improve the physical schema design
    or creating the recommended index.
    Error: Cannot fetch actions for recommendation: INDEX
    Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Rationale
    Creating the recommended indices significantly improves the execution plan
    of this statement. However, it might be preferable to run "Access Advisor"
    using a representative SQL workload as opposed to a single statement. This
    will allow to get comprehensive index recommendations which takes into
    account index maintenance overhead and additional space consumption.
    snippet
    Any ideas why I am getting ORA-06502 error?
    Thanks in advance
    Rogers

    Bug 14407401 - ORA-6502 from index recommendation section of DBMS_SQLTUNE output (Doc ID 14407401.8)
    Fixed:
    The fix for 14407401 is first included in
    12.1.0.1 (Base Release)

Maybe you are looking for

  • How do I know what files to remove from my Macbook Pro laptop?

    Apparently my hard drive is full and I need to remove files so I have space to download more music and movies.  I don't want to delete important files.  How do I go about doing this? 

  • Adobe Pro 8.2.6/Win7/64 won't open this pdf

    The pdf file is a state road map, and is located here: http://http://www.iowadot.gov/maps//msp/pdf/transmap.html I know the reader ver 10 (X) under win/xp will open it, but trying to open it under win7/64 using Adobe Pro 8.2.6, I'll get the following

  • Oracle 9i (9.2.0.8) installed on cloned Windows 32-bit VMC instance

    Hello, We have a Windows 2003 Server 32-bit VMC instance running a copy of Oracle 9i (9.2.0.8) for QA/Dev work on one of our software products. This software is going to be moved over to an Oracle 10g database with our next product release. In order

  • FM: RV_SCHEDULE_CHECK_DELIVERIES

    Hi All, In my Program using FM: RV_SCHEDULE_CHECK_DELIVERIES (SD Functions for Sched. Line Processing) for this input is VBELN and POSNR, After executing this FM, the below Table parameter is populating FVBAP LIKE VBAPVB, in this structure I have a f

  • Help needed with applying a track matte

    hi. i'm trying to apply a track matte for the first time. i'm using this article http://www.adobepress.com/articles/article.asp?p=2039925&seqNum=2 as a guide but instead of only 2 footage layers i also use a shape layer - I want to create a "hole" in