If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > plsql help please??????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-30-03, 16:44
mijan mijan is offline
Registered User
 
Join Date: Nov 2003
Location: UK london
Posts: 5
plsql help please??????

hello there i am new to PLSQL i thought someone must now what the problem is here...

when i try to insert value after inserting a pointer to a object_type it does work i get the following error.... can sum one tell me wat is missing from the coding??????

--------------------------------------------
SQL> insert into FlightList values (FlightList_type
2 (00001,00002,1234,1234));
insert into FlightList values (FlightList_type
*
ERROR at line 1:
ORA-02315: incorrect number of arguments for default constructor

----------------------------------------------------------------


create or replace type FlightList_type as object
(FlightListNo number(5),
FlightNo number(5),
ArrivalTime number(4),
DepartureTime number(4),

Airport_pt ref Airport_type, ---- reference pointer----

member function GetPlaneNo return number,
pragma restrict_references (GetPlaneNo , WNDS));
/

create table FlightList of FlightList_type;
insert into FlightList values (FlightList_type
(00001,00002,1234,1234));



can someone please help....thank you for your time..

Mijan
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 05:29
dr_suresh20 dr_suresh20 is offline
Registered User
 
Join Date: Sep 2003
Posts: 218
Check the number of values that you are passing in the argument list. you get ORA-02315: error if the number of arguments does not match with the orginal list.

HTH.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On