Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update

Status
Not open for further replies.

hluash

Programmer
Aug 7, 2001
10
0
0
UG
Iwant a code for updating a table from a form. Somebody help
 
Hi,

I don't completely follow. You would like sample code of an update statement, or how to update a table through forms via a data block.

By any chance is this related to your earlier post?
 
blaje02 My problem is changing the record status from insert to changed.
cur_rec number;
cur_rec := Get_Block_Property( 'blk_1', CURRENT_RECORD);
SET_RECORD_PROPERTY( cur_rec, 'blk_1', STATUS, CHANGED_STATUS);
so i imagined that if I change the record status to changed I would be able to save an edited record. But it looks the code for set_record property is not seen.
Does this explain what I want?
 
A record status will change as soon as the item is
modified...you do not have to manually change it. Unless of course you're doing something really interesting.

Are you trying to update the table through code that you want kicked off by an event? A changed record will be updated in the database as soon as the COMMIT_FORM is processed, if that record is part of a database block.

Couple of questions

1) Is the block based on a table/view

2) Is this a database item

3) Have you altered the KEY-COMMIT at all

4) Is it PL/SQL code that you wish to do the updating
 
1) Is the block based on a table/view --Yes it is

2) Is this a database item --yes they are several db_items

3) Have you altered the KEY-COMMIT at all --I use commit_form (And then gives me a message that cannot insert the record. The error no. is because a record with that primary key is already in.

4) Is it PL/SQL code that you wish to do the updating
Nope not a code to be updated but a table.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top