dbTalk Databases Forums  

PL/SQL error !

comp.databases.oracle comp.databases.oracle


Discuss PL/SQL error ! in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Vysochin Artem
 
Posts: n/a

Default PL/SQL error ! - 08-11-2004 , 03:29 PM






good day.

please help , I am new in Oracle :

I use Oracle Forms 9i and want to create simple relation such as

\
physical_address -- client ,
/

with the help of REF I established relation :

Master-block : client
Detail-block : physical_address
Object REF : fk_id_client (physical_address contains fk_id_client)

With property palette established REF Item -- YES
for both data-blocks.
Enforce Primary Key -- YES

Then , apeared in the Object Navigator TRIGGERS (PRE-DELETE) , and one
of them looks like this :

------------------------------
BEGIN
DELETE FROM AT_PHYSICALADDRESS A
WHERE A.FK_ID_CLIENT = (SELECT REF(A) FROM AT_CLIENT A WHERE rowid =
:AT_CLIENT_DATA_BLOCK.rowid);
END;
------------------------------
after compiling :

Error : 336,at line 4,column 16
non-object-table "A" illegal in this context

Error : 0 , at line 2,column 4
SQL statement ignored


WHY ?!
And in general : how to create CORRECT relation ?! help .

Thanks , webber (AT) astral (DOT) ntu-kpi.kiev.ua









Reply With Quote
  #2  
Old   
Jan
 
Posts: n/a

Default Re: PL/SQL error ! - 08-12-2004 , 03:40 AM






Not working with Forms for last few years, but here are some general
good rules:

- put referential integrity into the database, not an application
- instead of using SQL for DML in the application, create stored
procedures in the database and call them from client. Then you can
put your business logic into them. They can be reused by other
applcations as well.

Jan



Vysochin Artem <webber (AT) astral (DOT) ntu-kpi.kiev.ua> wrote

Quote:
good day.

please help , I am new in Oracle :

I use Oracle Forms 9i and want to create simple relation such as

\
physical_address -- client ,
/

with the help of REF I established relation :

Master-block : client
Detail-block : physical_address
Object REF : fk_id_client (physical_address contains fk_id_client)

With property palette established REF Item -- YES
for both data-blocks.
Enforce Primary Key -- YES

Then , apeared in the Object Navigator TRIGGERS (PRE-DELETE) , and one
of them looks like this :

------------------------------
BEGIN
DELETE FROM AT_PHYSICALADDRESS A
WHERE A.FK_ID_CLIENT = (SELECT REF(A) FROM AT_CLIENT A WHERE rowid =
:AT_CLIENT_DATA_BLOCK.rowid);
END;
------------------------------
after compiling :

Error : 336,at line 4,column 16
non-object-table "A" illegal in this context

Error : 0 , at line 2,column 4
SQL statement ignored


WHY ?!
And in general : how to create CORRECT relation ?! help .

Thanks , webber (AT) astral (DOT) ntu-kpi.kiev.ua

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.