Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

package compile help

Status
Not open for further replies.

theresatan

Programmer
Mar 18, 2002
101
US
Hi,

I have following error when I create a package body, but it did not say any hind:

Warning: Package Body created with compilation errors.

Any idea?

Following is my script(run on oracle 92)

CREATE TABLE PARTS
(ID NUMBER(38)
,DESCRIPTION VARCHAR2(250) NOT NULL
,UNITPRICE NUMBER NOT NULL
,ONHAND NUMBER(38) NOT NULL
,REORDER VARCHAR2(40) NOT NULL
);

INSERT INTO parts
VALUES (1,'Fax Machine',299,277,50);
COMMIT;

CREATE OR REPLACE PACKAGE PARTMGMT IS
PROCEDURE UPDATEPART (PARTRECORD IN PARTS%ROWTYPE);
PROCEDURE DELETEPART (PARTID IN INTEGER);
END PARTMGMT;
/
CREATE OR REPLACE PACKAGE BODY PARTMGMT AS
ROWSPROCESSED INTEGER := 0;
PROCEDURE UPDATEPART (PARTRECORD IN PARTS%ROWTYPE) IS
BEGIN
UPDATE PARTS
SET RECORDER = PARTRECORD.RECORDER
WHERE ID = PARTRECORD.ID;
ROWSPROCESSED := ROWSPROCESSED + 1;
END UPDATEPART;

PROCEDURE DELETEPART (PARTID IN INTEGER) IS
BEGIN
DELETE FROM PARTS WHERE ID = PARTID;
ROWSPROCESSED := ROWSPROCESSED + 1;
END DELETEPART;
END PARTMGMT;
/

Thanks!

Theresa
 
Theresa,

Sorry I cannot take more time now to "desk check" or actually compile your code (I'm off to church), but if you are using SQL*Plus and when you receive the message "Warning: Package Body created with compilation errors.", but there are no errors that appear, just type in the SQL*Plus command:
Code:
SQL> show errors
...That should then display the line number, column number, and text of the error you encountered.

Let us know if this resolves your problem.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Plus, if you wish to see the actual line numbers that SQL*Plus is using for your code, type in (at the SQL*Plus prompt) the command abbreviation:
Code:
SQL> L
...which means "List the most recent contents of SQL*Plus's SQL buffer. It prints out your code SQL or PL/SQL code, with line numbers.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
It works! I found the bug with the error hint.

Thankyou very much, Mufasa!

I can not believe you even checked this site on Sunday.

Have a great day!

Theresa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top