Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    UK london
    Posts
    5

    Unanswered: 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

  2. #2
    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 .

  3. #3
    Join Date
    Nov 2003
    Location
    UK london
    Posts
    5
    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

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •