I am working on porting a module that has procedures for updating
the object table:
procedure set_attrs (
activity_id in activities.activity_id%TYPE,
notes in activities.notes%TYPE default null
)
is
begin
if notes is not null then
update activities set notes = set_attrs.notes
where activity_id = set_attrs.activity_id;
end if;
end set_attrs;
-- and to null a note:
procedure reset_attr (
activity_id in activities.activity_id%TYPE,
column_name in varchar
)
is
begin
if column_name = 'notes' then
update activities set notes = NULL
where activity_id = reset_attr.activity_id;
end if;
end reset_attr;
I have been looking through the ported code and I haven't found any
examples for updating the object tables. Is this done through simple
update statements? For updating in my tcl pages I use something like
this:
db_exec_plsql end_activity {
begin
activity.set_attrs (
activity_id => :activity_id,
end_time => sysdate
);
end;
}
Is this to be ported to a db_dml
?