Nees for better SQL error handling???

Hello everybody!
I am having problems with identifying the reason why SQLExceptions are thrown. What I mean is that the reason is stored in the sql state and the sql code variables. As far as I know, this sql code may be platform dependent which makes the whole mechanism somehow hard to use.
I simply miss sublasses of the SQLException like - DuplicateEntrySQLException, ForeignKeyConstraintFailureSQLException, ...
- I think this approach would be far too way natural and obvious.
My question is: does anybody know about a package or something like that which would implement a kind of "re-thrower" class which would consume the SQLException, inspect it and based on the exception's state it would throw a nice exception in the sense described above?
Thank you!
Cheers,
Miro

Why not check the data beforehand only?
Normally I have a validate method in which I run a check on the data submitted by the user. there I see if the Data is violating any of the foriegn key, unique constraints or length of the field.
I don't insert the data first into the DB without any validation.
If you don't do this, then there is no way for you to know whether the problem occurred because of the data provided by the user or because the DB is having system level or n/w level problem.
On the fly analysis is not possible because a DB (ex. oracle, sql server) each is capable of throwing ten thousand kind of errors. you really can't translate it by a package.
So the best way to handle your situation is that validate the data first. If there is a problem report it to the user. If validation suceeds then go ahead with the insert, update command.
If the user still gets an SQLException then it assume a system level error and display message like "Foo Portal is temporarily unavailable. Kindly call 4343343 in case of emergency"
Test your system pretty well specially the validation logic so that you don't display the sys unavailable message when the DB is available but the data has errors.
hope this helps.
regards,
Abhishek.

