Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> ORA-01008:not all variables bound
While executing the following database trigger (update) we are getting the
following error message
"ORA-01008:not all variables bound". We are working on Oracle 8.0.3
We have written this trigger to get the column name,old and new values of
fields of a table (locmast) while updating.
We do not want to hard code the field names ,so that in future if a new
field is added we need not have
to alter the trigger.
declare
v_rowid varchar2(50); cursor cur_loc is select column_name from all_tab_columns where table_name='LOCMAST'; v_val varchar2(120); cur_id number; v_rec_id number;
dbms_sql.parse(cur_id, 'select :old.'||rec_loc.column_name||' from dual' ,dbms_sql.native);
dbms_sql.define_column_char(cur_id,1,v_val,120); v_rec_id := dbms_sql.execute_and_fetch(cur_id); dbms_sql.column_value_char(cur_id,1,v_val);end loop;
Thanks
Deepa
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: PK_Deepa/VGIL_at_vguard.satyam.net.in
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Oct 24 2002 - 07:49:30 CDT
![]() |
![]() |