Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Oracle > plsql help??????

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

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....
--------------------------------------------
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 11-30-03, 05:47
satish_ct satish_ct is offline
Registered User
 
Join Date: Nov 2003
Location: Bangalore, INDIA
Posts: 333
Thumbs up

Hi,

THis error is due to the number of arguments specified for the default constructor doesn't match the number of attributes of the object type. Specify the correct number of arguments for the default constructor and retry the operation.
__________________
SATHISH .
Reply With Quote
  #3 (permalink)  
Old 11-30-03, 08:38
mijan mijan is offline
Registered User
 
Join Date: Nov 2003
Location: UK london
Posts: 5
Quote:
Originally posted by satish_ct
Hi,

THis error is due to the number of arguments specified for the default constructor doesn't match the number of attributes of the object type. Specify the correct number of arguments for the default constructor and retry the operation.



yeah i see what u mean , but i dont see anything wrong wioth the number of attributes,. i have 4 attributes and then i have inserted 4 values, so what bit am i missing from here???

thanx for you help..

mijan
Reply With Quote
  #4 (permalink)  
Old 12-01-03, 11:30
shelva shelva is offline
Registered User
 
Join Date: Nov 2003
Location: Rotterdam, Netherlands
Posts: 127
Hi
in that u have airport reference as a reference object
u have to provide value to that also...
atleast a null value.

regards
Shelva
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

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