Similar Messages

  • Possibility to register Pre-/Post-Procedures for an SQL Template Handler

    I would appreciate to see the possibility to register pre-/post-procedures for an SQL template handler in ORDS 3.0.
    Why:
    We use Oracle VPD/Row-Level-Security to secure data access. Hence a trigger sets a couple of attributes in the database session context at login time which are then used in static RLS predicates to limit which records the user can see/modify.
    With ORDS 3.0 all sessions are opened under the same technical user (e.g. APEX_REST_PUBLIC_USER), hence all users have the same/no attributes in the session context and could see/modify all data.
    To avoid this situation, I need to set the attributes (e.g. the authenticated user) in the database session context before the actual query/plsql handler is executed.
    Also, resetting the session context after the handler is executed would be good.
    This scenario is in line with scenarios 'One Big Application User' and 'Web-based applications' in http://docs.oracle.com/cd/B28359_01/network.111/b28531/vpd.htm#DBSEG98291.
    Different solution approach:
    Kris suggested to write a PL/SQL handler where the pre-procedure is called before the business logic procedure/query. This is ok for me as long as I modify data and only need to return no or little data.
    As soon as I need to return a lot of data (e.g. select c1, c19, c30 from t1), this approach will force me to write a lot of code in the PL/SQL handler in order to marshal the c1, c19 and c30 to JSON and put it in the HTTP response.
    But this is the beauty of ORDS - I can simply define a template, write a GET SQL Handler 'select c1, c19, c30 from t1'  and have the data available as REST service, without writing any code to write JSON marshaled data in the HTTP response.

    I tried to log the request at Oracle REST Data Services (ORDS) but I could only start a new discussion: Possibility to register Pre-/Post-Procedures for an SQL Template Handler
    As I mentioned there, the PL/SQL handler approach works for me as long as I have no or only little data to send back to the client (e.g. put/post/delete succeeded or an error message why the call failed).
    If I need to return a lot of data from the PL/SQL handler I would need to, as far as I understand, to marshal the data to JSON and write it to the response body in the PL/SQL handler.
    I don't want to do the marshaling, because ORDS does it better.
    However, this works for me:
    I write a pipelined stored procedure that takes as input the attributes I need to set in the session context. I then can reference it in the SQL handler:
    select * from table(my_pipelined_function(:USER, ....)
    Now the JSON/HTTP response is created by ORDS again.
    I still needed to code a couple of lines, but it is way better than duplicating the functionality already existing in ORDS.
    With the hooks it would be perfect because I would not have to write any code (apart from the procedure to set the session context attributes), just configure the REST services in ORDS.

  • What is meant by T-SQL error handling

     Designing T-SQL Error Handling ,Implementing T-SQL Error Handling
    Could please any one explain with simple example  
    Thanks 

    In T-SQL before TRY-CATCH:
    http://www.sqlusa.com/bestpractices2005/duplicateinsert/
    there was RAISERROR:
    http://www.sqlusa.com/bestpractices2005/updatetrigger/
    The bottom line though, you need to code preventively so the error handlers are not hit because that is a headache for the application.
    Example for preventive coding: use a
    CASE expression to prevent divide by zero.
    Kalman Toth Database & OLAP Architect
    T-SQL Scripts at sqlusa.com
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Step by Step documents for Process Chain Error Handling with Screen Shots

    Hi
    Is anybody having Step By Step Documents for Process Chain Error Handling with Screen Shots ?. Please forward it to me to my e-mail [email protected] .  I will reward points to u immediately.
    bye
    Aamira Khan

    Hi,
    You can find lots of topic related to process chain issues in SDN.Please make a search in SDN.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_library&query=process+chain&adv=true&sdn_author_name=&sdn_updated_on_comparator=ge&sdn_updated_on=&sortby=cm_rnd_rankvalue
    Regards.

  • Custom Error Pages (Not for PL/SQL Errors)

    Hi,
    How can I make my own error page for when I branch to an invalid page?
    I caught this example:
    http://djmein.blogspot.com/2007/04/custom-error-handling-in-apex.html
    But I beleive it is only for handling exceptions thrown in PL/SQL and this cannot be applied here.
    Anyone know?

    I'm struggling on this also. Anyone have the solution as well?

  • XMLParser for PL/SQL - Error

    I am using XML parser for PL/SQL in oracle 8.1.7 DB.
    When i run the sample xml program, i get error which is as follows. While compiling no errors. But while executing it reports error as given below.
    SQL> exec domsample('/u01/usr/oracle/sso','family.xml','errors.txt');
    BEGIN domsample('/u01/usr/oracle/sso','family.xml','errors.txt'); END;
    ERROR at line 1:
    ORA-29540: class oracle/xml/parser/plsql/XMLParserCover does not exist
    ORA-06512: at "PACKMGR.XMLPARSERCOVER", line 0
    ORA-06512: at "PACKMGR.XMLPARSER", line 57
    ORA-06512: at "PACKMGR.DOMSAMPLE", line 72
    ORA-06512: at line 1
    What need to be done to rectify the above problem.
    when i do the following validation check
    SQL> select substr(dbms_java.longname(object_name),1,30) as class, status
    2 from all_objects
    3 where object_type = 'JAVA CLASS'
    4 and object_name = dbms_java.shortname('oracle/xml/parser/v2/DOMParser');
    from all_objects
    ERROR at line 2:
    ORA-29540: class oracle/aurora/rdbms/DbmsJava does not exist
    I get the above error. Pls. Advice

    This should be that you haven't load the xmlparserv2.jar into the DB schema. You can load the java libs using loadjava command

  • Addt for cs4 SQL error

    Hi there,
    When creating a registration page using addt for CS4 I get the following error when I subit the registration form:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' id TEXT)' at line 1
    ('id' in this recordset is actually NUMERIC)
    I've got a feeling this is an error somewhere in the toolbox libraries.
    I have a similiar registration form on another site that I created with the previous version of ADDT and that works fine. However, if I copy all that code across into the site using the updated library I get the same above error.
    Has anybody come across this?

    Hi Gunter, thanks for replying.
    <br />(Incidentally, this code is also erroneously inserted ABOVE the class and connection includes so it doesn't work until I manually move the includes above the code.)
    <br />
    <br />*** FULL DEBUG TRACE ***
    <br />Error:
    <br />Internal error.
    <br />Developer Details:
    <br />tNG_fields.getFakeRecordset:
    <br />SQL error: Error creating temporary table:
    <br />You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' user_id TEXT)' at line 1
    <br />SQL:
    <br />CREATE TEMPORARY TABLE KT_fakeRS_20090307 (username TEXT, password TEXT, firstname TEXT, lastname TEXT, email TEXT, date TEXT, active TEXT, key TEXT, user_id TEXT) (FIELDS_FAKE_RS_ERROR)
    <br />tNG Execution Trace - VIEW
    <br />
    <br /> * tNG_insert.executeTransaction
    <br /> o STARTER.Trigger_Default_Starter
    <br /> o tNG_insert.doTransaction
    <br /> + BEFORE.Trigger_Default_FormValidation
    <br /> + BEFORE.Trigger_Registration_CheckUniqueUsername
    <br /> + BEFORE.Trigger_Registration_CheckPassword
    <br /> + BEFORE.Trigger_Registration_PrepareActivation
    <br /> + tNG_insert.prepareSQL
    <br /> + tNG_insert.executeTransaction - execute sql*
    <br /> + ERROR.Trigger_Default_Insert_RollBack
    <br /> * tNG_insert.getRecordset
    <br /> * tNG_insert.getFakeRsArr
    <br /> * tNG_insert.getLocalRecordset
    <br /> * tNG_insert.getFakeRecordset*
    <br />
    <br />*** CODE GENERATED BY USER REGISTRATION WIZARD *********
    <br />
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_japanga = new KT_connection($japanga, $database_japanga);<br />?>
    <br />
    <br /><?php<br />//start Trigger_CheckPasswords trigger<br />//remove this line if you want to edit the code by hand<br />function Trigger_CheckPasswords(&$tNG) {<br />  $myThrowError = new tNG_ThrowError($tNG);<br />  $myThrowError->setErrorMsg("Passwords do not match.");<br />  $myThrowError->setField("password");<br />  $myThrowError->setFieldErrorMsg("The two passwords do not match.");<br />  return $myThrowError->Execute();<br />}<br />//end Trigger_CheckPasswords trigger<br /><br />//start Trigger_WelcomeEmail trigger<br />//remove this line if you want to edit the code by hand<br />function Trigger_WelcomeEmail(&$tNG) {<br />  $emailObj = new tNG_Email($tNG);<br />  $emailObj->setFrom("{KT_defaultSender}");<br />  $emailObj->setTo("{email}");<br />  $emailObj->setCC("");<br />  $emailObj->setBCC("");<br />  $emailObj->setSubject("Welcome");<br />  //FromFile method<br />  $emailObj->setContentFile("includes/mailtemplates/welcome.html");<br />  $emailObj->setEncoding("ISO-8859-1");<br />  $emailObj->setFormat("HTML/Text");<br />  $emailObj->setImportance("Normal");<br />  return $emailObj->Execute();<br />}<br />//end Trigger_WelcomeEmail trigger<br /><br />//start Trigger_ActivationEmail trigger<br />//remove this line if you want to edit the code by hand<br />function Trigger_ActivationEmail(&$tNG) {<br />  $emailObj = new tNG_Email($tNG);<br />  $emailObj->setFrom("{KT_defaultSender}");<br />  $emailObj->setTo("{email}");<br />  $emailObj->setCC("");<br />  $emailObj->setBCC("");<br />  $emailObj->setSubject("Activation");<br />  //FromFile method<br />  $emailObj->setContentFile("includes/mailtemplates/activate.html");<br />  $emailObj->setEncoding("ISO-8859-1");<br />  $emailObj->setFormat("HTML/Text");<br />  $emailObj->setImportance("Normal");<br />  return $emailObj->Execute();<br />}<br />//end Trigger_ActivationEmail trigger<br /><br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$formValidation->addField("username", true, "text", "", "3", "12", "Please enter a name between 3 and 12 characters.");<br />$formValidation->addField("password", true, "text", "", "6", "12", "Please enter a passsword between 6 and 12 characters.");<br />$formValidation->addField("firstname", true, "text", "", "3", "15", "Please enter your first name.");<br />$formValidation->addField("lastname", true, "text", "", "3", "15", "Please enter your last name (3-15 chars).");<br />$formValidation->addField("email", true, "text", "email", "", "", "Please enter a valid email. ");<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br /><br />// Make an insert transaction instance<br />$userRegistration = new tNG_insert($conn_japanga);<br />$tNGs->addTransaction($userRegistration);<br />// Register triggers<br />$userRegistration->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$userRegistration->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$userRegistration->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}");<br />$userRegistration->registerConditionalTrigger("{POST.password} != {POST.re_password}", "BEFORE", "Trigger_CheckPasswords", 50);<br />$userRegistration->registerTrigger("AFTER", "Trigger_WelcomeEmail", 40);<br />$userRegistration->registerTrigger("AFTER", "Trigger_ActivationEmail", 40);<br />// Add columns<br />$userRegistration->setTable("users");<br />$userRegistration->addColumn("username", "STRING_TYPE", "POST", "username");<br />$userRegistration->addColumn("password", "STRING_TYPE", "POST", "password");<br />$userRegistration->addColumn("firstname", "STRING_TYPE", "POST", "firstname");<br />$userRegistration->addColumn("lastname", "STRING_TYPE", "POST", "lastname");<br />$userRegistration->addColumn("email", "STRING_TYPE", "POST", "email");<br />$userRegistration->addColumn("date", "DATE_TYPE", "POST", "date");<br />$userRegistration->setPrimaryKey("user_id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rsusers = $tNGs->getRecordset("users");<br />$row_rsusers = mysql_fetch_assoc($rsusers);<br />$totalRows_rsusers = mysql_num_rows($rsusers);<br />?>
    <br /><?php require_once('Connections/japanga.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_japanga = new KT_connection($japanga, $database_japanga);<br />?>

  • Equivalent for IBM specific Error handling routines

    Hi,
    There is a couple of IBM specific error handling routines - AFHCEEN (CEE3SPM) and XUFLOW in our FORTRAN source code which suppresses the overflow and underflow exceptions. Is there any equivalent of these routines available in SUN Solaris O/S ?

    Yes, there are two ways to do it. First, if you simply want to suppress those exceptions throughout the code you can compile with -ftrap=%none.
    If you need to be able to turn off those exceptions temporarily, then you can use the IEEE_EXCEPTIONS module, which is part of the Fortran standard (and thus ought to be portable). Here is an example:
    use ieee_exceptions
    real x
    integer status
    logical m
    call get_command_argument(1, status=status)
    if (status .eq. 0) then
       print *, 'Enabling signals'
       m = .true.
    else
       print *, 'Disabling signals'
       m = .false.
    end if
    call ieee_set_halting_mode((/ ieee_overflow, ieee_underflow, ieee_inexact /), m)
    x = 0.1
    do while (x .ne. 0.0)
       x = x / 2.0
    end do
    endYou should be aware, though, that the standard requires the halting mode to be saved on entry to a procedure and restored on exit. Therefore, you cannot write a subroutine whose purpose is to change the halting mode in the procedure that calls it.

  • VisualAge for Java - generated error handling code

    The code that VAJ generates to handle errors is getting on my nerves, and I'd like to know if someone else is experiencing this difficulty.
    It's not possible to specify which exception you're handling. The generated catch code produced is of the form below:
    catch (java.lang.Throwable ivjExc) {
    // user code begin {3}
    // user code end
    handleException(ivjExc);
    This rules out any attempt to handle specific exceptions in a try catch block such as:
    try {
    } catch (java.sql.SQLException e) {
    } catch(java.io.IOException e2) {
    It also prevents the very useful compiler errors you get when you ignore certain exceptions, because they all end up caught in the Throwable section.
    I know I can partially go around this with RTTI, or even worse, by cleverly coding the user code sections, such as in:
    try {
    // user code begin {1}
    // user code end
    [...] myCode(); [...]
    // user code begin {2}
    } catch (SQLException e) {
    [...] myCatchCode(); [...]
    // TRICKY BIT - NOTICE THE user code end
    // This actually does nothing, but rids me of the
    // default catch block
    try {
    // user code end
    } catch (java.lang.Throwable ivjExc) {
    // user code begin {3}
    // user code end
    handleException(ivjExc);
    Anyone with this trouble? How do you go around it?

    Actually, from what I could tell, you can actually program almot entirely by resorting to the visual programming tool. Better said than done, of course, because a good deal of coding would end up being less practical than actually typing. And the tangling of connections would be ridiculous. But with some more fine tuning of these features, IBM might end up with a very, very effective visual tool, especially if you do your own programming with this in mind.
    Specifically, I'm doing some database programming and I'd like to handle SQLExceptions differently than all the other "Throwable" ones. In particular, I'm getting a bunch of records when a JFrame is windowOpened, and if there's an error I'm showing a window that details the list of database errors that occurred (each SQLException allows access to the next in the list through getNextException(), so I'm adding all of these to a JList). This window is a DetailSQLExceptionDialog which extends DetailThrowableDialog (a class of mine which adds a Throwable's message to a list).
    The actual code where I get the records is below. Don't bother with the details, but as you can see I had to use "instanceof" to figure out what class I'm getting as an exception.
    * connEtoM2: (MasterFrame.window.windowOpened(java.awt.event.WindowEvent) --> fctMasterTableModel.setListOfRecords(Ljava.util.ArrayList;)V)
    * @param arg1 java.awt.event.WindowEvent
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private void connMasterFrame_WindowOpened(java.awt.event.WindowEvent arg1) {
    try {
    // user code begin {1}
    // user code end
    getumMasterTableModel().setListOfRecords(Master.getAllRecords(conn));
    // user code begin {2}
    // user code end
    } catch (java.lang.Throwable ivjExc) {
    // user code begin {3}
    if (ivjExc instanceof SQLException) {
    MessageWithDetail.show(
    "Error getting the records.",
    new DetailSQLExceptionDialog((SQLException) ivjExc, this, getTitle(), true),
    this,
    getTitle());
    dispose();
    } else {
    MessageWithDetail.show(
    "Error getting the records.",
    new DetailThrowableDialog(ivjExc, this, getTitle(), true),
    this,
    getTitle());
    dispose();
    return;
    // user code end
    handleException(ivjExc);
    It's still not a good solution because since the actual "catch" part has a "throwable" in it, which catches EVERY exception, since Throwable is The Mother Of all Exceptions, I wouldn't get the compiler error for not handling the SQLException. In fact, I'm not aware of what kind of errors can be raised by the class/methods I'm using, unless I delve into all the docs and that can be a daunting task. Basically, the help that the compiler would give me pointing those exceptions as not caught, which is so nice in Java, is gone with the wind.
    :-P

  • Steps for ALE/EDI error handling using workflow

    Hi
    I need to handle errors in outbound IDoc generation using workflow. Can you please let me know the steps to be used for this. Step-by-step answer would be appreciated.
    Thanks

    Seetha,
    I have this already..
    IDOCPACKET                                                           
    Object type                         IDPKWMMBXY             
    End event                           MASSINPUTFINISHED      
    IDOC                                                          
    Object type                         IDOCWMMBXY             
    Start event                         INPUTERROROCCURRED     
    End event                           INPUTFINISHED          
    Application object                                                                      
    Object type                         BUS2017                           
    Start event

  • CRVS 2010 beta - SQL error 4502 (on previous runtimes the report works)

    I'm testing the new 2010 runtimes.
    Almost every report work except some.
    In one of them I obtain an error 4502 (View or function has more column names specified than columns defined) and I can't explain why.
    Doing "verify database" on the report it seems ok. Running it with previous runtimes gives no problem.
    Any hint or something to check?
    Maybe the query that CR sends to SQL Server is wrong.. but how can I check without CR2010?
    In CR11.5 it's correct.
    Thanks

    this is the "show query" for the main report (cr2008)
    SELECT "ProSerAll"."FKCodPro", "ProSerAll"."DesPro", "ProSerAll"."Des2Pro", "ProSerAll"."CodIvaVenPro", "ProSerAll"."CodSosPro", "ProSerAll"."CtlStaPro", "ProSerAll"."ImpPro", "ProSta"."AnnRifSta", "ProSta"."QtaGenSta", "ProSta"."ValGenSta", "ProSta"."ValFebSta", "ProSta"."QtaFebSta", "ProSta"."ValMarSta", "ProSta"."QtaMarSta", "ProSta"."ValAprSta", "ProSta"."QtaAprSta", "ProSta"."ValMagSta", "ProSta"."QtaMagSta", "ProSta"."ValGiuSta", "ProSta"."QtaGiuSta", "ProSta"."ValLugSta", "ProSta"."QtaLugSta", "ProSta"."ValAgoSta", "ProSta"."QtaAgoSta", "ProSta"."ValSetSta", "ProSta"."QtaSetSta", "ProSta"."ValOttSta", "ProSta"."QtaOttSta", "ProSta"."ValNovSta", "ProSta"."QtaNovSta", "ProSta"."ValDicSta", "ProSta"."QtaDicSta", "ProSerAll"."FKAnaAzi", "ProSerOrdFor"."DatUltOrdFor", "ProSerOrdFor"."QtaUltOrdFor", "ProSerAll"."IDPro"
    FROM   ("WinCodyDB"."dbo"."ProSerAll" "ProSerAll" INNER JOIN "WinCodyDB"."dbo"."ProSta" "ProSta" ON ("ProSerAll"."FKAnaAzi"="ProSta"."FKAnaAzi") AND ("ProSerAll"."IDPro"="ProSta"."FKIDPro")) INNER JOIN "WinCodyDB"."dbo"."ProSerOrdFor" "ProSerOrdFor" ON ("ProSerAll"."FKAnaAzi"="ProSerOrdFor"."FKAnaAzi") AND ("ProSerAll"."IDPro"="ProSerOrdFor"."FKIDPro")
    ORDER BY "ProSerAll"."FKCodPro", "ProSta"."AnnRifSta"
    Subreport 1 ("TEST" and "1" were subreport paramenters I input manually when I did "show query):
    SELECT "LisRig"."Qta1LisRig", "LisRig"."Qta2LisRig", "LisRig"."Qta3LisRig", "LisRig"."Qta4LisRig", "LisRig"."Qta5LisRig", "LisRig"."PreEur1LisRig", "LisRig"."PreEur2LisRig", "LisRig"."PreEur3LisRig", "LisRig"."PreEur4LisRig", "LisRig"."PreEur5LisRig", "LisRig"."FKNumLisRig", "LisRig"."FKCodProLisRig", "LisRig"."FKAnaAzi"
    FROM   "WinCodyDB"."dbo"."LisRig" "LisRig"
    WHERE  "LisRig"."FKNumLisRig"=1 AND "LisRig"."FKCodProLisRig"=N'TEST' AND "LisRig"."FKAnaAzi"=1
    Subreport 2 (same as above for "TEST" and "1")
    SELECT "ProStaAnnEse"."FKCodProSta", "ProStaAnnEse"."TotCarValSta", "ProStaAnnEse"."TotCarQtaSta", "ProStaAnnEse"."NumCarValSta", "ProStaAnnEse"."NumCarQtaSta", "ProStaAnnEse"."NumScaValSta", "ProStaAnnEse"."NumScaQtaSta", "ProStaAnnEse"."TotScaValSta", "ProStaAnnEse"."TotScaQtaSta", "ProStaAnnEse"."EsiAttSta", "ProStaAnnEse"."EsiIniSta", "ProStaAnnEse"."FKAnaAzi"
    FROM   "WinCodyDB"."dbo"."ProStaAnnEse" "ProStaAnnEse"
    WHERE  "ProStaAnnEse"."FKCodProSta"=N'TEST' AND "ProStaAnnEse"."FKAnaAzi"=1
    ORDER BY "ProStaAnnEse"."FKCodProSta"
    Subreport 3 ("1" and "1" were parameters)
    SELECT "CosGen"."CosPre", "CosGen"."CosUlt", "CosGen"."CosMed", "CosGen"."FKAnaAzi", "CosGen"."FKIDPro"
    FROM   "WinCodyDB"."dbo"."CosGen" "CosGen"
    WHERE  "CosGen"."FKAnaAzi"=1 AND "CosGen"."FKIDPro"=1
    Can't be more detailed than this.

  • LV7.1 Strange behavior with Automatic Error Handling occuring when it shouldn't [LV 7.1 Pro on WinXP for Tablet PC's]

    [LV 7.1 Pro on WinXP for Tablet PC's]
    I recently let a rather large LV app of mine run in the development environment while I was out for a couple of days. Upon returning I found that the app had hung for ~22 hours waiting for an answer to an Automatic Error Handling (AEH) dialog proclaiming an Error 7 in New File without any indication of the VI hierarchy that called New File.  I set about ensuring that AEH dialogs would not pop up and have not been able to discover how I could have possibly received one in the first place.
    Subsequent investigation revealed:
    Neither AEH option in Options>Block Diagrams were checked.
    Network problems had occurred around the time that the app had hung.  All file paths are network paths when running in the development environment, so the cause of the error was most likely valid, even if the AEH dialog appearance wasn't.
    My app has only one instance where the New File primitive is used by me. That subVI and all others above it in the hierarchy DO NOT have the AEH property enabled.  The error out cluster of New File in my subvi is wired.
    My app has three instances where New File is called from a vi.lib vi (Open/Create/Replace File.vi, Open Config Data.vi, and Prompt Web Browser Path.vi), none of which have the AEH property enabled.  Nor does any of their calling VI's.  All three instances also have their error out cluster wired.
    A utility to examine the AEH property of all VI's (with all top level and dynamic VI's loaded) in memory reported that only 1 of 308 vi's ( RGT Does File Exists.vi from the Report Generation Toolkit) had that property true.  That vi has no subVI's other than the File/Directory Info primitive and no calling VI's in common with any of the vi's that call New File, except a top level VI.
    As long as 'Enable automatic error handling dialogs' remains unselected in options>block diagram, I am unable to get an AEH dialog for either the New File or File/Directory Info primitives in a test VI with AEH property enabled and their error out clusters unwired no matter what invalid path I pass to the functions.  As soon as the options>block diagram>Enable AEH dialogs' is selected, both primitives fire AEH dialogs with no error out wired and don't when wired. i.e. works as advertised.
    In other words I can find no reason why I should have gotten the problem AEH dialog...
    I cannot afford for this app to hang because of a network problem, other portions of the app that were running concurrently correctly handled the error and, had the AEH dialog not appeared, the app would have made corrections or shutdown in an orderly fashion.
    Any ideas?

    Very good.
    Write Characters to File.vi>Open/Create/Replace File.vi>New File
    New File throws the error.  Open/Create/Replace strips the hierarchy from the source of the error.  Write Characters passes it to the General Error Handler.  I never looked above O/C/R file in the hierarchy except for enable automatic error handling property.  The tip-off should have been to realize that O/C/R file was stripping the hierarchy from the error and look above that. 
    The real irony is that Write Characters was being used to log error cluster data to an error log file...
    Save as... Copy without updating... the OEM 'Write Characters to File' is gone from this app.
    Thanx (a bunch)

  • WHAT IS ERROR HANDLING OPTIONS IN dtp? FOR DSO

    hi friends,
    what is use for every option error handling in dtp .
    1) deactivated
    2)no update , not reporting
    3)valid records update, no reporting(request red)
    4)valid records update,  reporting (request green).
    what is individual effect for my DSO, ple explain me acenerio,
    for my DSO what can i select, why?
    regards
    suneel.

    Check this help - self explanatory - trying checking F1 thats very informative and self explantory most of the times
    Switched off
    If an error occurs, the error is reported as a package error in the DTP monitor. The error is not assigned to the data record. The cross-reference tables for determining the data record numbers are not built; this results in faster processing.
    The incorrect records are not written to the error stack since the request is terminated and has to be updated again in its entirety.
    No update, no reporting (default)
    If errors occur, the system terminates the update of the entire data package. The request is not released for reporting. The incorrect record is highlighted so that the error can be assigned to the data record.
    The incorrect records are not written to the error stack since the request is terminated and has to be updated again in its entirety.
    Update valid records, no reporting (request red)
    This option allows you to update valid data. This data is only released for reporting after the administrator checks the incorrect records that are not updated and manually releases the request (by a QM action, that is, setting the overall status on the Status tab page in the monitor).
    The incorrect records are written to a separate error stack in which the records are edited and can be updated manually using an error DTP.
    Update valid records, reporting possible
    Valid records can be reported immediately. Automatic follow-up actions, such as adjusting the aggregates, are also carried out.
    The incorrect records are written to a separate error stack in which the records are edited and can be updated manually using an error DTP.

  • Error Handling in Forms

    Dear all,
    we are using oracle developer suite 10g r2 with oracle database 10g r2 against windows server 2003.
    Error handling is a very big issue.
    i try to do the following, just correct me, or make the trigger more efficient.
    i face unexpected messages, like a message two time displayed, sometime important message never displayed.
    i just set the :system.message_level =20 in the when-new-form-instance trigger.
    and create on-error trigger like below
    declare
    errcode number:=error_code;dbmserrcode number;dbmserrtext varchar2(200);
    formtxt varchar2(200);
    errtype varchar2(3);
    begin
    --------- user defined database exceptions errors raised by --RAISE_APPLICATION_ERROR
    IF DBMS_ERROR_CODE in (-20738,.......) then
    raise form_trigger_failure;
    end if;
    if error_code=50017 then
    message('duration must be between 0 and 23');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif
    error_code=40202 then
    clear_message;
    message('please provide the required fields.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif error_code=50022 then
    clear_message;
    message('time must be in the correct format.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    if error_code in (40509,40508) then
    dbmserrcode:=dbms_error_code; dbmserrtext:=dbms_error_text;
    if dbmserrcode=-1438 then
    clear_message;
    message('your number is too large.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1400 then
    clear_message;
    message('your forgot to provide a value.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-2291 then
    clear_message;
    message('header is not found for this insertion.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1 then
    clear_message;
    message('record already exists');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    exception
    when others then
    if dbms_error_code=-20738 then
    clear_message;
    message('Error: absent or later record errror from the database trigger.);
    raise form_trigger_failure;
    elsif .....
    esle
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    end;any suggession?
    Regards

    i must come with a plsql code which handle every error and suppress unnecessary messages.Good luck with that. No matter how well thought out or planned, you're not going to be able to take all scenarios into account. The design of an exception handler takes time to address all possible scenarios you want handled and even then, you're not likely to handle every situation in the beginning.
    could we implement the oracle ebusiness error handling procedures here in our application?if yes, then where could we find that procedure?>
    I've dug through that code and it is not a thorough as you think it is. It handles specific situations and then defaults the rest. It is a good model for your own exception handler, however. That is what I used it for. :) I don't recall which library it is in, but I'll look around and if I find it, I'll post it.
    I agree with Andreas's comment...
    Simply remove your ON-ERROR-trigger, then you have a default. That's nothing better or worse than what apex has.I'm not too familiar with Apex; I've worked with it, but it's been a little while. Even with Apex, you're going to have to develop a customized Exception Handler so more intuitive or application specific messages are displayed in response to an exception.
    As to Andreas's comment...
    For your own error-handling... The "simplest" way in my eyes is create your own error-table where you have appropiate columns for the error-code and the error-type (FRM,ORA,Whatever), then in your ON-ERROR-trigger read the appropiate record from that table and show the error. You could also have a flag in your table which decides what to do with a specific error (Show as Message, Show as Alert, Don't show at all) and react accordingly.This is exactly what we implemented in our application. We created a set of tables that contain all of the Oracle Runtime errors and their attributes (Error Type, Severity Level, etc). Then we wrote a standard On-Error trigger that is subclassed to all of our forms that calls a Library "On_Error" package. This package evaluates the exception raised, compares it to the database entry for the error and then displays an appropriate message depending on the Severity Level, Error Type (ORA or FRM) and Message Type (Informational, Error, Caution) and we display the message in either the Status Bar, Note Alert, Caution Alert or Stop Alert or it is supressed. If an error is not found in the table, then it is displayed in a Stop Alert as an "Unhandled Exception." The second table I mentioned contains all of the messages used by our application and is cross referenced with the table that contains the Oracle messages. By simply assigned one of our messages to an Oracle message - our package will display our message instead of the default Oracle Message. Yes, this took sometime to build and test and once implemented, we spent another couple of months perfecting it, but now it is pretty solid and we haven't had to modify it in over a year.
    While this level of complexity may be overkill for your application, it does offer the greatest flexibility in the long-run. Also, if your application must support multiple languages, having all of your messages in a table make internationalization extremely easy. :)
    The point of all this, is that no matter which system you use (Forms, Apex, or Java) you will still need to invest some time into designing an Excpeiton Handling method for your application and then implement it accross the application. This is not something you can develop in a short period of time and it will not be perfect in the beginning. However, in the long-run, you will be happy you spent the time up-front to build a flexible and robust Exception Handling system.
    Craig...

  • Receiving SQL Error: INTERNAL_ERROR  while executing the query

    Dear All,
    I am receiving the below error while executing a query.
    SQL Error: INTERNAL_ERROR
    Diagnosis
    The database system registered an SQL error. As available, the error number and a description are included in the short text. Possible causes for SQL errors include:
    Overflow of database objects such as buffers, temporary tablespaces, rollback segments or data containers/tablespaces.
    ->These problems can generally be eliminated by system administrators.
    Missing generated database objects such as tables or views based on inconsistent or inactive InfoCubes or InfoObjects. Examples of this include the view of the fact table for an InfoCube or the attribute SID table (X/Y table) of a characteristic.
    -> These problems can generally be eliminated by a BW administrator.
    SQL requests with incorrect content.
    -> Problems of this type are generally programming errors.
    System Response
    Procedure
    Contact your system administrator.
    Procedure for System Administration
    If there is no error description, look for one in the reference from the database producer.
    Decide on the correct category for the SQL error and check if it can be eliminated. Generally the error can also be found in the syslog (transaction sm21). From there, transactions sm51 and sm50, the developer's trace log of the work process can be determined and the erroneous statement can be viewed in the log. This procedure is described in SAP Note 568768.
    Notification Number DBMAN 257 
    I verified the table spaces and also done RSRV Repair of InfoObjects and InfoCubes and didnt find any error. But I am receiving this error for one particular month and remaining months are executing fine. Any ideas why i am receiving this error.
    Regards
    Ravi Y

    OSS Note 1305568:
    Symptom
    A data mart query that
    you want to execute within a data transfer process (DTP), for example, terminates with the
    SQL error -1013 "Too many order columns".
    The following is displayed in the monitor log of the data transfer process:
    Error while extracting from source xxxxxx (type InfoProvider)
    Message number RSBK 242
    Exception CX_SQL_EXCEPTION occurred (program:
    CL_SQL_STATEMENT==============CP, include:
    CL_SQL_STATEMENT==============CM004, line: 32).
    Message number RS_EXCEPTION 000
    SQL error: POS(3306) Too many order columns
    Message number DBMAN 257
    Error reading the data of InfoProvider xxxxxx
    Message number DBMAN 305
    You have already implemented Note 1065380.
    Other terms
    CX_SQL_EXCEPTION, message number, RS_EXCEPTION 000, DBMAN 257,  RSBK 242,
    RS_EXCEPTION 000
    Reason and Prerequisites
    The MaxDB internal limit of 4016 bytes or 128 fields for GROUP BY columns was exceeded.
    Solution
    When you implement these corrections, no aggregation is performed for the data (GROUP BY) if the limits of the MaxDB database have been exceeded.
    The limit values for the aggregation bahavior can also be manually reduced if there are problems with the default values.
    Two RSADMIN parameters are provided for this.
    MAXDB_MAX_GROUP_BY_FLDS is the maximum number of GROUP BY fields. The default value is 128.
    MAXDB_MAX_GROUP_BY_LEN is the maximum total length of the GROUP BY fields. The default value is 4000.
    SAP NetWeaver BI 7.00
               Import Support Package 21 for SAP NetWeaver BI 7. 00 (SAPKW70021) into your BI system. The Support Package is available when Note 1270629"SAPBINews NW 7.00 BI Support Package 21", which describes this Support Package in more detail, is released for customers.

Maybe you are looking for