Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 6th, 2006, 04:19 PM
sillychuckie sillychuckie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 46 sillychuckie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 5 m 58 sec
Reputation Power: 5
Inserting object (self) into oracle table

I am trying to define the following method:

Code:
CREATE OR REPLACE TYPE BODY Customer_objtyp
AS MEMBER PROCEDURE Assign_offer(offer IN Offer_objtyp) IS
BEGIN
	INSERT INTO Offer_assignment_tbl
         (customer)
         VALUES
	REF(SELF);
END Assign_offer;
END;
/


Unfortunately, I am shown the oracle error:
4/2 PL/SQL: SQL Statement ignored
5/11 PL/SQL: ORA-03001: unimplemented feature

I have also tried the following instead of REF(SELF);
"SELF", "DEREF(SELF)", "TREAT(SELF AS Customer_objtyp)" and many combinations in between.

How do I create a function that can insert the object the function is called on (SELF) into another table as shown above?
The other table is implemented correctly and is expecting a reference to this type.
Thanks.

p.s) Ignore the unused param passed in 'offer' as I plan to make use of this a little later.

Reply With Quote
  #2  
Old February 6th, 2006, 06:29 PM
sillychuckie sillychuckie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 46 sillychuckie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 5 m 58 sec
Reputation Power: 5
well, I have solved it by selecting the object 'SELF' again, from the Customer_objtab table, checking the 'ID' param to ensure I am getting the same value that 'SELF' represents... but this is completely stupid.
Surely I can just use 'SELF' directly?

Oracle continues to baffle me with its shoddy implementations of so-called 'OO'.
If there is a sensible way of doing this please let me know.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Inserting object (self) into oracle table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT