why does the insert statement don't work???
(the duration row is a int type.)
insert into log(duration)values('90890p')
BEGIN
print 'error'
END
insert into log(duration)values('90890p')
BEGIN
print 'error'
END
Mark Allison.
> insert into log(duration)values('90890p')
> BEGIN
> print 'error'
> END
1. Exception handling for dynamic SQL statement
Hi,
is anyone know how to make exception handling for dynamic PL/SQL statement?
it seems my exception handling cannot catch the error when my insert
statement get error. It just leave as program success. But if I turn off the
exception section, it will give me error report
ERROR at line 1:
ORA-01401: inserted value too large for column
ORA-06512: at "SYSADM.RU2", line 84
ORA-06512: at line 1
ORA-00001: unique constraint (SYSADM.PS_MESSAGE_LOG) violated
following is my code.
Thanks for your help!!
Phil
PROCEDURE RU2
(
...parameters...
)
IS
/* declaration */
/*--------------------------------------------------------*/
BEGIN
/* open a cursor for this next object */
cursor_handle := DBMS_SQL.OPEN_CURSOR;
/* Construct the SQL statement and parse it. */
DBMS_SQL.PARSE(
cursor_handle,
'INSERT INTO PS_MESSAGE_LOG (....) VALUES (...);
DBMS_SQL.BIND_VARIABLE(...);
.....
ReturnCode := DBMS_SQL.EXECUTE(cursor_handle);
DBMS_SQL.CLOSE_CURSOR(cursor_handle);
---------------------------------------------------
EXCEPTION
---------------------------------------------------
WHEN OTHERS
THEN
DBMS_OUTPUT.ENABLE;
DBMS_OUTPUT.PUT_LINE('some error message here');
DBMS_OUTPUT.DISABLE;
END; --end of procedure RU2
2. OLE objects from Paradox table to Delphi form?
3. Exception handling in CREATE FUNCTION - how to handle - URGENT HELP NEEDED
5. Problem with Insert command statement and updating SqlServer
6. pdox5.0:multipage-forms:DON'T WORK OK!!
7. select + insert vs. insert and catching exception
8. Embedded SQL and exception handling
9. Strange behavior of SQL Server for exception handling
12. SQL Server 7 error (exception) handling