Link to home
Start Free TrialLog in
Avatar of ptreves
ptreves

asked on

PL-SQL ERROR 201 / 0

Hello,

Compiling some Forms under my Linux Box, I got these errors as well:
-----
Compiling PRE-INSERT trigger on FIELD_LOG data block...
Compilation error on PRE-INSERT trigger on FIELD_LOG data block:
PL/SQL ERROR 201 at line 4, column 9
identifier 'TBFIELD_SEQ.NEXTVAL' must be declared
PL/SQL ERROR 0 at line 4, column 2
SQL Statement ignored
 
=====cltinv
Compilation error on function CHECK_ID:
PL/SQL ERROR 201 at line 2, column 35
identifier 'TED.SECURITY2' must be declared
PL/SQL ERROR 0 at line 2, column 14
SQL Statement ignored

=====

Any ideas about what might be the cause ?
(looks like TED.SECURITY2 and TB_FILED_SEQ.NEXTVAL might not be defined/exit)

Your  toughts ?

PT
Avatar of OraSoln
OraSoln

If possible, show us the code in your pre-insert trigger.

For the 1st error: Your oracle database either does not have a sequence TB_FILED_SEQ or you have misspelt it or it can be under some other schema. Check your code.

For the 2nd error: TED seems to be a table to me. If so, then the column SECURITY2 does not exist or the table is under a different schema.
Avatar of ptreves

ASKER

Hello,

I have been checking my database.
I did not find any tables called TED. Also, I did find the sequence TBFIELD_SEQ using the Oracle Enterprise Manager.
I tried the following under SQLPLUS:

desc alcie.tbfield_seq;
SP2-0381: Describe sequence is not available

1) What can I do to this sequence in order to compile my form correctly ?

Your toughts ?

PT
Avatar of ptreves

ASKER

Hello,

I get the same type of error with another sequence:
-----
Compiling WHEN-VALIDATE-ITEM trigger on CUSTOMER item in CLIENT_INFO data block...
Compilation error on WHEN-VALIDATE-ITEM trigger on CUSTOMER item in CLIENT_INFO data block:
PL/SQL ERROR 201 at line 3, column 24
identifier 'SEQ_CUST.NEXTVAL' must be declared
PL/SQL ERROR 0 at line 3, column 17
SQL Statement ignored
-----

1) What should I do with these sequence errors ? declare synonyms ?
PT

Avatar of ptreves

ASKER

Hello,

Looking in the Forms Builder Oracle 9i, I do not find a CLIENT_INFO data block.
I only found: B1, B2, CONTROL and TOOLBAR datablocks.

Your toughts ...?

1) Where could I find the SEQ_CUST.NEXTVAL sequence ?

PT
ASKER CERTIFIED SOLUTION
Avatar of OraSoln
OraSoln

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ptreves

ASKER

Hello,

This is what I get:
---
1) select tbfield_seq.nextval from dual;
    error at line 1
    ora-02289: sequence does not exist

2) select alcie.tbfield_seq.nextval from dual;
    NEXTVAL
    ----------
       2160

The sequence exists under the ALCIE user.

1) How can I make the sequence public ? using synonym ?

Your toughts ....

PT
Avatar of ptreves

ASKER

Hello again,

If the sequence seems to exists for the ALCIE user,

1) why I could not do this : desc alcie.tbfield_seq;      ????
SP2-0381: Describe sequence is not available


Your toughts ?..

PT
Avatar of ptreves

ASKER

Hello,

I did an import under the SYSTEM/MANAGER user and logged in as the SYSTEM/MANAGER also.
All tables that were giving me compilation errors, I create public synonyms for them.

How can I make the sequence public ?

PT
CREATE PUBLIC SYNONYM TBFIELD_SEQ FOR ALCIE.TBFIELD_SEQ;

TIM