Advertisement

03.19.2004 at 02:05AM PST, ID: 20924542
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.6

Deleting record from table and from tree the same time

Asked by Solve in Oracle 3rd Party Tools

Tags: ,

Hello to all,

I created a hierarchical tree for my table with self join. Here I display all data from that table.
Next to the tree, I created a data block, there I see all my table's data fields.
Then I created two buttons. One from them is New (record) and other Delete (record)
When I push "New", I want the record to be inserted to the table and to the tree
When I push "Delete", I want the record to be deleted from table and from tree, too.

My code:

--In when-new-form-instance populating the tree

DECLARE
      
      selektas VARCHAR2(500);
      rg_name VARCHAR2(40) := 'RG_DAL_MED';
      rg_id RecordGroup;
      find_node Ftree.NODE;
      n NUMBER;
      m NUMBER;
      htree ITEM := Find_Item('MEDIS');

BEGIN
      
rg_id := Find_Group(rg_name);
IF NOT Id_null(rg_id) then
 DELETE_GROUP(rg_id);
END IF;
      
selektas := 'Select 1, level, DAL_PAV, NULL, DAL_ID from T_DAL
 start with PAVALD_ID is null
 connect by prior DAL_ID=PAVALD_ID';      
      
rg_id := Create_Group_From_Query(rg_name, selektas);      
n := Populate_Group(rg_id);
n := Get_Group_Row_Count(rg_id);
      
IF n > 0 THEN
   Ftree.set_tree_property(htree,Ftree.record_group,rg_id);
END IF;
      
END;

--when-button-pressed  (button "New"),

--but first I enter values for my new record(pree another button "Insert record"

declare
      htree ITEM;
      top_node ftree.node;
      new_node FTree.node;
      item_value NUMBER;
      item_name VARCHAR2(100);
      
begin
      htree := Find_Item('F_MEDIS.MEDIS');
      item_value := :T_DAL.dal_id;
      item_name := :T_DAL.dal_pav;
      new_node := Ftree.add_tree_node(htree,
                        Ftree.root_node,
                        Ftree.parent_offset,
                        Ftree.last_child,
                        Ftree.expanded_node, item_name, NULL, item_value);  
end;

-- when-button-pressed "Delete"

declare
      htree ITEM;
      top_node ftree.node;
      delete_node FTree.node;
      delete_value varchar(100);
      
begin

delete_record;
htree := Find_Item('F_MEDIS.MEDIS');
      
delete_value := :T_DAL.dal_pav;

delete_node := Ftree.find_tree_node(htree,delete_value,
                                       Ftree.FIND_NEXT,
                                       Ftree.node_label,
                                       Ftree.root_node,
                                       Ftree.root_node);
IF NOT Ftree.ID_NULL(delete_node) then
  Ftree.delete_tree_node(htree, delete_node);
end if;
      
end;

My question: when I inserting everything works properly... I insert new record, then I push button "New" and see a new node in my tree appears.
But when I want to delete a record, I select a node in a tree, when press butto "delete" and get such an error

FRM-99999: Error 7343 occured. See the release notes file (relnotes) for information about this error.

My record is deleted, a node from tree deleted...

Mabe you have some addvices for me, how to go arround this error or how to delete a record from table and from tree the same time. Some other triggers or codes?

Solveiga


Start Free Trial
[+][-]03.19.2004 at 02:29AM PST, ID: 10631897

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 02:34AM PST, ID: 10631923

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 04:08AM PST, ID: 10632264

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 04:28AM PST, ID: 10632360

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 04:39AM PST, ID: 10632422

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 04:57AM PST, ID: 10632510

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 05:25AM PST, ID: 10632682

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 05:45AM PST, ID: 10632825

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.19.2004 at 06:00AM PST, ID: 10632942

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.20.2004 at 03:10AM PST, ID: 10639744

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle 3rd Party Tools
Tags: error, 7343
Sign Up Now!
Solution Provided By: musdu
Participating Experts: 2
Solution Grade: B
 
 
[+][-]03.21.2004 at 10:54PM PST, ID: 10647059

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.21.2004 at 11:07PM PST, ID: 10647112

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.21.2004 at 11:10PM PST, ID: 10647117

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.21.2004 at 11:16PM PST, ID: 10647139

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.22.2004 at 06:38AM PST, ID: 10649088

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.22.2004 at 09:49PM PST, ID: 10655333

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32