ORA-04044: procedure, function, package, or type is not allowed here

ORA-04044: procedure, function, package, or type is not allowed here

Post by Chris Forlan » Sun, 31 Dec 1899 09:00:00



I've created a public procedure called generate_id( in varchar2, out
varchar2 ).

The procedure is owned by user tdadmin, but I granted execute by saying:

Quote:> grant execute on procedure generate_id to public;

I have also created a trigger (as another user) that calls this
procedure, like so:

Quote:> create or replace
> TRIGGER create_tcid
> BEFORE INSERT OR UPDATE OF ts_user_01
> ON test
> FOR EACH ROW
> declare
>   id varchar2(20);
> begin
>    tdadmin.generate_id( 'test', id );  ********************
>    :new.ts_user_01 := id;
> end;

However, whenever I attempt an insert, I receive the following message:

Quote:> ORA-04044: procedure, function, package, or type is not allowed here
> ORA-06512: at "TDADMIN.GENERATE_ID", line 12
> ORA-06512: at "FORLANODB.CREATE_TCID", line 4
> ORA-04088: error during execution of trigger 'FORLANODB.CREATE_TCID'

What have I done wrong?

Thanks,

Chris

--
Chris Forlano
Automation Development
Nortel Networks, Maidenhead
590 4342 (01628 434 342)

 
 
 

ORA-04044: procedure, function, package, or type is not allowed here

Post by John Chi » Sun, 31 Dec 1899 09:00:00


What is your coding in generate_id. Something wrong there.

Quote:>> ORA-04044: procedure, function, package, or type is not allowed here
>> ORA-06512: at "TDADMIN.GENERATE_ID", line 12

John Chiu

 
 
 

1. ORA-00934: group function is not allowed here

I am trying to insert a value based on the current max of a column, but am
getting the ORA-00934 error.

The statement I'm trying basically looks like:

INSERT INTO table (column) VALUES (nvl(max(column) + 1, 1))

(i.e. if no data, start at 1, otherwise add 1 to the current max)

So apparently it can't be done like this - how best can this be done without
the possibility that another client comes in in between calls (i.e. if I
first made a call to see what the max is, then the next call would be the
insert)

TIA,
mark

2. ASP & SQL - <Next N> results

3. SQL experts: help working around ORA-00934: group function is not allowed here

4. ORA 12705 - Invalid or unknown NLS-Parameter ...

5. am I not allowed to use

6. Removing DB

7. Advanced Queuing: ORA-25215 user_data type and queue type do not match

8. MS Graph in FoxPro

9. Microsoft SQL isapi extension - 405 Method Not Allowed - POST queries are not allowed - OpenXML

10. Procedures and Functions in Package/Package body

11. ORA-06571: Function CALC_AVG does not guarantee not to update database

12. ORA-06571: Function USER_DEF_CASE does not guarantee not to update database

13. ORA-06571 function name does not guarantee not to update database: pragma