Update transaction

From: Jonathan Bartolo <jonabart_at_fastnet.net.mt>
Date: Mon, 03 Apr 2000 18:36:37 +0200
Message-ID: <38E8C894.28D5EC45_at_fastnet.net.mt>



Can I update a field of a table from a procedure. I have this procedure

create Procedure Tran2 (publish IN book.publisher%type) is
 Type price_data_record is record
  (ISBN_NO book.ISBN%TYPE,
   book_name book.name%TYPE,
   author_name book.author%TYPE,
   book_price book.price%type,
   new_book_price book.price%type);
   price_record price_data_record;
 CURSOR c2 is
  Select ISBN, name, author, price
  from book
  where book.publisher = publish;
Begin
 Open c2;
 LOOP
  Fetch c2 into price_record;
  exit when C2%NOTFOUND;
  DBMS_output.Put_line('ISBN No '|| price_record.ISBN_NO);
  DBMS_output.Put_line('Name of Book '|| price_record.book_name);
  DBMS_output.Put_line('Author '|| price_record.author_name);
  DBMS_output.Put_line('Price Lm'|| price_record.book_price);
  DBMS_Output.Put_line('New Price'||:new_book_price);

This line is the problem ... I need to update this record with a new price. But the user has to input the new price.
When I try to compile this procedure it telling me that i have a bad Variable bind
Can you help me please

Regards
Jonathan Received on Mon Apr 03 2000 - 18:36:37 CEST

Original text of this message