Re: Unable to Create Package Body

From: frans <frans>
Date: 1996/07/09
Message-ID: <4rt2a3$npn_at_btmpjg.god.bel.alcatel.be>#1/1


In article <31E162B4.7284_at_water4.wcbe.edu.on.ca>, Michael Gabriel <GabrieM_at_water4.wcbe.edu.on.ca> writes:
|> Hi there,
|>
|> I'm having trouble compiling a package body.
|>
|> PLS-00304: cannot compile body of 'SUSP_PACKAGE_BODY' without its
|> specification
|>
|> The account has Create Procedure privilege.
|>
|> Is there some hidden privilege that's required?
|>
|> The SQL script contains the following...
|>
|> rem SU_PACKAGE.SQL
|>
|> CREATE OR REPLACE PACKAGE susp_package IS
|>
|> ------------
|> -- OVERVIEW
|> --
|> -- This package provides access to SUSP transaction statements from
|> -- stored procedures.
|>
|> ----------------------------
|> -- PROCEDURES AND FUNCTIONS
|> --
|>
|> PROCEDURE do_nothing;
|> FUNCTION verify_user (username VARCHAR2) RETURN BOOLEAN;
|> END susp_package;
|> /
|>
|> GRANT EXECUTE ON susp_package TO ops$sudba;
|>
|> CREATE OR REPLACE PACKAGE BODY susp_package_body IS

                                              ^^^^^
remove "_body" : package specification and associated body should have the same identifier.

Hope this helps

Frans
frans_at_sebb.bel.alcatel.be

|> PROCEDURE do_nothing IS
|> BEGIN
|> NULL;
|> END do_nothing;
|>
|> FUNCTION verify_user (username VARCHAR2) RETURN BOOLEAN IS
|> -- Verify the user has access to the Suspension System
|> t_count INTEGER;
|> b_result BOOLEAN;
|> t_username VARCHAR2 := username;
|> BEGIN
|> SELECT count(*)
|> INTO t_count
|> FROM hd_su_user_authorization ua
|> WHERE
|> ua.username = t_username;
|> b_result := (t_count > 0);
|> RETURN b_result;
|> END verify_user;
|> END susp_package_body;
|> /
  Received on Tue Jul 09 1996 - 00:00:00 CEST

Original text of this message