/** Write auto-marshal command: "Sync WebService use" wyg 2017-03-12 * /PROCEDURE Isdt_vehicle_autolock (P_wid in VARCHAR2, P_vehicleno in VARCHAR2, p_state out INT, p_msg off VARCHAR2) is BEGIN INSERT INTO T_isdt_elockautorequest (RequestID, wid, Vehicleno, operatetype, created_ Date, last_updated_date) values (Sys_guid (), P_wid, P_vehicleno, 1, sysdate, sysdate); COMMIT; P_state: = 1; P_msg : = ' success '; EXCEPTION when OTHERS and then rollback; P_state: = 0; P_msg : = SUBSTRB (' line: ' | | dbms_utility.format_error_backtrace () | | ' occur error; ' | | SQLCODE | | ', ' | | SQLERRM, 1, (+ ); END;
EXCEPTION when Dup_val_on_index and then inserts into T_isdt_vehicle_track_err (Car_num, Gpstime, Lon, LAT, speed, direction, odometer, statusstr, Placeroad, Created_date, created_by) VALUES (P_car_num, P_gpstime, P_lon, P_lat, P_speed, P_direction, P_odometer, P_statusstr, P_placeroad, Sysdate, 1); P_state:=0; P_msg:= SUBSTRB ('Line :'|| Dbms_utility.format_error_backtrace () | |'occur error;'|| SQLCODE | |','||SQLERRM,1, $); COMMIT; When OTHERS and then ROLLBACK; P_state:=0; P_msg:= SUBSTRB ('Line :'|| Dbms_utility.format_error_backtrace () | |'occur error;'|| SQLCODE | |','||SQLERRM,1, $);
Show Results:
ine:ora-06512: In "Employedb.__data_sync", line 512
occur error;-12899,ora-12899: Column "EMS". " T_isdt_elockautorequest "." WID value is too large (actual value: 137, Maximum: 50)
Exception Handling for Oracle