Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> determine last_error_position
Hi,
somewhere I've found the following sored procedure for getting the error position for a given sql-statement
O_ERROR_POS out NUMBER,O_ERROR_TEXT out varchar2)
AUTHID CURRENT_USER
IS
cur1 integer;
BEGIN
O_ERROR_POS := -1; O_ERROR_TEXT := '?'; cur1:=dbms_sql.open_cursor; dbms_sql.parse(cur1, I_SQL_TEXT,dbms_sql.native); dbms_sql.close_cursor(cur1); EXCEPTION when others then O_ERROR_POS := dbms_sql.LAST_ERROR_POSITION; O_ERROR_TEXT := SQLERRM; if dbms_sql.is_open(cur1) then dbms_sql.close_cursor(cur1); end if;
Is there a better solution for determining error_position? Or is then "EXCEPTION when other .." to improve?
-- Best regards Dietmar BrueckmannReceived on Wed Jan 26 2005 - 06:31:03 CST