Forms :: Display Line Number Where Exception Raise?

Feb 25, 2011

We have Forms 10g for our application.

When i raise a exception in a procedure / trigger, i want to show the line number where the exception happened. is there any builtin to show that.

For eg

Exception when others
message('Error in this procedure');
raise;

I want the above exception to raise with line number also. How do i do it. I need some built in procedure in forms.

View 10 Replies


ADVERTISEMENT

Forms :: Use RAISE FORM-FAILURE-TRIGGER In EXCEPTION?

Jun 12, 2012

My requirement, if there is no record in emp table when validate the EMP_NO_CHK text field, i need to set the focus on that field (EMP_NO_CHK) itself. But while execute the following code, I got error.chieve the task.

--EMP_NO_CHK_WHEN_VALIDATE_ITEM Trigger
-----------------------------------
Declare
cursor c is Select * from emp where Emp_no = :header.empno;
c1 emp%rowtype;
n NUMBER;

[code]...

View 4 Replies View Related

Forms :: WHEN-VALIDATE-ITEM Trigger Raise Unhandled Exception ORA-01422

Sep 15, 2011

I have a form (StaffDetail) with three different blcoks. One of them is an Application Assignment block which consists of nothing but Assignment Type, Staff (Name), Last Updated By and Last Updated Date.. The Assignment Type and Staff has LOVs assigned to them individually.. Assignment type lets me pick all different types except for Project Manager. As soon as I select this option, i get the following error :

FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception...

This does not even let me select any other Assignment type, then i have to go close all sessions and come back into the same screen.

Also, this form was first created and tested on the development environment and later moved to QA environment. All selections work in the development environment.. I checked for the roles in QA for individual Users..

View 2 Replies View Related

Forms :: Ora-04062 When-validate-item-trigger Raise Unhanded Exception?

Oct 15, 2011

I have Written this code in WHEN-VALIDATE-ITEM-TRIGGER on PO_DATE field

if not( :PO_HEADER.PO_DATE IS NOT NULL ) then
:po_header.po_date := trunc(sysdate);
end if;
if trunc(:PO_HEADER.PO_DATE)>trunc(sysdate) then
displayerror.errmsg('PO date cannot be future date!');

[code]...

when i am navigating through po_DATE field in the form its showing the error that

WHEN-VALIDATE-ITEM-TRIGGER raised unhandled exception.

View 2 Replies View Related

PL/SQL :: Write In Sql Command Line Display CUSTOMER Number?

Sep 13, 2013

how to write this in sql command lineDisplay CUSTOMER number, name, rep, balance, and credit limit for all CUSTOMERs of Rep 20. 

In addition, display this information for CUSTOMERs of rep 65 who have a $10,000 credit limit.  Arrange the output by credit limit descending within rep ascending. no more than two decimal digits

View 3 Replies View Related

SQL & PL/SQL :: SELECT Will Raise NO_DATA_FOUND Exception

Feb 10, 2011

I was going through the link: URL....Here within the box under the title 'Exception Handling -- Quick Facts and Tips', it states, Once you have handled an exception, normal program execution continues. You are no longer in an "exception" situation.

I wanted to verify this and used the below:The DDL and DMLs:

CREATE TABLE emp(empno NUMBER(4), ename VARCHAR2(10));
INSERT INTO emp VALUES(7369,'SMITH');

The program:

DECLARE
x VARCHAR2(10);
BEGIN
SELECT ename INTO x FROM emp WHERE empno=4567;
SELECT ename INTO x FROM emp WHERE empno=7369;
DBMS_OUTPUT.PUT_LINE(x);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('ERROR OCCURED');
END;

The first SELECT will raise NO_DATA_FOUND exception. Even though I have handled it, the second SELECT is not executing.But the link says, that normal program execution will continue. So, Iam expecting the second SELECT statement to work.

View 4 Replies View Related

PL/SQL - See If Given Item In Table Or Not And Then Raise Exception?

May 2, 2009

I'm trying to figure out how to simply check and see if a given item is in a table, and if its not, then raise an exception.

for example i have a table employees and each employee has a primary key employID. I need to write a procedure where employID is given as a parameter and if the one given isnt in the table then raise an exception.

View 3 Replies View Related

SQL & PL/SQL :: Raise Exception With All Elements In Collection

Nov 17, 2011

PROCEDURE test_data(
)
IS
TYPE test_tab IS TABLE OF NUMBER(15);
t1 test_tab;
BEGIN

I have missing elements in a collection that should be reported to the terminal while running the procedure

IF t1.COUNT > 0 THEN
RAISE_APPLICATION_ERROR('Missing Elements: ' || elments from collection t1);

How can I raise an exception with all the missing elements from collection t1 here?

END IF;
END;

View 8 Replies View Related

SQL & PL/SQL :: How To Raise Exception When Inserting Record In Table

Jul 5, 2011

How to raise a exception when inserting a record in a table using plsql?

View 11 Replies View Related

PL/SQL :: How To Insert Data While NO_DATA_FOUND Exception Raise

Aug 19, 2013

create or replace procedure set_update(p_name in varchar2,p_email in varchar2)is  l_data user_details%rowtype;                          beginselect * into l_data             from user_details ud             where ud.name = p_name             and ud.email = p_email;  if l_data.name = p_name and l_data.email = p_email then    update user_details    set last_login_date = sysdate , date_updated = sysdate     where name = p_name and email=p_email;  end if; exception when no_data_found then    insert into user_details(user_id,name,last_login_date,date_updated,date_created,email)    values (l_data.user_id,p_name,l_data.last_login_date,l_data.date_updated,sysdate,p_email);end set_update; 

This is my procedure will pass two parameters if it is available in table it will update other wise insert that data in table. My problem is while data is not available that data is inserted into table but that not inserted into table. 

View 7 Replies View Related

PL/SQL :: What Kind Of Exception Can Raise A Select Statement Excluding NO_DATA_FOUND

Oct 23, 2013

what kind of exception can raise a select statement excluding NO_DATA_FOUND; For example i try to run the following: select * from departments where departments_id=11; In a situation like that what kind of error oracle can raise?I'm asking this because i have some procedure that just do a select statment and i want to know if there is a valid reason to put the exception others at the end of the procedure.

View 25 Replies View Related

Forms :: How To Display Tab Pages In Line Level

May 25, 2011

how to display tab pages in line level?

View 1 Replies View Related

Forms :: How To Find Line Number Of Error In 6i

Jun 4, 2012

How to find the line number along with package name or procedure name (for ex. in Oracle 10g DBMS_UTILITY.FORMAT_ERROR_BACKTRACE ) where exactly error is coming in forms.There is plsql code written and while executing the code, ORA-01722: invalid number error is coming. For easy tracing the error, any way is there ?

I searched in Google before posting in this forum and found that ON-ERROR trigger if we write DBMS_ERROR_TEXT it will display the ling number along with package or procedure name. But it is not working and this is only giving me error name no line number.

View 3 Replies View Related

Forms :: Implement Exception Handling In Exception Block Of A Trigger

Oct 10, 2011

I have to implement exception handling in the exception block of a trigger, Quote:exception

when ora_java.java_error then
message( 'Unable to call out to java, ' || ora_java.last_error );
ORA_JAVA.CLEAR_EXCEPTION;

when ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message( Exception_.toString(ex));
-- lv_exception := Exception_.getMessage(ex);

I get an error for the line: 'message( Exception_.toString(ex));'I have imported the java classes FException et IObject with their methods.

I have to create a Web Service Client, so I wonder if the paragraph Quote:when ORA_JAVA.EXCEPTION_THROWN then ex := ORA_ JAVA. LAST_ EXCEPTION; is mandatory.

View 2 Replies View Related

Reports & Discoverer :: Formatting - Display Value Of Field In Single Line

Oct 20, 2010

I have developed one report but need one formatting suggestion. There is one field called "DESCRIPTION", I want the value of this field to be displayed in a single line. Now the big values are wrapped into multiple line.

Now,

DISPLAY
----------------
This is a Oracle
Report.

I want,
DISPLAY
------------------------
This is a Oracle Report.

Maximum size of "DISPLAY" field is VARCHAR2(240).

View 3 Replies View Related

Application Express :: Causing (new Line) In Display Of Text In A Report

Jul 27, 2012

Oracle 11.2; application express 4.1...I have a table with a unicode clob column into which I insert descriptive text. Within these text entries I have inserted CR/LF (00D00A). However when I display the text entries in a report, the text streams instead of appearing with separate lines.

