frm-40508: oracle error: unable to Insert Record [message #203833] |
Thu, 16 November 2006 09:01 |
ghostly
Messages: 17 Registered: November 2006 Location: UK
|
Junior Member |
|
|
Hi, i got a error message where i am unable to insert record. firstly the 2 table below:
CREATE TABLE Staff_Order
(Staff_Order_ID varchar2(6) NOT NULL,
Staff_ID varchar2(6) NOT NULL,
SO_date DATE,
Constraint staff_order_id_pk PRIMARY KEY (Staff_Order_ID ),
Constraint staff1_id_fk FOREIGN KEY (Staff_ID) REFERENCES STAFF);
which is okay but the table below is not able to save data when entered.
CREATE TABLE Staff_Order_delivery
(Staff_Order_ID varchar2(6) NOT NULL,
Product_ID varchar2(6) NOT NULL,
Pro_supp_id varchar2(6) NOT NULL,
Quantity_Required NUMBER,
Constraint staff_id_prod_id_cpk primary key ( Staff_Order_ID, product_id),
Constraint staff4_id_fk foreign key (Staff_Order_ID) REFERENCES Staff_Order (Staff_Order_ID),
Constraint pro_supp_fk foreign key (Pro_supp_id ) REFERENCES Product_Suppiers (Pro_supp_id),
Constraint product_id1_fk foreign key (product_id) REFERENCES product (product_id));
the staff order id does not save the data and that is all because i was unable to retrieve data from pro_supp_id which is a foreign key for the Actual_Unit_Price so the table for that is
CREATE TABLE Product_Suppiers
(Pro_supp_id varchar2(6) NOT NULL,
Product_ID varchar2(6) NOT NULL,
Supplier_ID varchar2(6) NOT NULL,
PS_Date_Purchased DATE,
PS_Quantity_Supplied NUMBER,
Actual_Unit_Price NUMBER,
Constraint pro_supp_id_pk PRIMARY KEY (Pro_supp_id),
Constraint prod_id_fk FOREIGN KEY (Product_ID ) REFERENCES Product,
Constraint Sup_id_fk FOREIGN KEY (Supplier_ID ) REFERENCES SUPPLIER);
Although i was able to save data but when i modified the Actual_unit_price post query with its text box than it went all wrong for some reason??
Has any1 got any ideas what could be the problem???
|
|
|
|
|
|
Re: frm-40508: oracle error: unable to Insert Record [message #204163 is a reply to message #203885] |
Sat, 18 November 2006 06:26 |
ghostly
Messages: 17 Registered: November 2006 Location: UK
|
Junior Member |
|
|
Hi when i click on the help??? it states this:
SQL STATEMENT ERROR:
SELECT ROWID,STAFF_ORDER_ID,PRODUCT_ID,PRO_SUPP_ID,QUANTITY_REQUIRED,ACTUALPRICE FROM STAFF_ORDER_DELIVERY WHERE (STAFF_ORDER_ID=:1)
eRROR:
ORA-00904: "ACTUALPRICE": invalid identifier
|
|
|
|
|