My report statement:
select text_entry_dt, entry_authy_nm, entry_text
from obj_text
where obj_id = :P41_FIND_ID
  and text_type_cd = 'DES'

hat to do to obtain line separation within the entry_text content?

View 3 Replies View Related

SQL & PL/SQL :: Exception Handler For ORA-1722 Invalid Number

Oct 8, 2012

I have to ask a pretty basic question (my pl/sql skills need serious work). I need to validate that a string can be converted to a number, and if it can't be, substitute something else. This works:orcl> create or replace function jw_to_number(str varchar2) return number is

2 n number;
3 begin
4 n := to_number(str);
5 return n;
6 exception when others then return 0;
7 end;
8 /

Function created.

orcl> select jw_to_number('a') from dual;
JW_TO_NUMBER('A')
-----------------
0
orcl>

but of course I don't want to use WHEN OTHERS. So I tried this:orcl> create or replace function jw_to_number(str varchar2) return number is

2 n number;
3 begin
4 n := to_number(str);
5 return n;
6 exception when INVALID_NUMBER then return 0;
7 end;
8 /

Function created.

orcl> select jw_to_number('a') from dual;
select jw_to_number('a') from dual
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "SCOTT.JW_TO_NUMBER", line 4
orcl>I

thought this would replace the standard error handler with my own, but it doesn't. I tried redeclaring the pre-defined exception, same result.

View 4 Replies View Related

PL/SQL :: How To Reset Line Number Value For Each Header

Jul 1, 2013

I need to reset the line number for each header values.

create table header_table(header_value varchar2(100));
create table line_table(header_value varchar2(100), line_number number);
insert into header_table values('ALAOF');

[Code]....

But My line table output looks like below

LINE TABLE:

header value line_number

ALAOF 1
ALAOF 2
ALAOF 3

[Code].....

View 6 Replies View Related

Forms :: Raise Alert When Browser Closed In 11g

Feb 27, 2012

I am working on Forms [32 Bit] Version 11.1.1.4.0 (Production). OS is Win 7 (32 bit). Internet Explorer 8. My Requirement is I need to raise an alert when user close the browser window before closing the Form.

View 2 Replies View Related

Forms :: Raise Frm-41352 When Password Expired

Jul 20, 2010

we are working to increase the security of our oracle application by adding profil and expiration to all our database username.

Expiration is actually set to 60 days.So if i understand it correctly, 60 days is counting from when i change my password. So if I change it at 10:30am it will expire at 10:30am in 60 days.

Our forms application is calling all forms using the command open_form with SESSION parameter to open all forms in new session.

My problem is when the user connect in the system let say at 9:00am. At 10h30am the password will expire and when the user will click to open a new form from the application he will get the message ORA-28001:the password has expired.The new module will open even if password is expired and will raise the error FRM-41352: Failed to create session. So the module will stay in the same session than the caller.

Is there a way to catch the ORA-28001 and force a new logon.Probably with some code in the ON-ERROR of the called module but this mean that i will have to change +400 forms.

View 1 Replies View Related

Count Number Of Lines In Multi Line String

Aug 2, 2007

I have a string like this:

s_list varchar2(234) :=
'asdasd
asfsdf
dsfsdfs
dfsdfs';

How can I find the number of lines in this string? I tried using

INSTR('s_list', '
', 1, 1)

but it gives 0.

Is there any inbuilt function/proc SQL or PL/SQL which can do this?

View 2 Replies View Related

Reports & Discoverer :: Multiple Record Printing On Same Line Number In Oracle 10g?

Jun 28, 2013

I want to print two record of emp table in same line number in tabular format report.

For example if i have emp table and I want to print empno,ename,sal columm only,In tabular format report, Two record should print per line. so If emp table have 14 record report should be printed on 7 rows.

so the output in print preview should be like this

EMPNO ENAME SAL EMPNO ENAME SAL
------ ---------- ----------------------------------------------
7369 SMITH 800 7499 ALLEN 1600
7521 WARD 1250 7566 JONES 2975
7654 MARTIN 1250 7698 BLAKE 2850
.
.
.
.

View 1 Replies View Related

Display Different Number Of Rows?

Jan 23, 2009

i have a table displaying location, cost, inner_num and rownum ordered by the descending order of the cost.

the question is: display locations of the highest 10 costs. if the cost of 11th row is the same as 11th, then display 11 rows.

View 3 Replies View Related

Application Express :: Exception Handling Pl Packages And APEX Exception Handler

Oct 7, 2013

APEX 4.2Oracle 11g Database We are using the standard exception handler that was introduced in APEX 4.1, and we have code in packages & procedures in the database (following proper processes of keeping code in the database where possible).  When an exception is found in the procedures/ packages/functions, should the APEX application level exception handler catch any errors that occur or should they be handled in the package/procedure/function they occurred in? Why I ask if, we right now have exception handling code in the pl/code bodies BUT they write their errors to the same table that Apex's Exception handler does, but the errors are NOT presented to the user using the APEX exception handling mechanism.

View 2 Replies View Related

Wrong Number Format Display Using DBLink

Jan 7, 2013

I have an issue trying to execute some queries using a dblink. When i run any query with numeric fields only display 4 digit and int the source database the fields have 5 digit. The dblink work between ans MSSQL database to an Oracle Database

Example:
MSSQL
select cardnumber from card
cardnumber
19121
19122

Oracle (with dblink)
select cardnumber from card@dblink1
cardnumber
1912
1912

View 1 Replies View Related

SQL & PL/SQL :: Display Week Number As Per Financial Year (Apr - Mar)

Dec 9, 2012

I hava an requirement to get week number from particular date as per indian financial year(ie apr-01 to mar-31).I have tried with to_char(the_date_field,'w') and to_char(the_date_field,'iw') formats but I know its only shows the iso standard.

But I want the weeknumber 1 has to be started from april-01 not from jan-01.For more explanation see below,

Date week_no
apr 01 to 07 1
apr 08 to 14 2
apr 15 to 21 3
.
.
.
.
.
Next year mar - 31 n

how to do this am waiting for your reply.

View 4 Replies View Related

Application Express :: Display Row Number In Report Region

Feb 6, 2013

I would like to display the row number in the report region at the beginning of each row for each page (based on the number of rows to display per page).

So if the number of rows per page is 15, I would want to show each row from 1 to 15. When going to the next page (16 - 31) I would like to show row 1 to 15 again next to each row. And if the number of rows per page is 20, I want to see row numbers 1 to 20 on each page.

Since I believe an Update button only processes the current page, I would like to then use this row numbers (1 - 15) to get the values of the displayed column for each row to perform an insert to another table.

View 1 Replies View Related

Spatial :: Convert Multi-line To Simple Line

Feb 13, 2013

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0

We are processing spatial data from another source to display in our GIS environment. The data is a set of multi lines. The gtype is 2006. A typical geometry looks like:

SDO_GTYPE     2006
SDO_SRID      31370
SDO_POINT.X   NULL     
SDO_POINT.Y   NULL
SDO_POINT.Z   NULL
SDO_ELEM_INFO (1,2,1, 7,2,1)
SDO_ORDINATES (105094.84, 195084.96,
105094.54, 195080.22,
105094.84, 195084.96,
105094.84, 195084.96,
105094.68, 195082.47 )

Now, this is not an actual multiline... it's just encoded as a multi line, but if you look at the coordinates you'll see that the end point of the first line is the same as the beginning of the second line (105094.84, 195084.96).

A better way to encode this geometry would be:

SDO_GTYPE     2002 <---
SDO_SRID      31370
SDO_POINT.X   NULL     
SDO_POINT.Y   NULL
SDO_POINT.Z   NULL
SDO_ELEM_INFO (1,2,1)
SDO_ORDINATES (105094.84, 195084.96,
105094.54, 195080.22,
105094.84, 195084.96, <---
105094.68, 195082.47 )

Is there a standard function in Oracle that does this conversion for me? Or do I have to write my own :)

View 4 Replies View Related

Reports & Discoverer :: Change Number Of Column Display According To The Condition

Apr 18, 2012

Recently I am facing a problem while working with Oracle reports 2.5.

My requirement is:
there is a report in which there are 5 columns right now. Now what i want is, whenever a condition will satisfy , a new column should be also display in that report otherwise it must be stay as it is.

Previously : a b c d
Now if a=1 : a b z c d
else
a b c d
where a,b,c,d,z are columns.

View 1 Replies View Related

SQL & PL/SQL :: Display Total Number Of Employee Working Under President In Emp Table

Apr 27, 2012

display the total number of employee working under president in emp table

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved